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) \):
After examining the discriminant\( (\Delta = a^2 -4b) \), depending on the case the function \(y_h\) will be an homogeneous solution of \( (H) \) :
$$ \left \{ \begin{align*} \alpha = \frac{-a - \sqrt{\Delta}}{2} \\ \beta = \frac{-a + \sqrt{\Delta}}{2} \end{align*} \right \} $$
$$ 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) $$
$$ 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) $$
$$ \left \{ \begin{align*} \alpha = \frac{-a - i\sqrt{|\Delta}|}{2} \\ \overline{\alpha} = \frac{-a + i\sqrt{|\Delta}|}{2} \end{align*} \right \} $$
$$ 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*} $$
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:
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) \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 \}$$
$$avec \ \left \{ \begin{align*} det(Y) = \begin{vmatrix} y_1 & y_2\\ y_1' & y_2' \end{vmatrix} = 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 $$
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:
We can first find a homogeneous solution \( y_h \) to the homogeneous equation \( ( 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) \):
Thanks to the linearity of the derivative, we notice that \( (y_h + y_s) \) remains solution of \( ( E) \), because:
As a result, \( y_t \) will be a total solution of \( (E) \):
$$ y_t= y_h + y_s $$
We call homogeneous equation \( (H) \), the equivalent of the equation \( (E) \) but without any right side member.
The first order linear differential equations with constant coefficient have as solution to the homogeneous equation, a function \(y_h\) of the form:
Let us assume that those of the second order are too, with a general coefficient \( r \), still to determine.
From this hypothesis, the equation \( (H) \) becomes:
We end up with a quadratic equation, called the characteristic equation \( (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) \):
$$ \left \{ \begin{align*} \alpha = \frac{-a - \sqrt{\Delta}}{2} \\ \beta = \frac{-a + \sqrt{\Delta}}{2} \end{align*} \right \} $$
$$ \Biggl \{ \begin{align*} a = -(\alpha + \beta) \\ b = \alpha \beta \end{align*} \qquad (1)$$
$$ \Biggl \{ \begin{align*} a = -(2\alpha) \\ b = \alpha^2 \end{align*} $$
$$ \left \{ \begin{align*} \alpha = \frac{-a - i\sqrt{|\Delta}|}{2} \\ \overline{\alpha} = \frac{-a + i\sqrt{|\Delta}|}{2} \end{align*} \right \} $$
$$ \Biggl \{ \begin{align*} a = -(\alpha +\overset{-}{\alpha} ) \\ b = \alpha \overset{-}{\alpha} \end{align*} $$
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^*) \):
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:
having as solution:
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:
The solutions of \( (E_2) \) are then those that we are looking for \( (H) \)...
To solve a first order linear differential equation with constant coefficient, it is first necessary to solve the associated homogeneous equation \( (H_2) \).
We then start from the equation \( (H_2) \):
We know that this type of equation has the solution:
As for a first order linear differential equation with constant coefficient, we will look for a specific solution of the type:
To do this, we can use the method of the variations of parameters, or use the coefficient identification method.
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) \):
As seen above, three cases can be distinguished depending on the roots of \(E_c\):
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:
In this case, \( (\lambda')\) remains as is:
We inject the value of \( (\lambda - \Delta_+) \) into \( (y_h - H_2) \):
We will then have a total solution \( y_t \) for \( (E_2 )\), and therefore fot \((H) \):
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\).
In this case, \( \alpha = \beta \), then \( (\lambda')\) becomes:
We thus integrate the constant \( \mu \):
We then inject the value of \( (\lambda - \Delta_0) \) into \( (y_h - H_2) \):
In the end, we do have a total solution \( y_t \) for \( (E_2 )\), and therefore for \((H) \):
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) $$
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:
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:
We integrate it:
We no inject the value of \( (\lambda - \Delta_-) \) into \( (y_h - H_2) \):
We then have a total solution \( y_t \) for \( (E_2 )\), and therefore for \((H) \):
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*} $$
Looking for real solutions of \( (E_2 )\), and therefore of \((H) \), we will only keep the real part of it:
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\).
Knowing a solution to the homogeneous equation \( (H) \), we can start from this one to find a specific solution of \( (E) \).
Indeed, we are going to look for a specific solution \( y_s \) of type:
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:
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*}$$
So, all that remains is:
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)\):
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)\):
As a consequence of it, its derivative is also worth \(0\):
So, the expression \((3)\) can be rewrite as:
All that remains of \((3)\) is:
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} $$
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:
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 \}$$
Here are several examples of how to resolve a \( EDL_2\) of the general form:
Let's solve the following equation \( (E)\):
We obtain as a characteristic equation \( (E_c) \):
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 \) is definitely solution of \( (H) \).
We now want to find a specific solution of the type:
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} $$
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} } $$
$$ 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} } $$
It remains to integrate both \((c_1', c_2')\).
Let's start with \(c_1'\).
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*} $$
$$ \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*} $$
We now integrate \(c_2'\).
$$ \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*} $$
$$ \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*} $$
Finally, we do have two specific solutions to add:
$$ 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 \) is definitely solution for \( (E) \).
The total solution of \( (E) \) is the addition of both solutions \( y_h \) and \( y_s \), so: