French flag Arrows English flag
Sun Arrows Moon
Return Index

Solving second order lin. diff. equations \( (EDL_2) \) with constants coefficients

Let \( y \) be a function of class \( \mathbb{C}^{2}\) on an interval \( I\).

In this part, we will show the function \( y(x) \) under its simplified form \( y\).

As well, let \( (a, b) \in \hspace{0.05em} \mathbb{R}^2\) be two coefficients and \( f(x)\) any function.


Let \( (E) \) be a linear differential equation of order \( 2 \), and \( (H) \) its associated homogeneous equation:

$$ \Biggl \{ \begin{align*} y'' + ay' + by = f(x) \qquad (E) \\ y'' + ay' + by = 0 \qquad (H) \end{align*} $$


Solving the homogeneous equation \( (H) \)

\( y_h = 0 \) is solution, but considering \( y_h \) as a non-zero function, we will have in the first place to calculate the discriminant \( \Delta \) of the characteristic equation \( (E_c) \):

$$ r^2 + a r + b = 0 \qquad (E_c) $$

After examining the discriminant\( (\Delta = a^2 -4b) \), depending on the case the function \(y_h\) will be an homogeneous solution of \( (H) \) :


Solving the general equation \( (E) \)

Having determinded the constants \((c_1, c_2) \) and the solutions \((y_1, y_2) \) according to the result of the calculation of \(\Delta\), we had for the solution of \((H) \) that:

$$ y_h = c_1y_1 + c_2y_2 $$

To determine a specific solution for \( (E) \), we solve the system \( (S) \):

$$ (S) \ \Biggl \{ \begin{align*} c_1'y_1 + c_2'y_2 = 0 \\ c_1' y_1' + c_2' y_2' = f(x) \end{align*}$$

$$ (S) \Longleftrightarrow \ \begin{bmatrix} y_1 & y_2\\ y_1' & y_2' \end{bmatrix} \times \begin{bmatrix} c_1' \\ c_2' \end{bmatrix} = \begin{bmatrix} \ \ 0 \\ f(x) \end{bmatrix} $$

If the determinant \(det(Y) = \begin{vmatrix} y_1 & y_2\\ y_1' & y_2' \end{vmatrix} = y_1y_2' - y_1'y_2 \neq 0\), then the system \( (S) \) admits solutions which are:

$$ \ \left \{ \begin{align*} c_1' = \frac{-y_2 f(x)}{ y_1y_2' -y_1'y_2 } \\ c_2' = \frac{y_1 f(x)}{ y_1y_2' -y_1'y_2 } \end{align*} \right \}$$

The function \(y_s\) will be a specific solution of \( (E) \):

$$ y_s= c_1(x) y_1 + c_2(x) y_1 $$

$$with \ \left \{ \begin{align*} c_1(x) = \int^x \frac{-y_2 f(t)}{ y_1y_2' -y_1'y_2 } \ dt \\ c_2(x) = \int^x \frac{y_1 f(t)}{ y_1y_2' -y_1'y_2 } \ dt \end{align*} \right \}$$


We will have as a total solution of \( (E) \), the addition of these two solutions:

$$ y_t= y_h + y_s $$



Demonstration

Let \( y \) be a function of class \( \mathbb{C}^{2}\) on an interval \( I\).

In this part, we will show the function \( y(x) \) under its simplified form \( y\).

As well, let \( (a, b) \in \hspace{0.05em} \mathbb{R}^2\) be two coefficients and \( f(x)\) any function.


Solving a second order linear differential equation \((EDL_2)\) with constant coefficients consists of finding functions \( y(x) : x \longmapsto y\), which are solutions of an equation of type:

$$ y'' + ay' + by = f(x) \qquad (E) $$

We can first find a homogeneous solution \( y_h \) to the homogeneous equation \( ( H) \):

$$ y'' + ay' + by = 0 \qquad (H) $$

\( y_h = 0 \) is an obvious solution, but let us consider \( y_h \) as a non-zero function...


If \( y_h \) is a homogeneous solution to the equation \( ( H) \), and \( y_s \) is a solution specific to the equation \( ( E) \), then:

$$ \Biggl \{ \begin{align*} y_s'' + ay_p' + b y_s = f(x) \qquad (E) \\ y_h'' + ay_h' + b y_h = 0 \qquad (H) \end{align*} $$

By performing the operation \( ( H) + (E) \):

$$ (y_h)'' + (y_s)'' +a(y_h)' + a(y_s)' + b y_h + b y_s = f(x) \qquad (H+E) $$

Thanks to the linearity of the derivative, we notice that \( (y_h + y_s) \) remains solution of \( ( E) \), because:

$$(y_h + y_s)'' + a(y_h + y_s)' + b (y_h + y_s)(x) = f(x) $$

As a result, \( y_t \) will be a total solution of \( (E) \):

$$ y_t= y_h + y_s $$


Solving the homogeneous equation \( (H) \)

We call homogeneous equation \( (H) \), the equivalent of the equation \( (E) \) but without any right side member.

$$ y'' + ay' + by = 0 \qquad (H) $$

The first order linear differential equations with constant coefficient have as solution to the homogeneous equation, a function \(y_h\) of the form:

$$ y_h= Ke^{- ax } $$

Let us assume that those of the second order are too, with a general coefficient \( r \), still to determine.

$$ y_h= Ke^{rx } $$

From this hypothesis, the equation \( (H) \) becomes:

$$ K r^2 e^{rx} + Ka r e^{rx} + b Ke^{rx } = 0 $$

$$ Ke^{rx} (r^2 + a r + b ) = 0 $$

We end up with a quadratic equation, called the characteristic equation \( (E_c) \):

$$ r^2 + a r + b = 0 \qquad (E_c) $$

When we find ourselves faced with this type of equation, there are always three cases following the calculation of the discriminant \( \Delta = a^2 - 4b \), with the following link between coefficients \((a, b, c) \) and roots \((\alpha, \beta) \):


In all three cases, the relationship \((1)\) remains true if we consider \( \alpha, \beta \) as the two general roots of \( (E_c) \):

$$ \Biggl \{ \begin{align*} a = -(\alpha + \beta) \\ b = \alpha \beta \end{align*} \qquad (1) $$

Thanks to \( (1) \) , the equation \( (H) \) becomes \( (H^*) \):

$$ y'' + ay' + by = 0 \qquad (H) $$

$$ y'' -(\alpha + \beta)y' + \alpha \beta y = 0 $$

$$ (y'' -\alpha y') - \beta (y' -\alpha y) = 0 \qquad (H^*) $$

Now, setting down a new variable \( z \):

$$ \Biggl \{ \begin{align*} z = y' -\alpha y \qquad (z) \\ z' = y'' -\alpha y' \end{align*} $$

The equation \( (H^*) \) becomes a first order homogeneous equation:

$$ z' -\beta z = 0 \qquad (H_z)$$

having as solution:

$$ z_h = \mu\hspace{0.1em} e^{\beta x} \qquad (z_h)$$

But, with the two equations \( (z) \) and \( (z_h) \), we do obtain:

$$ \Biggl \{ \begin{align*} z = y' -\alpha y \qquad (z) \\ z_h = \mu\hspace{0.1em} e^{\beta x} \qquad (z_h) \end{align*} $$

Which brings us to a new first order equation:

$$ y' -\alpha y = \mu\hspace{0.1em} e^{\beta x} \qquad (E_2) $$

The solutions of \( (E_2) \) are then those that we are looking for \( (H) \)...


  1. Solving the transition equation \( (E_2) \)

  2. $$ y' -\alpha y = \mu\hspace{0.1em} e^{\beta x} \qquad (E_2) $$

    To solve a first order linear differential equation with constant coefficient, it is first necessary to solve the associated homogeneous equation \( (H_2) \).

    1. Solutions of the homogeneous transition equation \( (H_2) \)
    2. We then start from the equation \( (H_2) \):

      $$ y' -\alpha y = 0 \qquad (H_2) $$

      We know that this type of equation has the solution:

      $$y_h =\lambda\hspace{0.1em} e^{\alpha x} \qquad (y_h - H_2) $$

    3. Specific solutions of the transition equation \( (E_2) \)
    4. As for a first order linear differential equation with constant coefficient, we will look for a specific solution of the type:

      $$ y_s= \lambda(x) e^{\alpha x } \qquad (y_s - E_2) $$

      1. The method of the variations of parameters

      To do this, we can use the method of the variations of parameters, or use the coefficient identification method.

      $$ y_s' -\alpha y_s = \lambda'(x) e^{\alpha x } + \alpha \lambda(x) e^{\alpha x } - \alpha \lambda(x) e^{\alpha x } $$

      $$ y_s' -\alpha y_s = \lambda'(x) e^{\alpha x } \qquad (E_{2}(y_s)) $$

      Given the following system:

      $$ \Biggl \{ \begin{align*} y' -\alpha y = \mu\hspace{0.1em} e^{\beta x} \qquad (E_2) \\ y_s' -\alpha y_s = \lambda'(x) e^{\alpha x } \qquad (E_{2}(y_s)) \end{align*} $$

      Thanks to both equations \( (E) \) and \( (E_{2}(y_s)) \), we deduce an equation to solve, to determine \( K(x) \):

      $$ \lambda'(x) e^{\alpha x } = \mu\hspace{0.1em} e^{\beta x}$$

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\beta - \alpha) x} \qquad (\lambda') $$

      As seen above, three cases can be distinguished depending on the roots of \(E_c\):

      • \( \alpha) \ \Delta > 0 \): two distinct roots \( \alpha, \ \beta \)
      • \( \beta) \ \Delta = 0\): a double root \( \alpha \)
      • \( \gamma) \ \Delta < 0\): two conjugate complex roots \( \alpha , \overline{\alpha} \)

      In the three cases, we will add to our specific solution \(y_s\) of \((E_2)\), the homogeneous solution \(y_h\) to \((H_2)\) previously found:

      $$y_h =\lambda\hspace{0.1em} e^{\alpha x} \qquad (y_h - H_2) $$

      \( \alpha) \ \Delta > 0 \): two distinct roots \( \alpha, \ \beta \)

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\beta - \alpha) x} \qquad (\lambda') $$

      In this case, \( (\lambda')\) remains as is:

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\beta - \alpha) x} \qquad (\lambda' - \Delta_+) $$

      $$ \lambda(x) = \mu \int^x e^{(\beta - \alpha) t} \hspace{0.1em} dt$$

      $$ \lambda(x) = \frac{\mu}{(\beta - \alpha)} e^{(\beta - \alpha) x} \qquad (\lambda - \Delta_+) $$

      We inject the value of \( (\lambda - \Delta_+) \) into \( (y_h - H_2) \):

      $$ y_s = \frac{\mu}{(\beta - \alpha)} e^{(\beta - \alpha) x} e^{\alpha x} $$

      $$ y_s = \frac{\mu}{(\beta - \alpha)} e^{\beta x} $$

      We will then have a total solution \( y_t \) for \( (E_2 )\), and therefore fot \((H) \):

      $$ y_t = y_h + y_s $$

      $$ y_t = \lambda\hspace{0.1em} e^{\alpha x} + \frac{\mu}{(\beta - \alpha)} e^{\beta x} $$

      Considering the two roots \( (\alpha, \beta)\) of the characteristic equation \( (E_c) \), we do have a function \(y_h \), solution of the homogeneous equation \( (H )\):

      $$ y_h =c_1 \hspace{0.1em} e^{\alpha x} + c_2 e^{\beta x} \qquad (with \enspace (c_1,c_2) \in \hspace{0.05em} \mathbb{R}^2) $$

      The value of \( (\beta- \alpha)\) being absorbed by the constant \( c_2\).


      \( \beta) \ \Delta = 0\): a double root \( \alpha \)

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\beta - \alpha) x } \qquad (\lambda') $$

      In this case, \( \alpha = \beta \), then \( (\lambda')\) becomes:

      $$ \lambda'(x) = \mu \qquad \qquad (\lambda' - \Delta_0) $$

      We thus integrate the constant \( \mu \):

      $$ \lambda'(x) = \mu $$

      $$ \lambda(x) = \mu \int^x \hspace{0.1em} dt$$

      $$ \lambda(x) = \mu \hspace{0.2em} x \qquad (\lambda - \Delta_0) $$

      We then inject the value of \( (\lambda - \Delta_0) \) into \( (y_h - H_2) \):

      $$ y_s = \mu \hspace{0.2em} x \hspace{0.2em} e^{\alpha x} $$

      In the end, we do have a total solution \( y_t \) for \( (E_2 )\), and therefore for \((H) \):

      $$ y_t = y_h + y_s $$

      $$ y_t = \lambda\hspace{0.1em} e^{\alpha x} + \mu \hspace{0.2em} x \hspace{0.2em} e^{\alpha x} $$

      Considering the double root \( \alpha \) of the characteristic equation \( (E_c) \), we have a function \(y_h \), solution of the homogeneous equation \( (H )\):

      $$ y_h =c_1 \hspace{0.1em} e^{\alpha x} +c_2 \hspace{0.2em} x \hspace{0.2em} e^{\alpha x} \qquad (with \enspace (c_1,c_2) \in \hspace{0.1em} \mathbb{R}^2) $$


      \( \gamma) \ \Delta < 0\): two conjugate complex roots \( \alpha , \overline{\alpha} \)

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\beta - \alpha) x} \qquad (\lambda') $$

      In this last case, \( \beta = \overset{-}{\alpha} \), so we have two conjugate roots of \( (E_c) \):

      $$ \left \{ \begin{align*} \alpha = \frac{ - a - i \sqrt{|\Delta|} }{2} \\ \overset{-}{\alpha}= \frac{ - a + i \sqrt{|\Delta|} }{2} \end{align*} \right \} $$

      So, \( (\lambda')\) becomes:

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{(\overset{-}{\alpha} - \alpha) x} \qquad (\lambda' - \Delta_-) $$

      For the sake of simplicity, we set down:

      $$ \left \{ \begin{align*} A = \frac{ - a }{2} \\ B = \frac{ \sqrt{|\Delta|}}{2} \end{align*} \right \} $$

      So that \( \alpha \) and \( \overset{-}{\alpha} \) should become:

      $$ \Biggl \{ \begin{align*} \alpha = A - iB \\ \overset{-}{\alpha}= A + iB \end{align*} $$

      And:

      $$ (\overset{-}{\alpha} - \alpha )= 2iB $$

      $$ \lambda'(x) = \mu\hspace{0.1em} e^{2iB x} \qquad (\lambda' - \Delta_-) $$

      We integrate it:

      $$ \lambda(x) = \mu \int^x e^{2iB t} \hspace{0.1em} dt$$

      $$ \lambda(x) = \frac{\mu}{2iB} e^{2iB x} \qquad (\lambda - \Delta_-) $$

      We no inject the value of \( (\lambda - \Delta_-) \) into \( (y_h - H_2) \):

      $$ y_s = \frac{\mu}{2iB} e^{2iB x} e^{\alpha x} $$

      $$ y_s = \frac{\mu}{2iB} e^{2iB x} e^{(A - iB) x} $$

      $$ y_s = \frac{\mu}{2iB} e^{(A + iB) x} $$

      We then have a total solution \( y_t \) for \( (E_2 )\), and therefore for \((H) \):

      $$ y_t = y_h + y_s $$

      $$ y_t = \lambda\hspace{0.1em} e^{(A-iB) x} + \frac{\mu}{2iB} e^{(A + iB) x} \qquad (y_t - E_2) $$

      We know that complex numbers can be written under their exponential form:

      $$ \Biggl \{ \begin{gather*} e^{ipx}= cos(px) + isin(px) \\ e^{-ipx} = cos(px) - isin(px) \end{gather*} $$

      $$ y_t = e^{Ax} \Biggl[\lambda\hspace{0.1em} e^{-iB x} + \frac{\mu}{2iB} e^{iB x} \Biggr] $$

      $$ y_t = e^{Ax} \Biggl[\lambda \hspace{0.1em} \Bigl(cos(Bx) - i sin(Bx)\Bigr) + \frac{\mu}{2iB} \Bigl(cos(Bx) + i sin(Bx)\Bigr) \Biggr] $$

      $$ y_t = e^{Ax} \Biggl[\lambda cos(Bx) - \lambda i sin(Bx) + \frac{\mu}{2iB} cos(Bx) + \frac{\mu}{2B} sin(Bx) \Biggr] $$


      Looking for real solutions of \( (E_2 )\), and therefore of \((H) \), we will only keep the real part of it:

      $$ y_t = \hspace{0.1em}\underbrace { e^{Ax} \Biggl[ \lambda cos(Bx) + \frac{\mu}{2B} sin(Bx) \Biggr] } _\text{partie réelle } \hspace{0.1em}-\hspace{0.1em} \underbrace { e^{Ax} \Biggl[ \lambda i sin(Bx) + \frac{\mu}{2iB} cos(Bx) \Biggr] } _\text{partie imaginaire }$$

      $$ y_t = e^{Ax} \Biggl[ \lambda cos(Bx) + \frac{\mu}{2B} sin(Bx) \Biggr] $$


      Considering the two conjugate complex roots \( (\alpha, \overset{-}{\alpha})\) of the characteristic equation \( (E_c) \):

      $$ \Biggl \{ \begin{align*} \alpha = A -iB \\ \overline{\alpha} = A +iB \end{align*}$$

      We have a function \(y_h \) solution of the homogeneous equation \( (H )\):

      $$ y_h = e^{Ax} \Biggl[c_1\hspace{0.1em} cos(Bx) +c_2 \hspace{0.1em} sin(Bx) \Biggr] \qquad with \enspace \Biggl \{ \begin{align*} (c_1,c_2)\in \hspace{0.05em}\mathbb{R}^2 \\ A = \frac{ - a }{2} \enspace et \enspace B = \frac{ \sqrt{|\Delta|} }{2} \end{align*} $$

      The value of \( \frac{\mu}{2B}\) being absorbed by the constant \( c_2\).


Solving the general equation \( (E) \)

Knowing a solution to the homogeneous equation \( (H) \), we can start from this one to find a specific solution of \( (E) \).


  1. Method of the variation of parameters

  2. Indeed, we are going to look for a specific solution \( y_s \) of type:

    $$ y_s= c_1(x) y_1 + c_2(x)y_2 \qquad (y_s) $$

    In the same way as before, we will write the functions \( c_1(x), c_2(x) \) in a simplified form \( c_1, c_2\).

    Here, the functions \( y_1, y_2\) correspond to the exponential part of the homogeneous solution according to the result of the calculation of \( \Delta\).

    For example, for \(\Delta > 0\):

    $$ \Biggl \{ \begin{align*} y_1 = e^{\alpha x} \\ y_2 = e^{\beta x} \end{align*}$$

    Let us rewrite \( y_s \) under its simplified form, so:

    $$ y_s= c_1 y_1 + c_2 y_2 \qquad (y_s) $$

    By applying the method of the variations of parameters (or Lagrange's method), we do have:

    $$y_s'' + a.y_s' + b.y_s = c_1'' y_1 + 2 c_1' y_1' + c_1 y_1'' + c_2'' y_2 + 2 c_2'y_2' + c_2 y_2'' + a . c_1' y_1 + a. c_1 y_1' + a.c_2'y_2 +a.c_2 y_2' + b.c_1 y_1 +b.c_2 y_2 = f(x) $$

    We notice that two times three terms put together can satisfy the homogeneous equation \( (H) \):

    $$ \Biggl \{ \begin{align*} c_1 y_1'' + a. c_1 y_1' + b.c_1 y_1 = 0 \\ c_2 y_2'' + a . c_2 y_2' + b.c_2 y_2 = 0 \end{align*}$$

    $$ \underbrace{ c_1 y_1'' + a . c_1 y_1' + b.c_1 y_1 } _\text{ \(= \ 0\)} \hspace{0.1em} + \hspace{0.1em} \underbrace{ c_2 y_2'' + a . c_2 y_2' + b.c_2 y_2 } _\text{ \(= \ 0\)} \hspace{0.1em} + c_1'' y_1 + c_2'' y_2 + 2c_1' y_1' + 2c_2' y_2'+ ac_1' y_1 + ac_2' y_2 = f(x) $$

    So, all that remains is:

    $$ c_1'' y_1 + c_2'' y_2 + 2.c_1' y_1' + 2.c_2' y_2'+ a.c_1' y_1 + a.c_2' y_2 = f(x) \qquad(2) $$

    Functions \(c_1, c_2\) now appear in their derivated form.

    For more simplicity, let us set down:

    $$ \Biggl \{ \begin{align*} c_1' = d_1 \\ c_2' = d_2 \end{align*}$$

    Now, the expression \((2)\) becomes \((3)\):

    $$ d_1'.y_1 + d_2'. y_2 + 2d_1. y_1' + 2d_2. y_2'+ ad_1. y_1 + ad_2. y_2 = f(x) \qquad(3) $$

    Nous obtenons alors une \(LDE_1\) with two unknown functions, and it is possible to impose a new condition, as long as it remains linearly independent of the initial equation.

    We then add the following condition \((C)\):

    $$ d_1.y_1 + d_2. y_2 = 0 \qquad(C) $$

    As a consequence of it, its derivative is also worth \(0\):

    $$ (d_1.y_1 + d_2. y_2)' = 0 \Longleftrightarrow d_1'.y_1 + d_1.y_1' + d_2'.y_2 + d_2.y_2' = 0 \qquad(C') $$

    So, the expression \((3)\) can be rewrite as:

    $$ \underbrace{ d_1'.y_1 + d_1. y_1' + d_2'. y_2 + d_2. y_2' } _\text{ \(= \ 0\)} \hspace{0.1em} + d_1. y_1' + d_2. y_2' + a \underbrace{ (d_1. y_1 + d_2. y_2)} _\text{ \(= \ 0\)} \hspace{0.1em} = f(x) \qquad(3) $$

    All that remains of \((3)\) is:

    $$ d_1. y_1' + d_2. y_2' = f(x) \qquad(3^*) $$


    Now, to determine both functions \((c_1, c_2)\), it remains to find the solutions of the system with two equations:

    $$ (S) \ \Biggl \{ \begin{align*} d_1.y_1 + d_2. y_2 = 0 \\ d_1. y_1' + d_2. y_2' = f(x) \end{align*}$$

    So by rewriting our variables in their initial form for the functions \((c_1, c_2)\):

    $$ (S) \ \Biggl \{ \begin{align*} c_1'.y_1 + c_2'. y_2 = 0 \\ c_1'. y_1' + c_2'. y_2' = f(x) \end{align*}$$

    Our system \((S)\) is now equivalent to a matrix system:

    $$ (S) \Longleftrightarrow \ \begin{bmatrix} y_1 & y_2\\ y_1' & y_2' \end{bmatrix} \times \begin{bmatrix} c_1' \\ c_2' \end{bmatrix} = \begin{bmatrix} \ \ 0 \\ f(x) \end{bmatrix} $$

    $$ (S) \Longleftrightarrow \ Y \times C = F $$

    To solve \((S)\), we first calculate the matrix \(Y\) determinant:

    $$ det(Y) = \begin{vmatrix} y_1 & y_2\\ y_1' & y_2' \end{vmatrix} = y_1y_2' -y_1'y_2 $$

    If \(det(Y) \neq 0\), then the system has solutions.

    Solutions for functions \((c_1', c_2')\) will then be of the form:

    $$ \enspace c_1' = \frac{det(Y_1)}{det(Y)}, \enspace c_2' = \frac{det(Y_2)}{det(Y)}$$

    Where \(Y_1, \ Y_2\) represent respectively the squared matrix formed by the matrix \(Y\) in which we have respectively inverted the \(1\)-st et \(2\)-nd column with the column matrix \(F\).

    Let us assume that \(det(Y) \neq 0\), then these solutions are:

    $$ c_1' = \frac{det(Y_1)}{det(Y)} = \frac{ \begin{vmatrix} \ \ \ 0 & y_2\\ f(x) & y_2' \end{vmatrix} } { \begin{vmatrix} y_1 & y_2\\ y_1' & y_2' \end{vmatrix} } = \frac{-y_2 f(x)}{ y_1y_2' -y_1'y_2 } $$

    $$ c_2' = \frac{det(Y_2)}{det(Y)} = \frac{ \begin{vmatrix} y_1 & \ \ \ 0 \\ y_1' & f(x) \end{vmatrix} } { \begin{vmatrix} y_1 & y_2\\ y_1' & y_2' \end{vmatrix} } = \frac{y_1 f(x)}{ y_1y_2' -y_1'y_2 } $$

    Having determined \((c_1', c_2')\), we can now integrate to determine \((c_1, c_2)\).

    $$ \Biggl \{ \begin{align*} c_1(x) = \int^x c_1'(x) \ dx \\ c_2(x) = \int^x c_2'(x) \ dx \end{align*}$$

    Function \(y_s\) will be specific solution of \( (E) \):

    $$ y_s= c_1(x) y_1 + c_2(x) y_1 $$

    $$with \ \left \{ \begin{align*} c_1(x) = \int^x \frac{-y_2 f(t)}{ y_1y_2' -y_1'y_2 } \ dt \\ c_2(x) = \int^x \frac{y_1 f(t)}{ y_1y_2' -y_1'y_2 } \ dt \end{align*} \right \}$$


Examples of solving second order linear differential equation \( (LDE_2) \) with constant coefficients


Here are several examples of how to resolve a \( EDL_2\) of the general form:

$$ y'' + a y' + by = f(x) \qquad (E) $$

  1. With a positive discriminant \((\Delta > 0)\)

  2. Let's solve the following equation \( (E)\):

    $$ y'' + 3 y' + 2y = x^2 \qquad (E) $$


    1. Solving the homogeneous equation \( (H) \)

    2. $$ y'' + 3 y' + 2y = 0 \qquad (H) $$

      We obtain as a characteristic equation \( (E_c) \):

      $$ r^2 + 3r + 2 = 0 \qquad (E_c) $$

      $$\Delta = \ 3^2 - \ 4 \times 2 = 1 $$

      We then have two distinct roots \( (\alpha, \ \beta) \):

      $$ \left \{ \begin{align*} \alpha = \frac{-a - \sqrt{\Delta}}{2} \\ \beta = \frac{-a + \sqrt{\Delta}}{2} \end{align*} \right \} \Longleftrightarrow \left \{ \alpha = -2, \ \beta = -1 \right \} $$

      Thus, the homogeneous solution of \( (H) \) is:

      $$ y_h = c_1\hspace{0.1em} e^{-2x} +c_2 \hspace{0.1em} e^{- x} \qquad (with \enspace (c_1,c_2) \in \hspace{0.05em} \mathbb{R}^2) $$


    3. Verification of the homogeneous solution \( y_h \)

    4. $$ y_h'' + 3 y_h' + 2y_h = ( c_1\hspace{0.1em}e^{-2x} +c_2 \hspace{0.1em} e^{- x})'' + 3 (c_1\hspace{0.1em}e^{-2x} +c_2 \hspace{0.1em}e^{- x})' + 2( c_1\hspace{0.1em}e^{-2x} +c_2 \hspace{0.1em}e^{- x}) $$

      $$ y_h'' + 3 y_h' + 2y_h = 4 c_1\hspace{0.1em}e^{-2x} +c_2 \hspace{0.1em} e^{- x} -6c_1\hspace{0.1em}e^{-2x} - 3c_2 \hspace{0.1em}e^{- x}+2c_1\hspace{0.1em}e^{-2x} +2c_2 \hspace{0.1em}e^{- x}$$

      $$ y_h'' + 3 y_h' + 2y_h = 0 $$

      \( y_h \) is definitely solution of \( (H) \).


    5. Solving the general equation \( (E) \)

    6. $$ y'' + 3 y' + 2y = x^2 \qquad (E) $$

      We now want to find a specific solution of the type:

      $$ y_s = c_1y_1 + c_2 y_2 \qquad(with \ (c_1, c_2) \ deux \ fonctions) $$

      We then have to solve the system \( (S) \):

      $$ (S) \ \Biggl \{ \begin{align*} c_1'.y_1 + c_2'. y_2 = 0 \\ c_1'. y_1' + c_2'. y_2' = x^2 \end{align*}$$

      $$ (S) \ \Biggl \{ \begin{align*} c_1'.e^{-2x} + c_2'. e^{-x} = 0 \\ c_1'. (e^{-2x})' + c_2'. (e^{-x})' = x^2 \end{align*}$$

      $$ (S) \ \Biggl \{ \begin{align*} c_1'.e^{-2x} + c_2'. e^{-x} = 0 \\ c_1'. (-2e^{-2x}) + c_2'. (-e^{-x}) = x^2 \end{align*}$$

      $$ (S) \Longleftrightarrow \ \begin{bmatrix} \ \ \ e^{-2x} & \ \ e^{-x}\\ -2e^{-2x} & -e^{-x} \end{bmatrix} \times \begin{bmatrix} c_1' \\ c_2' \end{bmatrix} = \begin{bmatrix} \ \ 0 \\ x^2 \end{bmatrix} $$

      $$ (S) \Longleftrightarrow \ Y \times C = F $$

      Let us calculate the determinant of the matrix \(Y\):

      $$ det(Y) = \begin{vmatrix} \ \ \ e^{-2x} & \ \ e^{-x}\\ -2e^{-2x} & -e^{-x} \end{vmatrix} = -e^{-3x} + 2e^{-3x} = e^{-3x} \neq 0 $$

      \(det(Y) \neq 0\) because the function \(g(x) : x \longmapsto e^{-3x}\) never cancels on \(\mathbb{R}\).


      We thus have for \((c_1', c_2')\):

      $$ c_1' = \frac{det(Y_1)}{det(Y)} = \frac{ \begin{vmatrix} 0 & \hspace{0.7em} e^{-x}\\ x^2 & -e^{-x} \end{vmatrix} } { \begin{vmatrix} \hspace{0.7em} e^{-2x} & \hspace{0.7em} e^{-x}\\ -2e^{-2x} & -e^{-x} \end{vmatrix} } = \frac{-e^{-x} x^2}{ e^{-3x} } $$

      $$ \Longrightarrow c_1' = - x^2 e^{2x}$$


      $$ c_2' = \frac{det(Y_2)}{det(Y)} = \frac{ \begin{vmatrix} \hspace{0.7em} e^{-2x} & 0 \\ -2e^{-2x} & x^2 \end{vmatrix} } { \begin{vmatrix} \hspace{0.7em} e^{-2x} & \hspace{0.7em} e^{-x}\\ -2e^{-2x} & -e^{-x} \end{vmatrix} } = \frac{e^{-2x} x^2}{ e^{-3x} } $$

      $$ \Longrightarrow c_2' =x^2 e^{x}$$


      It remains to integrate both \((c_1', c_2')\).

      Let's start with \(c_1'\).

      $$c_1(x) = \int^x c_1'(t) \ dt $$

      $$c_1(x) = \int^x - t^2 e^{2t} \ dt $$

      Let us perform an integration by parts with:

      $$ \Biggl \{ \begin{align*} u(t) = -t^2 \\ v'(t) = e^{2t} dt \end{align*} $$

      $$ \Biggl \{ \begin{align*} u'(t) = -2t \ dt \\ v(t) = \frac{1}{2} e^{2t} \end{align*} $$

      $$c_1(x) = \Biggl[\frac{-t^2}{2} e^{2t} \Biggr]^x + \int^x t \ e^{2t} dt $$

      $$ \Biggl \{ \begin{align*} u(t) = t \\ v'(t) = e^{2t} dt \end{align*} $$

      $$ \Biggl \{ \begin{align*} u'(t) = dt \\ v(t) = \frac{1}{2} e^{2t} \end{align*} $$

      $$c_1(x) = \Biggl[\frac{-t^2}{2} e^{2t} \Biggr]^x + \Biggl[\frac{t}{2} e^{2t} \Biggr]^x - \int^x \frac{1}{2} \ e^{2t} dt $$

      $$c_1(x) = \Biggl[\frac{-t^2}{2} e^{2t} \Biggr]^x + \Biggl[\frac{t}{2} e^{2t} \Biggr]^x - \Biggl[\frac{1}{4} e^{2t} \Biggr]^x $$

      $$c_1(x) = \frac{-x^2}{2} e^{2x} + \frac{x}{2} e^{2x} - \frac{1}{4} e^{2x} $$

      $$c_1(x) = e^{2x} \Biggl[ \frac{-x^2}{2} + \frac{x}{2} - \frac{1}{4} \Biggr] $$


      We now integrate \(c_2'\).

      $$c_2(x) = \int^x c_2'(t) \ dt $$

      $$c_2(x) = \int^x t^2 e^{t} \ dt $$

      $$ \Biggl \{ \begin{align*} u(t) = t^2 \\ v'(t) = e^{t} dt \end{align*} $$

      $$ \Biggl \{ \begin{align*} u'(t) = 2t \ dt \\ v(t) = e^{t} \end{align*} $$

      $$c_2(x) = \Biggl[t^2 e^{t} \Biggr]^x -2 \int^x t \ e^{2t} dt $$

      $$ \Biggl \{ \begin{align*} u(t) = t \\ v'(t) = e^{t} dt \end{align*} $$

      $$ \Biggl \{ \begin{align*} u'(t) = dt \\ v(t) = e^{t} \end{align*} $$

      $$c_2(x) = \Biggl[t^2 e^{t} \Biggr]^x -2 \Biggl( \Bigl[t e^{t} \Bigr]^x - \int^x e^{t} dt \Biggr) $$

      $$c_2(x) =\Biggl[t^2 e^{t} \Biggr]^x -2 \Bigl[t e^{t} \Bigr]^x + 2 \Bigl[ e^{t} \Bigr]^x $$

      $$c_2(x) = x^2 e^{x} -2 x e^{x} + 2 e^{x} $$

      $$c_2(x) = e^{x} \Biggl[ x^2 -2 x + 2 \Biggr] $$

      Finally, we do have two specific solutions to add:

      $$y_s = y_1 c_1 + c_2y_2 $$

      $$ with \ \left \{ \begin{align*} y_1 = e^{-2x} \\ y_1 = e^{-x} \end{align*} \right \} $$

      $$ and \ \left \{ \begin{align*} c_1(x) = e^{2x} \Biggl[ \frac{-x^2}{2} + \frac{x}{2} - \frac{1}{4} \Biggr] \\ c_2(x) = e^{x} \Biggl[ x^2 -2 x + 2 \Biggr] \end{align*} \right \} $$

      So,

      $$y_s = e^{-2x} e^{2x} \Biggl[ \frac{-x^2}{2} + \frac{x}{2} - \frac{1}{4} \Biggr] + e^{-x} e^{x} \Biggl[ x^2 -2 x + 2 \Biggr] $$

      $$y_s = \frac{-x^2}{2} + \frac{x}{2} - \frac{1}{4} + x^2 -2 x + 2 $$

      $$y_s = \frac{x^2}{2} -\frac{3x}{2} + \frac{7}{4} $$


    7. Verification of the specific solution \( y_s \)

    8. $$ y_s'' + 3 y_s' + 2y_p = 1 + 3\left(x-\frac{3}{2}\right) + 2\Biggl( \frac{x^2}{2} -\frac{3x}{2} + \frac{7}{4} \Biggr) $$

      $$ y_s'' + 3 y_s' + 2y_p = 1 + 3x - \frac{9}{2}+ x^2 -3x +\frac{7}{2} $$

      $$ y_s'' + 3 y_s' + 2y_p = x^2 $$

      \( y_s \) is definitely solution for \( (E) \).


    9. Addition of solutions

    10. The total solution of \( (E) \) is the addition of both solutions \( y_h \) and \( y_s \), so:

      $$ y_t= y_h + y_s $$

      $$ y_t= c_1\hspace{0.1em} e^{-2x} +c_2 \hspace{0.1em} e^{- x} + \frac{x^2}{2} -\frac{3x}{2} + \frac{7}{4} $$

Return Index
Scroll top Go to the top of the page