CommeUnJeu · L1 MPSI
Linear differential equations
A linear differential equation is an equation of the form \(T(y) = f\) where the unknown is a function \(y\), \(T\) is a linear operator built from \(y\) and its derivatives, and \(f\) is a fixed function. This chapter treats two cases, the only ones in the program:
The linearity of the operator \(y \mapsto y' + a y\) (resp.\ \(y \mapsto y'' + a y' + b y\)) drives the whole structure of the chapter. Two consequences are recurring : the superposition principle (linear combinations of solutions of separate equations solve the combined equation) and the affine structure of the solution set (the set of solutions is the sum of a particular solution and the vector space of solutions of the associated homogeneous equation \(T(y) = 0\)).
The chapter has two sections. The first treats first-order linear ODEs : the homogeneous case via the integrating factor \(e^A\) where \(A\) is a primitive of \(a\), then the complete case via variation of constants, then the Cauchy problem (existence + uniqueness, proof included), then an optional enrichment on raccord problems where the leading coefficient may vanish. The second section treats second-order constant-coefficient ODEs : the homogeneous case via the characteristic polynomial (3 cases by discriminant when \(\mathbb{K} = \mathbb R\)), then the complete case with the Cauchy theorem (statement admitted, proof out of program), then the practical ansatz for the program's three special right-hand sides (polynomial, \(\alpha e^{\lambda x}\), \(\beta \cos(\omega x) / \beta \sin(\omega x)\)).
Three reflexes the reader should leave with : (i) the linear structure of the solution set is the central guiding idea --- every result is a consequence of the linearity of \(y \mapsto y' + a y\) or \(y \mapsto y'' + a y' + b y\) ; (ii) first-order solutions reduce to antidifferentiation (one primitive in the homogeneous case, two in the variation-of-constants formula), invoking the toolbox of chapter Primitives ; (iii) second-order solutions reduce to a characteristic polynomial (for the homogeneous part) and to an ansatz with coefficient identification (for a particular solution).
- first-order : \(y'(x) + a(x) \, y(x) = b(x)\), with \(a, b \in C(I, \mathbb{K})\) given continuous functions on an interval \(I\);
- second-order with constant coefficients : \(y''(x) + a \, y'(x) + b \, y(x) = f(x)\), with \(a, b \in \mathbb{K}\) scalars and \(f \in C(I, \mathbb{K})\).
The linearity of the operator \(y \mapsto y' + a y\) (resp.\ \(y \mapsto y'' + a y' + b y\)) drives the whole structure of the chapter. Two consequences are recurring : the superposition principle (linear combinations of solutions of separate equations solve the combined equation) and the affine structure of the solution set (the set of solutions is the sum of a particular solution and the vector space of solutions of the associated homogeneous equation \(T(y) = 0\)).
The chapter has two sections. The first treats first-order linear ODEs : the homogeneous case via the integrating factor \(e^A\) where \(A\) is a primitive of \(a\), then the complete case via variation of constants, then the Cauchy problem (existence + uniqueness, proof included), then an optional enrichment on raccord problems where the leading coefficient may vanish. The second section treats second-order constant-coefficient ODEs : the homogeneous case via the characteristic polynomial (3 cases by discriminant when \(\mathbb{K} = \mathbb R\)), then the complete case with the Cauchy theorem (statement admitted, proof out of program), then the practical ansatz for the program's three special right-hand sides (polynomial, \(\alpha e^{\lambda x}\), \(\beta \cos(\omega x) / \beta \sin(\omega x)\)).
Three reflexes the reader should leave with : (i) the linear structure of the solution set is the central guiding idea --- every result is a consequence of the linearity of \(y \mapsto y' + a y\) or \(y \mapsto y'' + a y' + b y\) ; (ii) first-order solutions reduce to antidifferentiation (one primitive in the homogeneous case, two in the variation-of-constants formula), invoking the toolbox of chapter Primitives ; (iii) second-order solutions reduce to a characteristic polynomial (for the homogeneous part) and to an ansatz with coefficient identification (for a particular solution).
I
First-order linear ODEs
I.1
Definition and homogeneous case
A linear first-order ODE has the form \(y'(x) + a(x) \, y(x) = b(x)\), where \(a, b\) are given continuous functions on \(I\) with values in \(\mathbb{K}\). Read literally, \(y\) denotes an unknown function on \(I\) ; we seek functions \(y \in C^1(I, \mathbb{K})\) satisfying the equation pointwise on \(I\). The equation is linear because the map \(y \mapsto y' + a y\) is linear on \(C^1(I, \mathbb{K})\) ; this drives the entire chapter's structural reasoning. The simplest case --- the homogeneous equation \(y' + a(x) y = 0\) --- admits a one-line solution via the integrating factor \(e^A\) where \(A\) is a primitive of \(a\) on \(I\).
Definition — Linear first-order ODE
Let \(I\) be an interval of \(\mathbb R\) and \(a, b \in C(I, \mathbb{K})\), where \(\mathbb{K} = \mathbb R\) or \(\mathbb C\). The linear first-order ODE associated with \(a\) and \(b\) is the equation $$ y'(x) + a(x) \, y(x) \ = \ b(x), \qquad x \in I, $$ of unknown \(y \in C^1(I, \mathbb{K})\). The associated homogeneous equation is \(y'(x) + a(x) \, y(x) = 0\). A solution on \(I\) is a function \(y \in C^1(I, \mathbb{K})\) satisfying the equation pointwise. We write \(S\) for the solution set of the complete equation, \(S_0\) for the solution set of the homogeneous equation. Theorem — Solutions of the homogeneous equation \(y' + a(x) y \equal 0\)
Let \(a \in C(I, \mathbb{K})\) and \(A\) a primitive of \(a\) on \(I\). The solutions of the homogeneous equation \(y'(x) + a(x) \, y(x) = 0\) on \(I\) are exactly the functions $$ x \ \longmapsto \ \lambda \, e^{-A(x)}, \qquad \lambda \in \mathbb{K}. $$ Equivalently, \(S_0 = \mathbb{K} \cdot e^{-A}\) is a one-dimensional \(\mathbb{K}\)-vector subspace of \(C^1(I, \mathbb{K})\).
The key observation is that for any \(y \in C^1(I, \mathbb{K})\), $$ \begin{aligned} \bigl( y(x) \, e^{A(x)} \bigr)' \ &= \ y'(x) \, e^{A(x)} + y(x) \, A'(x) \, e^{A(x)} && \text{(product rule)} \\
&= \ y'(x) \, e^{A(x)} + a(x) \, y(x) \, e^{A(x)} && \text{(since \(A' = a\) on \(I\))} \\
&= \ \bigl( y'(x) + a(x) \, y(x) \bigr) \, e^{A(x)} && \text{(factor \(e^A\))}. \end{aligned} $$ Since \(e^A\) never vanishes, $$ y'(x) + a(x) \, y(x) \ = \ 0 \quad \Longleftrightarrow \quad \bigl( y \, e^A \bigr)' \ = \ 0 \quad \Longleftrightarrow \quad y \, e^A \text{ is constant on } I. $$ We use here the basic fact that a function with zero derivative on an interval is constant : this is the uniqueness statement for primitives (already invoked in chapter Primitives) and is admitted at this stage ; the formal mean-value-theorem-based proof is consolidated in chapter Differentiability. So \(y' + a y = 0\) if and only if there is \(\lambda \in \mathbb{K}\) with \(y(x) e^{A(x)} = \lambda\) for all \(x \in I\), i.e.\ \(y(x) = \lambda e^{-A(x)}\). Conversely, every function \(y(x) = \lambda e^{-A(x)}\) is differentiable on \(I\) with $$ y'(x) \ = \ - a(x) \, \lambda \, e^{-A(x)} \ = \ - a(x) \, y(x), $$ hence satisfies \(y' + a y = 0\).
Method — Solving the homogeneous equation \(y' + a(x) y \equal 0\)
To find every solution of \(y' + a(x) y = 0\) on an interval \(I\) : - Compute a primitive \(A\) of \(a\) on \(I\) (one antidifferentiation, using the table of chapter Primitives).
- Write the general solution as \(x \mapsto \lambda \, e^{-A(x)}\), with \(\lambda \in \mathbb{K}\) a free parameter.
Example — Constant coefficient \(a\)
For \(a \in \mathbb{K}\) constant, the equation \(y' + a y = 0\) on \(\mathbb R\) has \(A(x) = a x\) as a primitive of the constant function \(a\). Hence the solutions are $$ x \ \longmapsto \ \lambda \, e^{-a x}, \qquad \lambda \in \mathbb{K}. $$ In particular, with \(a = -1\) and the initial condition \(y(0) = 1\), this recovers the characterisation : the exponential is the unique \(C^1\) function on \(\mathbb R\) satisfying \(y' = y\) and \(y(0) = 1\). Example — Variable coefficient
On \(\mathbb R\), the equation \(y' = \dfrac{y}{1 + x^2}\) rewrites as \(y' - \dfrac{1}{1 + x^2} y = 0\). A primitive of \(x \mapsto 1/(1 + x^2)\) is \(\arctan\) (table from chapter Primitives), so \(A(x) = -\arctan x\) is a primitive of \(a(x) = -1/(1 + x^2)\). The general solution is $$ x \ \longmapsto \ \lambda \, e^{\arctan x}, \qquad \lambda \in \mathbb R. $$ Skills to practice
- Solving homogeneous first-order ODEs
I.2
Complete equation\(\virgule\) superposition\(\virgule\) variation of constants
Once the homogeneous case is settled, the linearity of the map \(y \mapsto y' + a y\) gives two structural results. The first --- the superposition principle --- says that solutions of equations with different right-hand sides combine linearly : if \(y_1\) solves \(y' + a y = b_1\) and \(y_2\) solves \(y' + a y = b_2\), then \(\lambda_1 y_1 + \lambda_2 y_2\) solves \(y' + a y = \lambda_1 b_1 + \lambda_2 b_2\). The second --- the affine-line structure of the solution set --- says that, knowing a single particular solution \(y_{\mathrm{part}}\), every solution is \(y_{\mathrm{part}}\) plus a solution of the homogeneous equation. To find a particular solution, the standard technique is variation of constants : replace the constant \(\lambda\) in the homogeneous solution \(\lambda e^{-A}\) by a function \(\lambda(x)\), and pin down \(\lambda\) by injecting into the complete equation.
Proposition — Superposition principle at first order
Let \(a \in C(I, \mathbb{K})\) and \(b_1, b_2 \in C(I, \mathbb{K})\). If \(y_1\) solves \(y' + a(x) y = b_1(x)\) on \(I\) and \(y_2\) solves \(y' + a(x) y = b_2(x)\) on \(I\), then for all \(\lambda_1, \lambda_2 \in \mathbb{K}\), the function \(\lambda_1 y_1 + \lambda_2 y_2\) solves $$ y'(x) + a(x) \, y(x) \ = \ \lambda_1 b_1(x) + \lambda_2 b_2(x) \qquad \text{on } I. $$
By linearity of the derivative and of the multiplication by \(a\), $$ (\lambda_1 y_1 + \lambda_2 y_2)' + a (\lambda_1 y_1 + \lambda_2 y_2) \ = \ \lambda_1 (y_1' + a y_1) + \lambda_2 (y_2' + a y_2) \ = \ \lambda_1 b_1 + \lambda_2 b_2. $$
Proposition — Affine-line structure of the solution set
Let \(a, b \in C(I, \mathbb{K})\) and assume the equation \(y' + a(x) y = b(x)\) admits at least one solution \(y_{\mathrm{part}} \in C^1(I, \mathbb{K})\). Then $$ S \ = \ y_{\mathrm{part}} + S_0 \ = \ \bigl\{ \, y_{\mathrm{part}} + \lambda \, e^{-A} \;\big|\; \lambda \in \mathbb{K} \, \bigr\}, $$ where \(A\) is any primitive of \(a\) on \(I\). In particular, \(S\) is an affine line of direction \(S_0 = \mathbb{K} \cdot e^{-A}\).
Direct corollary of superposition. Let \(y \in S\) be any solution of the complete equation ; then \(y\) solves \(y' + a y = b\) and \(y_{\mathrm{part}}\) solves \(y' + a y = b\), so by superposition (with \(\lambda_1 = 1\), \(\lambda_2 = -1\)), \(y - y_{\mathrm{part}}\) solves \(y' + a y = 0\), i.e.\ \(y - y_{\mathrm{part}} \in S_0\). Conversely, for any \(y_0 \in S_0\), superposition gives \((y_{\mathrm{part}} + y_0)' + a (y_{\mathrm{part}} + y_0) = b + 0 = b\), so \(y_{\mathrm{part}} + y_0 \in S\).
Method — Variation of constants
To find a particular solution of \(y' + a(x) y = b(x)\) on \(I\), in 4 steps : - Solve the homogeneous equation : write a nonzero homogeneous solution \(y_h(x) = e^{-A(x)}\), with \(A\) a primitive of \(a\).
- Ansatz : seek \(y(x) = \lambda(x) \, e^{-A(x)}\) with \(\lambda \in C^1(I, \mathbb{K})\) to be determined.
- Inject in the complete equation : compute \(y'(x) = \lambda'(x) e^{-A(x)} - \lambda(x) a(x) e^{-A(x)}\), then \(y'(x) + a(x) y(x) = \lambda'(x) e^{-A(x)}\) ; setting this equal to \(b(x)\) gives \(\lambda'(x) = b(x) e^{A(x)}\).
- Take a primitive of \(b e^A\) to obtain \(\lambda\), then assemble \(y(x) = \lambda(x) e^{-A(x)}\).
Proposition — Existence of a particular solution
Let \(a, b \in C(I, \mathbb{K})\). The equation \(y' + a(x) y = b(x)\) admits at least one solution on \(I\) : explicitly, if \(A\) is a primitive of \(a\) on \(I\) and \(\Lambda\) is a primitive of \(b e^A\) on \(I\), then \(x \mapsto \Lambda(x) \, e^{-A(x)}\) is a solution.
Both \(A\) and \(\Lambda\) exist as primitives of continuous functions on an interval (chapter Primitives). Setting \(y(x) = \Lambda(x) e^{-A(x)}\), we get $$ \begin{aligned} y'(x) \ &= \ \Lambda'(x) \, e^{-A(x)} - \Lambda(x) \, A'(x) \, e^{-A(x)} && \text{(product + chain rule)} \\
&= \ b(x) \, e^{A(x)} \, e^{-A(x)} - a(x) \, \Lambda(x) \, e^{-A(x)} && \text{(\(\Lambda' = b e^A\), \(A' = a\))} \\
&= \ b(x) - a(x) \, y(x). \end{aligned} $$ Hence \(y' + a y = b\) on \(I\).
Example — Solving \(x y' + y \equal x^2\) on \(\mathbb R_+^*\)
On \(\mathbb R_+^*\), divide by \(x\) to put the equation in normal form : \(y' + y/x = x\). So \(a(x) = 1/x\) and \(b(x) = x\). A primitive of \(a\) on \(\mathbb R_+^*\) is \(A(x) = \ln x\), hence \(e^{-A(x)} = 1/x\). The homogeneous solutions are \(x \mapsto \lambda/x\), \(\lambda \in \mathbb R\).Variation of constants. Ansatz \(y(x) = \lambda(x)/x\). Then \(y'(x) = \lambda'(x)/x - \lambda(x)/x^2\) and \(y'(x) + y(x)/x = \lambda'(x)/x\). Setting this equal to \(x\) gives \(\lambda'(x) = x^2\), hence \(\lambda(x) = x^3/3\) works. A particular solution is \(y_{\mathrm{part}}(x) = x^2/3\). The general solution is $$ y(x) \ = \ \dfrac{x^2}{3} + \dfrac{\lambda}{x}, \qquad \lambda \in \mathbb R. $$ Verification : \(\bigl( x^2/3 + \lambda/x \bigr)' \cdot x + (x^2/3 + \lambda/x) = 2 x^2/3 - \lambda/x + x^2/3 + \lambda/x = x^2\). \(\checkmark\)
Example — Constant coefficient with exponential right-hand side
On \(\mathbb R\), solve \(y' + 2 y = e^x\). Here \(a = 2\) constant, \(A(x) = 2 x\), \(e^{-A(x)} = e^{-2 x}\). Homogeneous solutions \(\lambda e^{-2 x}\).Variation of constants. Ansatz \(y(x) = \lambda(x) e^{-2 x}\), then \(\lambda'(x) = b(x) e^{A(x)} = e^x \cdot e^{2 x} = e^{3 x}\), so \(\lambda(x) = e^{3 x}/3\) and \(y_{\mathrm{part}}(x) = e^{3 x}/3 \cdot e^{-2 x} = e^x/3\).
General solution : \(y(x) = \lambda e^{-2 x} + e^x/3\), \(\lambda \in \mathbb R\). Verification : \((e^x/3)' + 2 (e^x/3) = e^x/3 + 2 e^x/3 = e^x\). \(\checkmark\)
Skills to practice
- Solving complete first-order ODEs by variation of constants
I.3
Cauchy problem (first-order)
Together with the section on Complete equation, superposition, variation of constants, the variation-of-constants computation has actually solved the Cauchy problem : for any \((x_0, y_0) \in I \times \mathbb{K}\), the system \(\{y' + a(x) y = b(x), \ y(x_0) = y_0\}\) has exactly one solution on \(I\). The closed-form expression is the variation-of-constants formula with the initial condition pinning down the constant. We state it in primitive-first form ; the equivalent definite-integral form is given as a Remark with a forward-pointer to chapter Integration over a segment (chapter 26).
Theorem — Cauchy problem at first order
Let \(a, b \in C(I, \mathbb{K})\), \(x_0 \in I\), \(y_0 \in \mathbb{K}\). Let \(A\) be a primitive of \(a\) on \(I\), and let \(B\) be the unique primitive of \(b \cdot e^{A}\) on \(I\) such that \(B(x_0) = 0\). The Cauchy problem $$ \left\{ \begin{aligned} y'(x) + a(x) \, y(x) \ &= \ b(x) \quad \text{on } I, \\
y(x_0) \ &= \ y_0, \end{aligned} \right. $$ has a unique solution on \(I\), given by $$ y(x) \ = \ \bigl( y_0 \, e^{A(x_0)} + B(x) \bigr) \, e^{-A(x)}. $$
By the variation-of-constants method (Complete equation, superposition, variation of constants), every solution of \(y' + a y = b\) on \(I\) writes \(y(x) = \lambda(x) e^{-A(x)}\) where \(\lambda\) is a primitive of \(b e^A\). Let \(B\) be the unique such primitive with \(B(x_0) = 0\) (well-defined : two primitives of \(b e^A\) differ by a constant, and prescribing the value at \(x_0\) pins down that constant). The general primitive of \(b e^A\) is then \(\lambda(x) = B(x) + c\) for some \(c \in \mathbb{K}\), and the corresponding solution reads $$ y(x) \ = \ (B(x) + c) \, e^{-A(x)}. $$ The initial condition \(y(x_0) = y_0\) becomes \((B(x_0) + c) e^{-A(x_0)} = c \, e^{-A(x_0)} = y_0\), hence \(c = y_0 \, e^{A(x_0)}\). The solution is $$ y(x) \ = \ \bigl( B(x) + y_0 \, e^{A(x_0)} \bigr) \, e^{-A(x)}. $$ Existence : the function above is \(C^1\) on \(I\) (as a product of \(C^1\) functions) and satisfies both the equation (by the variation-of-constants method) and the initial condition (by construction of \(c\)). Uniqueness : any other solution must also write \(\lambda(x) e^{-A(x)}\) with \(\lambda\) a primitive of \(b e^A\), and the initial condition pins down the constant of integration uniquely.
Definite-integral form (forward-pointer to chapter 26)
In chapter Integration over a segment (chapter 26, semester 2), the primitive \(B\) of \(b e^A\) vanishing at \(x_0\) admits the explicit integral expression $$ B(x) \ = \ \int_{x_0}^{x} b(t) \, e^{A(t)} \, dt, $$ and the unique solution of the Cauchy problem reads $$ y(x) \ = \ y_0 \, e^{A(x_0) - A(x)} + \int_{x_0}^{x} b(t) \, e^{A(t) - A(x)} \, dt. $$ At this stage of the curriculum, this is notation only for the primitive \(B\) above ; the rigorous definition of the bounded integral \(\int_{x_0}^{x}\) is the subject of chapter 26.
Method — Solving a Cauchy problem at first order
To solve \(\{y' + a(x) y = b(x), \ y(x_0) = y_0\}\) on \(I\) : - Compute a primitive \(A\) of \(a\) on \(I\) (one antidifferentiation).
- Write the homogeneous solutions \(\lambda \, e^{-A}\).
- Find a particular solution \(y_{\mathrm{part}}\) by variation of constants (second antidifferentiation, of \(b e^A\)).
- Write the general solution \(y_{\mathrm{part}} + \lambda \, e^{-A}\), then impose \(y(x_0) = y_0\) to determine \(\lambda\) uniquely.
Example — Cauchy problem with initial condition
On \(\mathbb R\), solve \(\{y' + y = e^x, \ y(0) = 1\}\). Here \(a = 1\) constant, \(A(x) = x\), \(e^{-A(x)} = e^{-x}\). Homogeneous solutions \(\lambda e^{-x}\).Particular solution : variation of constants gives \(\lambda'(x) = e^x \cdot e^x = e^{2 x}\), hence \(\lambda(x) = e^{2 x}/2\) and \(y_{\mathrm{part}}(x) = e^{2 x}/2 \cdot e^{-x} = e^x/2\).
General solution : \(y(x) = \lambda \, e^{-x} + e^x/2\).
Initial condition : \(y(0) = \lambda + 1/2 = 1\) gives \(\lambda = 1/2\). The unique solution is $$ y(x) \ = \ \dfrac{e^{-x} + e^x}{2} \ = \ \cosh x. $$ Verification : \((\cosh x)' + \cosh x = \sinh x + \cosh x = e^x\) and \(\cosh 0 = 1\). \(\checkmark\)
Skills to practice
- Solving Cauchy problems at first order
I.4
Raccord on \(a(x) y' + b(x) y \equal f(x)\) --- optional enrichment
The equations in the preceding first-order sections are normalised : the coefficient of \(y'\) is \(1\). When the actual problem has the form \(a(x) y' + b(x) y = f(x)\) and the function \(a\) vanishes at isolated points, the raccord (or recollement, the two French terms are synonymous) problem appears : solve on each connected component of \(\{a \ne 0\}\) first, then glue the local solutions across the zeros by imposing \(C^1\) regularity. The resulting global solution set on the full interval can have smaller or larger dimension than one would guess from a single normalised interval. This subsection is an optional enrichment / exercice classique, not part of the program's core first-order list ; it is included because it is a classical exercise in problem sets and concours preparation, and because it sharpens the « an ODE lives on an interval, not on an arbitrary subset » reflex.
Method — Raccord at a zero of the leading coefficient \(a\) --- optional enrichment
To solve \(a(x) y' + b(x) y = f(x)\) on an interval \(I\) on which \(a\) may vanish at isolated points : - Identify the zeros of \(a\) on \(I\). The connected components of \(I \setminus a^{-1}(0)\) are the open intervals on which the normalised equation \(y' + (b/a) y = f/a\) makes sense.
- Solve \(y' + (b/a) y = f/a\) on each connected component (using the homogeneous and variation-of-constants methods above) ; this produces one free constant per component.
- For each zero \(x_0\) of \(a\), require the candidate global function to be of class \(C^1\) at \(x_0\) : this imposes one or more relations between the per-component constants (limits of the function and of its derivative must agree on both sides of \(x_0\)).
- Verify that the resulting global function actually satisfies the original equation \(a(x) y' + b(x) y = f(x)\) at the zeros (often forced by substitution at \(x = x_0\)).
Example — Solving \(x y' + y \equal x^2\) on \(\mathbb R\) --- loss of dimension
The coefficient \(a(x) = x\) vanishes only at \(x = 0\). On each of \(\mathbb R_+^*\) and \(\mathbb R_-^*\), the normalised equation \(y' + y/x = x\) was solved in the variation-of-constants section : the solutions are \(y(x) = x^2/3 + \lambda/x\) on \(\mathbb R_+^*\) and \(y(x) = x^2/3 + \mu/x\) on \(\mathbb R_-^*\), with \(\lambda, \mu \in \mathbb R\) independent.Gluing at \(x = 0\). For a global \(C^1\) function on \(\mathbb R\), we need \(y(x) \to y(0)\) and \(y'(x) \to y'(0)\) as \(x \to 0\) from both sides. The term \(\lambda/x\) (resp.\ \(\mu/x\)) is bounded near \(0\) only if \(\lambda = 0\) (resp.\ \(\mu = 0\)). Hence the only candidate global solution is \(y(x) = x^2/3\), defined and \(C^1\) on \(\mathbb R\).
Verification at \(x = 0\). Substituting \(y = x^2/3\) in \(x y' + y\) gives \(x \cdot (2 x/3) + x^2/3 = x^2\). \(\checkmark\) The unique global solution on \(\mathbb R\) is \(y(x) = x^2/3\).
The local solution sets on \(\mathbb R_+^*\) and \(\mathbb R_-^*\) are each affine lines of dimension \(1\) ; gluing them at \(0\) collapses the solution set on \(\mathbb R\) to a singleton (dimension \(0\)). This is a loss of dimension caused by the raccord.
Gain of dimension --- reserved for the exo
The equation \(x y' - 2 y = x^3\) on \(\mathbb R\) illustrates the opposite phenomenon : the local solutions on \(\mathbb R_+^*\) and \(\mathbb R_-^*\) are each affine lines (dimension \(1\)), but the global solution set on \(\mathbb R\) is an affine plane (dimension \(2\)). This example is treated in the exo file.
Skills to practice
- Solving raccord (connection) problems
II
Second-order linear ODEs with constant coefficients
II.1
Definition\(\virgule\) complex lemma\(\virgule\) and real homogeneous case
A second-order linear ODE with constant coefficients has the form \(y'' + a y' + b y = f(x)\), with \(a, b \in \mathbb{K}\) scalars and \(f \in C(I, \mathbb{K})\). The characteristic polynomial is \(\chi(X) = X^2 + a X + b\) ; its roots drive the structure of the homogeneous solutions. To handle the case of complex conjugate roots cleanly, we first state the complex solution structure as a short bookkeeping lemma over \(\mathbb{K} = \mathbb C\), and then read off the real result by taking real parts. For \(\mathbb{K} = \mathbb R\), three cases occur depending on the sign of the discriminant \(\Delta = a^2 - 4 b\).
Definition — Linear second-order constant-coefficient ODE
Let \(a, b \in \mathbb{K}\) scalars and \(f \in C(I, \mathbb{K})\). The linear second-order constant-coefficient ODE associated with \((a, b, f)\) is the equation $$ y''(x) + a \, y'(x) + b \, y(x) \ = \ f(x), \qquad x \in I, $$ of unknown \(y \in C^2(I, \mathbb{K})\). The associated homogeneous equation is \(y'' + a y' + b y = 0\). The characteristic polynomial is \(\chi(X) = X^2 + a X + b \in \mathbb{K}[X]\). A solution on \(I\) is a function \(y \in C^2(I, \mathbb{K})\) satisfying the equation pointwise. Proposition — Complex homogeneous lemma
Let \(a, b \in \mathbb C\). The complex solutions of \(y'' + a y' + b y = 0\) on \(I\) form a \(2\)-dimensional \(\mathbb C\)-vector subspace of \(C^2(I, \mathbb C)\). Explicitly, let \(r_1, r_2\) denote the (complex) roots of the characteristic polynomial \(X^2 + a X + b\) : - if \(r_1 \ne r_2\) (two distinct roots), the solutions are \(x \mapsto \lambda \, e^{r_1 x} + \mu \, e^{r_2 x}\) with \(\lambda, \mu \in \mathbb C\) ;
- if \(r_1 = r_2 = r\) (double root), the solutions are \(x \mapsto (\lambda x + \mu) \, e^{r x}\) with \(\lambda, \mu \in \mathbb C\).
Reduce-order trick. Pick \(r\) a root of \(\chi(X) = X^2 + a X + b\). We seek the solutions of the homogeneous equation under the form \(y(x) = z(x) \, e^{r x}\) with \(z \in C^2(I, \mathbb C)\) to be determined. Computing : $$ \begin{aligned} y'(x) \ &= \ (z'(x) + r \, z(x)) \, e^{r x} && \text{(product rule)} \\
y''(x) \ &= \ (z''(x) + 2 r \, z'(x) + r^2 \, z(x)) \, e^{r x} && \text{(differentiating \(y'\))}. \end{aligned} $$ Injecting in the homogeneous equation \(y'' + a y' + b y = 0\) and factoring \(e^{r x}\) (which never vanishes) : $$ z''(x) + (2 r + a) \, z'(x) + \underbrace{(r^2 + a r + b)}_{= \, \chi(r) \, = \, 0} \, z(x) \ = \ 0, $$ which simplifies to \(z'' + (2 r + a) z' = 0\), i.e.\ a first-order linear ODE in \(u = z'\) : \(u' + (2 r + a) u = 0\).
- Case \(r_1 \ne r_2\). The other root is \(r_2 = -a - r\) (since the sum of roots is \(-a\)), so \(2 r + a = r - r_2\). The first-order equation in \(u\) is \(u' + (r - r_2) u = 0\), with solutions \(u(x) = c \, e^{-(r - r_2) x} = c \, e^{(r_2 - r) x}\), \(c \in \mathbb C\). Taking a primitive, \(z(x) = \dfrac{c}{r_2 - r} e^{(r_2 - r) x} + d\) for \(d \in \mathbb C\). Hence $$ y(x) \ = \ z(x) \, e^{r x} \ = \ \dfrac{c}{r_2 - r} e^{r_2 x} + d \, e^{r x}, $$ which (renaming constants) is exactly \(\lambda \, e^{r_1 x} + \mu \, e^{r_2 x}\) with \(r_1 = r\) (and \(\lambda, \mu \in \mathbb C\) arbitrary).
- Case \(r_1 = r_2 = r\). Then \(2 r + a = 0\) (the double root is \(r = -a/2\), and indeed \(2 r + a = 0\)). The first-order equation in \(u\) becomes \(u' = 0\), hence \(u = c\) constant. Taking a primitive, \(z(x) = c x + d\) for \(c, d \in \mathbb C\). Hence $$ y(x) \ = \ z(x) \, e^{r x} \ = \ (c x + d) \, e^{r x}, $$ which (renaming constants) is \((\lambda x + \mu) e^{r x}\).
Theorem — Real homogeneous equation \(y'' + a y' + b y \equal 0\) for \(\mathbb{K} \equal \mathbb R\)
Let \(a, b \in \mathbb R\). The real solutions of \(y'' + a y' + b y = 0\) on \(I\) form a \(2\)-dimensional \(\mathbb R\)-vector subspace of \(C^2(I, \mathbb R)\) described by the discriminant \(\Delta = a^2 - 4 b\) of \(X^2 + a X + b\) : - \(\Delta > 0\) (two distinct real roots \(r \ne r'\)) : solutions \(x \mapsto \lambda \, e^{r x} + \mu \, e^{r' x}\), \(\lambda, \mu \in \mathbb R\) ;
- \(\Delta = 0\) (double real root \(r = -a/2\)) : solutions \(x \mapsto (\lambda x + \mu) \, e^{r x}\), \(\lambda, \mu \in \mathbb R\) ;
- \(\Delta < 0\) (complex conjugate roots \(r \pm i \omega\) with \(r = -a/2\) and \(\omega = \sqrt{-\Delta}/2 > 0\)) : solutions \(x \mapsto e^{r x} \bigl( \lambda \cos(\omega x) + \mu \sin(\omega x) \bigr)\), \(\lambda, \mu \in \mathbb R\).
The student must know the table by heart ; the proof is for understanding. The \(\Delta > 0\) and \(\Delta = 0\) cases follow immediately from the complex homogeneous lemma above, since the roots are real and the formulas \(\lambda e^{r_1 x} + \mu e^{r_2 x}\) and \((\lambda x + \mu) e^{r x}\) are real for \(\lambda, \mu \in \mathbb R\).
For the \(\Delta < 0\) case, the roots are complex conjugate, \(r_1 = r + i \omega\) and \(r_2 = r - i \omega\) with \(r = -a/2 \in \mathbb R\) and \(\omega = \sqrt{-\Delta}/2 > 0\). By the complex lemma, the complex solutions are \(y(x) = \alpha \, e^{(r + i \omega) x} + \beta \, e^{(r - i \omega) x}\) with \(\alpha, \beta \in \mathbb C\). Factor \(e^{r x}\) : $$ y(x) \ = \ e^{r x} \bigl( \alpha \, e^{i \omega x} + \beta \, e^{- i \omega x} \bigr). $$ We seek the condition for \(y\) to be real-valued on \(I\), i.e.\ \(y = \overline{y}\) on \(I\). Conjugating term-by-term in the expression above, $$ \overline{y}(x) \ = \ \overline{\alpha} \, e^{(r - i \omega) x} + \overline{\beta} \, e^{(r + i \omega) x}. $$ The equality \(y = \overline{y}\) on \(I\) reads $$ \alpha \, e^{(r + i \omega) x} + \beta \, e^{(r - i \omega) x} \ = \ \overline{\beta} \, e^{(r + i \omega) x} + \overline{\alpha} \, e^{(r - i \omega) x} \quad \text{on } I. $$ The two functions \(e^{(r + i \omega) x}\) and \(e^{(r - i \omega) x}\) are \(\mathbb C\)-linearly independent on \(I\) : indeed, if they were dependent, their quotient \(e^{2 i \omega x}\) would be constant on \(I\), which is impossible since its derivative \(2 i \omega \, e^{2 i \omega x}\) is non-zero. Identifying coefficients in the equality above therefore forces \(\alpha = \overline{\beta}\), i.e.\ \(\beta = \overline{\alpha}\). Conversely, if \(\beta = \overline{\alpha}\) then $$ \alpha \, e^{i \omega x} + \overline{\alpha} \, e^{- i \omega x} \ = \ 2 \operatorname{Re}(\alpha \, e^{i \omega x}) \ = \ 2 \operatorname{Re}(\alpha) \cos(\omega x) - 2 \operatorname{Im}(\alpha) \sin(\omega x), $$ so setting \(\lambda = 2 \operatorname{Re}(\alpha)\) and \(\mu = - 2 \operatorname{Im}(\alpha)\), we get \(y(x) = e^{r x} (\lambda \cos(\omega x) + \mu \sin(\omega x))\). Both \(\lambda, \mu \in \mathbb R\) can be chosen arbitrarily by appropriate choice of \(\alpha \in \mathbb C\), so the real solution space has dimension \(2\) over \(\mathbb R\) with basis \((x \mapsto e^{r x} \cos(\omega x), \ x \mapsto e^{r x} \sin(\omega x))\).
For the \(\Delta < 0\) case, the roots are complex conjugate, \(r_1 = r + i \omega\) and \(r_2 = r - i \omega\) with \(r = -a/2 \in \mathbb R\) and \(\omega = \sqrt{-\Delta}/2 > 0\). By the complex lemma, the complex solutions are \(y(x) = \alpha \, e^{(r + i \omega) x} + \beta \, e^{(r - i \omega) x}\) with \(\alpha, \beta \in \mathbb C\). Factor \(e^{r x}\) : $$ y(x) \ = \ e^{r x} \bigl( \alpha \, e^{i \omega x} + \beta \, e^{- i \omega x} \bigr). $$ We seek the condition for \(y\) to be real-valued on \(I\), i.e.\ \(y = \overline{y}\) on \(I\). Conjugating term-by-term in the expression above, $$ \overline{y}(x) \ = \ \overline{\alpha} \, e^{(r - i \omega) x} + \overline{\beta} \, e^{(r + i \omega) x}. $$ The equality \(y = \overline{y}\) on \(I\) reads $$ \alpha \, e^{(r + i \omega) x} + \beta \, e^{(r - i \omega) x} \ = \ \overline{\beta} \, e^{(r + i \omega) x} + \overline{\alpha} \, e^{(r - i \omega) x} \quad \text{on } I. $$ The two functions \(e^{(r + i \omega) x}\) and \(e^{(r - i \omega) x}\) are \(\mathbb C\)-linearly independent on \(I\) : indeed, if they were dependent, their quotient \(e^{2 i \omega x}\) would be constant on \(I\), which is impossible since its derivative \(2 i \omega \, e^{2 i \omega x}\) is non-zero. Identifying coefficients in the equality above therefore forces \(\alpha = \overline{\beta}\), i.e.\ \(\beta = \overline{\alpha}\). Conversely, if \(\beta = \overline{\alpha}\) then $$ \alpha \, e^{i \omega x} + \overline{\alpha} \, e^{- i \omega x} \ = \ 2 \operatorname{Re}(\alpha \, e^{i \omega x}) \ = \ 2 \operatorname{Re}(\alpha) \cos(\omega x) - 2 \operatorname{Im}(\alpha) \sin(\omega x), $$ so setting \(\lambda = 2 \operatorname{Re}(\alpha)\) and \(\mu = - 2 \operatorname{Im}(\alpha)\), we get \(y(x) = e^{r x} (\lambda \cos(\omega x) + \mu \sin(\omega x))\). Both \(\lambda, \mu \in \mathbb R\) can be chosen arbitrarily by appropriate choice of \(\alpha \in \mathbb C\), so the real solution space has dimension \(2\) over \(\mathbb R\) with basis \((x \mapsto e^{r x} \cos(\omega x), \ x \mapsto e^{r x} \sin(\omega x))\).
Method — Solving \(y'' + a y' + b y \equal 0\) over \(\mathbb R\)
In 3 steps : - Compute the discriminant \(\Delta = a^2 - 4 b\) of \(X^2 + a X + b\).
- Factor the characteristic polynomial : two distinct real roots if \(\Delta > 0\), a double real root if \(\Delta = 0\), two complex conjugate roots \(r \pm i \omega\) if \(\Delta < 0\).
- Write the general solution per the table above (\(\Delta > 0\) : exponentials ; \(\Delta = 0\) : polynomial times exponential ; \(\Delta < 0\) : exponential times \(\cos / \sin\)).
Example — Two distinct real roots (\(\Delta > 0\))
Solve \(y'' - 3 y' + 2 y = 0\) on \(\mathbb R\). Characteristic polynomial \(X^2 - 3 X + 2 = (X - 1)(X - 2)\), so \(\Delta = 9 - 8 = 1 > 0\) with roots \(r = 1\) and \(r' = 2\). General solution : $$ y(x) \ = \ \lambda \, e^x + \mu \, e^{2 x}, \qquad \lambda, \mu \in \mathbb R. $$ Example — Double real root (\(\Delta \equal 0\))
Solve \(y'' - 2 y' + y = 0\) on \(\mathbb R\). Characteristic polynomial \(X^2 - 2 X + 1 = (X - 1)^2\), double root \(r = 1\) (\(\Delta = 0\)). General solution : $$ y(x) \ = \ (\lambda x + \mu) \, e^x, \qquad \lambda, \mu \in \mathbb R. $$ This is the critically damped regime in physics (e.g.\ for the linearised harmonic oscillator at the boundary between under- and over-damped behaviour). Example — Complex conjugate roots (\(\Delta < 0\))
Pure imaginary roots (the harmonic oscillator). Solve \(y'' + 4 y = 0\) on \(\mathbb R\). Characteristic polynomial \(X^2 + 4\), \(\Delta = -16 < 0\), roots \(\pm 2 i\) (so \(r = 0\) and \(\omega = 2\)). General solution : $$ y(x) \ = \ \lambda \cos(2 x) + \mu \sin(2 x), \qquad \lambda, \mu \in \mathbb R. $$ Roots with non-zero real part (damped oscillator). Solve \(y'' + 2 y' + 10 y = 0\) on \(\mathbb R\). Characteristic polynomial \(X^2 + 2 X + 10 = (X + 1)^2 + 9\), \(\Delta = 4 - 40 = -36 < 0\), roots \(-1 \pm 3 i\) (so \(r = -1\) and \(\omega = 3\)). General solution : $$ y(x) \ = \ e^{-x} \bigl( \lambda \cos(3 x) + \mu \sin(3 x) \bigr), \qquad \lambda, \mu \in \mathbb R. $$ The \(e^{-x}\) factor encodes the exponential damping ; the \(\cos(3 x), \sin(3 x)\) part the oscillation at angular frequency \(3\). Skills to practice
- Solving homogeneous second-order ODEs
II.2
Complete equation\(\virgule\) superposition\(\virgule\) Cauchy (admitted)
The complete equation \(y'' + a y' + b y = f(x)\) has solution set \(S = y_{\mathrm{part}} + S_0\), an affine plane. The superposition principle holds as it did for the first-order complete equation : if \(y_k\) solves \(y'' + a y' + b y = f_k\) for \(k = 1, 2\), then \(\lambda_1 y_1 + \lambda_2 y_2\) solves the equation with right-hand side \(\lambda_1 f_1 + \lambda_2 f_2\). The Cauchy problem at second order requires two initial conditions : \(y(x_0) = y_0\) and \(y'(x_0) = y_0'\). Its existence-and-uniqueness theorem is stated here and admitted ; the proof is out of program.
Proposition — Superposition principle at second order
Let \(a, b \in \mathbb{K}\) and \(f_1, f_2 \in C(I, \mathbb{K})\). If \(y_1\) solves \(y'' + a y' + b y = f_1(x)\) on \(I\) and \(y_2\) solves \(y'' + a y' + b y = f_2(x)\) on \(I\), then for all \(\lambda_1, \lambda_2 \in \mathbb{K}\), the function \(\lambda_1 y_1 + \lambda_2 y_2\) solves $$ y''(x) + a \, y'(x) + b \, y(x) \ = \ \lambda_1 f_1(x) + \lambda_2 f_2(x) \qquad \text{on } I. $$
By linearity of differentiation and of the multiplication by \(a, b\), $$ (\lambda_1 y_1 + \lambda_2 y_2)'' + a (\lambda_1 y_1 + \lambda_2 y_2)' + b (\lambda_1 y_1 + \lambda_2 y_2) \ = \ \lambda_1 (y_1'' + a y_1' + b y_1) + \lambda_2 (y_2'' + a y_2' + b y_2) \ = \ \lambda_1 f_1 + \lambda_2 f_2. $$
Proposition — Affine-plane structure of the solution set
Let \(a, b \in \mathbb{K}\), \(f \in C(I, \mathbb{K})\), and assume the equation \(y'' + a y' + b y = f(x)\) admits at least one solution \(y_{\mathrm{part}} \in C^2(I, \mathbb{K})\). Then $$ S \ = \ y_{\mathrm{part}} + S_0, $$ where \(S_0\) is the \(2\)-dimensional space of homogeneous solutions. In particular, \(S\) is an affine plane in \(C^2(I, \mathbb{K})\).
Direct corollary of superposition, mirroring the first-order complete-equation argument. Let \(y \in S\) be any solution of the complete equation ; then \(y\) and \(y_{\mathrm{part}}\) both solve the same complete equation, so by superposition (with \(\lambda_1 = 1\), \(\lambda_2 = -1\)), \(y - y_{\mathrm{part}}\) solves the homogeneous equation, i.e.\ \(y - y_{\mathrm{part}} \in S_0\). Conversely, for any \(y_0 \in S_0\), superposition gives \((y_{\mathrm{part}} + y_0)'' + a (y_{\mathrm{part}} + y_0)' + b (y_{\mathrm{part}} + y_0) = f + 0 = f\), so \(y_{\mathrm{part}} + y_0 \in S\).
Theorem — Cauchy problem at second order
Let \(a, b \in \mathbb{K}\), \(f \in C(I, \mathbb{K})\), \(x_0 \in I\), and \((y_0, y_0') \in \mathbb{K}^2\). The Cauchy problem $$ \left\{ \begin{aligned} y''(x) + a \, y'(x) + b \, y(x) \ &= \ f(x) \quad \text{on } I, \\
y(x_0) \ &= \ y_0, \\
y'(x_0) \ &= \ y_0', \end{aligned} \right. $$ has a unique solution on \(I\). In particular, taking arbitrary initial data gives the existence of at least one particular solution of the complete equation, which retroactively validates the affine-plane structure stated above.
Admitted at this level; see the Remark below for the proof status.
On the proof status
This theorem is admitted : the proof is out of program (programme 2021 p. 12, « la démonstration de ce résultat est hors programme »). A constructive proof reduces the second-order problem to a first-order Cauchy problem via the substitution \(y = z e^{r x}\) with \(r\) a root of the characteristic polynomial, then applies the first-order Cauchy theorem proven above.
Method — Solving a Cauchy problem at second order
To solve \(\{y'' + a y' + b y = f(x), \ y(x_0) = y_0, \ y'(x_0) = y_0'\}\) on \(I\) : - Solve the homogeneous equation \(y'' + a y' + b y = 0\) (real homogeneous case) : \(2\)-parameter family \(S_0\).
- Find a particular solution \(y_{\mathrm{part}}\) of the complete equation using the polynomial-exponential ansatz.
- Write the general solution \(y(x) = y_{\mathrm{part}}(x) + y_h(x)\) with \(y_h \in S_0\) (two free parameters).
- Impose the two initial conditions \(y(x_0) = y_0\) and \(y'(x_0) = y_0'\) : a linear system in the two free parameters, with a unique solution by the theorem.
Example — Cauchy problem with two conditions
On \(\mathbb R\), solve \(\{y'' - y = 2 \cos x + e^x, \ y(0) = -1, \ y'(0) = 0\}\).Homogeneous part. Characteristic polynomial \(X^2 - 1 = (X - 1)(X + 1)\), two distinct real roots \(\pm 1\), \(\Delta = 4 > 0\). Homogeneous solutions \(\lambda e^x + \mu e^{-x}\).
Particular solution by superposition. Split the right-hand side into \(f_1(x) = 2 \cos x\) and \(f_2(x) = e^x\), then sum particular solutions.
- For \(y'' - y = 2 \cos x\), use the complex method from the practical-recipes section : seek a complex solution of \(y'' - y = 2 e^{i x}\) as \(y_p(x) = \alpha e^{i x}\). Computing \(y_p'' - y_p = (-1 - 1) \alpha e^{i x} = - 2 \alpha e^{i x} = 2 e^{i x}\) gives \(\alpha = -1\), so \(y_p(x) = - e^{i x}\). The real solution of \(y'' - y = 2 \cos x\) is \(\operatorname{Re}(- e^{i x}) = -\cos x\).
- For \(y'' - y = e^x\), here \(P(x) = 1\) has degree \(0\), and \(u = 1\) is a simple root of \(X^2 - 1\) (\(m = 1\)). The ansatz is \(y_p(x) = x \, Q(x) \, e^x\) with \(Q\) of degree at most \(0\), i.e.\ \(Q(x) = a\) constant : \(y_p(x) = a x e^x\). Computing \(y_p''(x) = a (x e^x + 2 e^x)\), so \(y_p'' - y_p = 2 a e^x = e^x\) gives \(a = 1/2\). Hence \(y_p(x) = x e^x / 2\).
General solution. \(y(x) = \lambda e^x + \mu e^{-x} + x e^x/2 - \cos x\).
Initial conditions. Compute \(y'(x) = \lambda e^x - \mu e^{-x} + e^x/2 + x e^x/2 + \sin x\). Then $$ \begin{aligned} y(0) \ &= \ \lambda + \mu - 1 \ = \ - 1 && \Longrightarrow \quad \lambda + \mu \ = \ 0, \\ y'(0) \ &= \ \lambda - \mu + 1/2 \ = \ 0 && \Longrightarrow \quad \lambda - \mu \ = \ -1/2, \end{aligned} $$ so \(\lambda = -1/4\), \(\mu = 1/4\). The unique solution is $$ y(x) \ = \ \dfrac{(2 x - 1) \, e^x + e^{-x}}{4} - \cos x. $$
Skills to practice
- Solving second-order Cauchy problems
II.3
Practical recipes\(\virgule\) polynomial-exponential ansatz
The program lists three categories of right-hand side the student must master : polynomial, \(\alpha \, e^{\lambda x}\) with \((\alpha, \lambda) \in \mathbb C^2\), and \(\beta \cos(\omega x) / \beta \sin(\omega x)\) with \((\beta, \omega) \in \mathbb R^2\). All three are subsumed by the unified ansatz, stated over \(\mathbb C\) first : for a (possibly complexified) right-hand side of the form \(P(x) \, e^{u x}\) with \(P \in \mathbb C[X]\) and \(u \in \mathbb C\), seek a complex particular solution of the form \(x^m \, Q(x) \, e^{u x}\) where \(Q \in \mathbb C[X]\) has degree at most \(\deg P\), and \(m \in \{0, 1, 2\}\) is the multiplicity of \(u\) as a root of the characteristic polynomial \(X^2 + a X + b\). For a real equation with a trigonometric right-hand side, complexify (\(\beta \cos(\omega x) = \operatorname{Re}(\beta e^{i \omega x})\)), solve the complexified equation by the same ansatz, then take real (resp.\ imaginary) parts at the end. This is the same \(\operatorname{Re}(e^{(a + i b) x})\) reflex from the chapter Primitives.
Method — Polynomial-exponential ansatz over \(\mathbb C\)
For the complexified equation \(y'' + a y' + b y = P(x) \, e^{u x}\) with \(P \in \mathbb C[X]\) non-zero and \(u \in \mathbb C\) : - Compute the multiplicity \(m \in \{0, 1, 2\}\) of \(u\) as a root of the characteristic polynomial \(X^2 + a X + b\) (\(m = 0\) if \(u\) is not a root, \(m = 1\) if simple root, \(m = 2\) if double root).
- Seek a complex particular solution of the form $$ y_p(x) \ = \ x^m \, Q(x) \, e^{u x}, $$ where \(Q \in \mathbb C[X]\) has degree at most \(\deg P\).
- In practice, take \(Q\) as a generic polynomial of degree \(\deg P\), inject the ansatz in the equation, expand, and identify coefficients of like powers of \(x\) to determine \(Q\).
Example — Polynomial right-hand side (\(m \equal 0\))
On \(\mathbb R\), solve \(y'' - 4 y = x^2 + 1\). The right-hand side \(x^2 + 1\) has the form \(P(x) \, e^{0 \cdot x}\) with \(P(x) = x^2 + 1\) and \(u = 0\). Since \(0\) is not a root of \(X^2 - 4 = (X - 2)(X + 2)\), \(m = 0\). The ansatz \(y_p(x) = x^0 \, Q(x) \, e^{0 \cdot x} = Q(x)\) with \(Q\) of degree at most \(2\) : \(y_p(x) = a x^2 + b x + c\) with \(a, b, c \in \mathbb R\). Computing \(y_p''(x) = 2 a\), so $$ y_p'' - 4 y_p \ = \ 2 a - 4 (a x^2 + b x + c) \ = \ - 4 a \, x^2 - 4 b \, x + (2 a - 4 c). $$ Identification with \(x^2 + 1\) gives \(- 4 a = 1\) (so \(a = - 1/4\)), \(- 4 b = 0\) (\(b = 0\)), and \(2 a - 4 c = 1\) (so \(c = (2 a - 1)/4 = - 3/8\)). A particular solution is \(y_p(x) = - x^2/4 - 3/8\). General solution : \(y(x) = \lambda e^{2 x} + \mu e^{- 2 x} - x^2/4 - 3/8\). Example — Exponential right-hand side with resonance (\(m \equal 1\))
On \(\mathbb R\), solve \(y'' - 3 y' + 2 y = (x + 2) e^x\). The characteristic polynomial is \(X^2 - 3 X + 2 = (X - 1)(X - 2)\), with simple roots \(1\) and \(2\). The right-hand side is \(P(x) e^{u x}\) with \(P(x) = x + 2\) (degree \(1\)) and \(u = 1\), which is a simple root of the characteristic polynomial, so \(m = 1\).By the ansatz, we seek \(y_p(x) = x \, Q(x) \, e^x\) with \(Q\) of degree at most \(1\), i.e.\ \(Q(x) = a x + b\). So $$ y_p(x) \ = \ x (a x + b) \, e^x \ = \ (a x^2 + b x) \, e^x. $$ Compute : $$ \begin{aligned} y_p'(x) \ &= \ (2 a x + b) e^x + (a x^2 + b x) e^x \ = \ (a x^2 + (2 a + b) x + b) e^x, \\ y_p''(x) \ &= \ (2 a x + 2 a + b) e^x + (a x^2 + (2 a + b) x + b) e^x \ = \ (a x^2 + (4 a + b) x + (2 a + 2 b)) e^x. \end{aligned} $$ Then $$ y_p'' - 3 y_p' + 2 y_p \ = \ e^x \bigl( a x^2 (1 - 3 + 2) + x (4 a + b - 3 (2 a + b) + 2 b) + (2 a + 2 b - 3 b) \bigr) \ = \ e^x \bigl( - 2 a \, x + (2 a - b) \bigr). $$ Identification with \((x + 2) e^x\) gives \(- 2 a = 1\) (\(a = -1/2\)) and \(2 a - b = 2\) (\(b = 2 a - 2 = -3\)). A particular solution is \(y_p(x) = (- x^2/2 - 3 x) e^x = -\dfrac{x (x + 6)}{2} \, e^x\). General solution : \(y(x) = \lambda e^x + \mu e^{2 x} -\dfrac{x (x + 6)}{2} \, e^x\).
Example — Trigonometric right-hand side with resonance (\(m \equal 1\)) via the complex method
On \(\mathbb R\), solve \(y'' + 4 y = 3 \sin(2 x)\). The characteristic polynomial is \(X^2 + 4 = (X - 2 i)(X + 2 i)\), with simple roots \(\pm 2 i\).Complexification. Write \(3 \sin(2 x) = \operatorname{Im}(3 \, e^{2 i x})\). Solve the complexified equation \(y'' + 4 y = 3 \, e^{2 i x}\). Here \(P(x) = 3\) has degree \(0\), and \(u = 2 i\) is a simple root of the characteristic polynomial, so \(m = 1\). The ansatz is \(y_p(x) = x \, Q(x) \, e^{2 i x}\) with \(Q\) of degree at most \(0\), i.e.\ \(Q(x) = a\) a complex constant. So $$ y_p(x) \ = \ a \, x \, e^{2 i x}, \qquad a \in \mathbb C. $$ Compute : $$ \begin{aligned} y_p'(x) \ &= \ a \, e^{2 i x} + 2 i a x \, e^{2 i x} \ = \ a (1 + 2 i x) \, e^{2 i x}, \\ y_p''(x) \ &= \ 2 i a \, e^{2 i x} + a (1 + 2 i x) \cdot 2 i \, e^{2 i x} \ = \ a \, e^{2 i x} (2 i + 2 i (1 + 2 i x)) \ = \ a \, e^{2 i x} (4 i - 4 x). \end{aligned} $$ Then $$ y_p'' + 4 y_p \ = \ a \, e^{2 i x} (4 i - 4 x + 4 x) \ = \ 4 i a \, e^{2 i x}. $$ Identification with \(3 \, e^{2 i x}\) gives \(4 i a = 3\), hence \(a = 3 / (4 i) = - 3 i/4\). So a complex particular solution is $$ y_p(x) \ = \ - \dfrac{3 i}{4} \, x \, e^{2 i x} \ = \ - \dfrac{3 i}{4} \, x \, (\cos(2 x) + i \sin(2 x)) \ = \ \dfrac{3 x}{4} \, \sin(2 x) - \dfrac{3 i x}{4} \, \cos(2 x). $$ Taking the imaginary part : \(\operatorname{Im}(y_p)(x) = - \dfrac{3 x}{4} \, \cos(2 x)\). This is a real particular solution of \(y'' + 4 y = 3 \sin(2 x)\). General real solution : $$ y(x) \ = \ \lambda \cos(2 x) + \mu \sin(2 x) - \dfrac{3 x}{4} \, \cos(2 x), \qquad \lambda, \mu \in \mathbb R. $$ The \(x \cdot \cos(2 x)\) factor reveals the resonance : the right-hand side oscillates at the same angular frequency \(\omega = 2\) as the homogeneous solutions, producing an unbounded particular solution. This is the same phenomenon as the \(x e^x\) ansatz in the previous example (multiplicity \(m = 1\) in both cases).
Cross-link to chapter Primitives
The complex method here is the same \(\operatorname{Re}(e^{(a + i b) x})\) reflex used in the chapter Primitives to compute primitives of \(e^{a x} \cos(b x)\) and \(e^{a x} \sin(b x)\). The student should recognize the pattern : whenever a real ODE has a \(\cos / \sin\) right-hand side, complexify to \(e^{i \omega x}\), solve in \(\mathbb C\), then take real or imaginary parts at the end.
Skills to practice
- Finding particular solutions by polynomial-exponential ansatz
Jump to section