Let \( y \) be a function of class \( \mathbb{C}^{1}\) on an interval \( I\).
In this part, we will show the function \( y(x) \) under its simplified form \( y\).
As well, let \( a(x)\) be a continuous function and \( f(x)\) any function.
Let \( (E) \) be a linear differential equation or order \( 1 \) with continuous coefficient, and \( (H) \) its associated homogeneous equation:
$$ \Biggl \{ \begin{align*} y' + a(x) y = f(x) \qquad (E) \\ y' + a(x) y = 0 \qquad (H) \end{align*} $$
Solving the homogeneous equation \( (H) \)
\( y_h = 0 \) is solution, but considering \( y_h \) as a non-zero function, the following function \(y_h\) will be an homogeneous solution of \( (H) \) :
$$ y_h= Ke^{- A(x) } $$
Solving the general equation \( (E) \)
Function \(y_s\) will be specific solution of \( (E) \) :
$$ y_s= e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt $$
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}^{1}\) on an interval \( I\).
In this part, we will show the function \( y(x) \) under its simplified form \( y\).
As well, let \( a(x)\) be a continuous function and \( f(x)\) any function.
Solving a first order linear differential equation \((LDE_1)\) with continuous coefficient consists of finding functions \( y : x \longmapsto y(x)\), which are solutions of an equation \( (E) \) of type:
$$ y' + a(x) y = f(x) \qquad (E) $$
We can first find solutions \( y_h \) to the homogeneous equation \( ( H) \) :
$$ y' + a(x) y = 0 \qquad (H) $$
If \( y_h \) is solution of the homogeneous equation \( ( H) \), and \( y_s \) is specific solution to the equation \( ( E) \), then:
$$ \Biggl \{ \begin{align*} y_s' + a(x) y_s = f(x) \qquad (E) \\ y_h' + a(x) y_h = 0 \qquad (H) \end{align*} $$
By performing the operation \( ( H) + (E) \) :
$$ y_h' + y_s' + a(x) y_h + a(x) 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(x) (y_h + y_s) = f(x) $$
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.
$$ y' + a(x) y = 0 \qquad (H) $$
Thus, \( y_h = 0 \) est solution évidente, but let us consider \( y_h \) as a non-zero function.
From \( (H) \), let us try to find a function \( (y_h) \) which corresponds:
$$ y_h' + a(x) y_h = 0 \qquad (H) $$
$$ y_h' = - a(x) y_h $$
$$ \frac{y_h' }{y_h}= - a(x) $$
Now, we recognize the derivative of a composite function \( ln(u) \):
$$ ln(u)' = \frac{u' }{u} $$
So, calculating its antiderivative,
$$ \int^x \frac{y_h'(t) }{y_h(t)} \hspace{0.1em} dt= \int^x - a(t)\hspace{0.1em} dt $$
$$ ln \bigl |y_h \bigr|= - A(x) + C \qquad (with \enspace K \in \mathbb{R}) $$
$$ y_h= e^{- A(x) + C} $$
$$ y_h= Ke^{- A(x) } $$
We then have as an homogeneous solution for \( (H) \):
$$ y_h= Ke^{- A(x) } $$
There are indeed an infinite number of solutions for \( y_h \) , corresponding to ignorance of the value of the constant \(K\). he latter can be set subsequently based on the existence of initial conditions.
If \( y_h \) is solution of \( (H) \), then:
$$ y_h' + a(x) y_h = 0$$
Now, we apply the product of two functions:
$$ y_h' + a(x) y_h = -a (x) K e^{- A(x) } + a(x)Ke^{- A(x) } $$
$$ y_h' + a(x) y_h = 0 $$
\( y_h \) is definitely a homogeneous solution of \( (H) \).
Knowing a solution to the homogeneous equation \( (H) \), we can start from this to find specific solutions of \( (E) \).
Indeed, when looking for a specific solution \( y_s \) de type :
$$ y_s= K(x) e^{- A(x) } \qquad (y_s) $$
By applying the method of the variations of parameters (or Lagrange's method), we do have:
$$ y_s' + a(x) y_s = K'(x) e^{- A(x) } -a (x) K(x) e^{- A(x) } + a(x)K(x) e^{- A(x) } $$
$$ y_s' + a(x) y_s = K'(x) e^{- A(x) } $$
Given the following system:
$$ \Biggl \{ \begin{align*} y' + a(x) y = f(x) \qquad (E) \\ y_s' + a(x) y_s = K'(x) e^{- A(x) } \qquad (E_p) \end{align*} $$
Thanks to both equations \( (E) \) and \( (E_p) \), we deduce an equation to solve, to determine \( K(x) \) :
$$ K'(x) e^{- A(x) } = f(x) $$
$$ K'(x) = f(x)e^{A(x) } $$
Let us antiderivate each member:
$$ K(x)= \int^x f(t)e^{A(t) } \hspace{0.1em} dt \qquad (K) $$
We inject \( (K) \) into \( (y_s) \):
$$ y_s= e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt $$
We then have as a specific solution for \( (E) \):
$$ y_s= e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt $$
if \( y_s \) is solution of \( (E) \), then:
$$ y_s' + a(x) y_s = f(x)$$
We again apply the product of two functions:
$$ y_s' + a(x) y_s = -a (x) e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt + f(x)e^{A(x)} e^{- A(x) } + a(x) e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt $$
$$ y_s' + a(x) y_s = \hspace{0.2em} \underbrace{-a (x) e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt + a(x) e^{- A(x) } \int^x f(t)e^{A(t) } \hspace{0.1em} dt } _\text{ \( = \ 0\)} \enspace + \enspace \underbrace{f(x)e^{A(x)} e^{- A(x) }} _\text{ \( = \ f(x)\)} $$
So,
$$ y_s' + a(x) y_s = f(x) $$
\( y_s \) is definitely a specific solution of \( (E) \).
In simple cases, we can directly try to find solutions, in specific by identifying the coefficients.
Here are several examples of how to resolve a \( EDL_1\) having the following general form:
$$ y' + a(x) y = f(x) \qquad (E) $$
Let us take a constant coefficient \( a(x) = 2 \), and a function \( f(x) = x^2 \), then the equation \( (E) \) now becomes:
$$ y' + 2y = x^2 \qquad (E) $$
$$ y_h' + 2y_h = 0 \qquad (H) $$
$$ y_h'= -2y_h $$
$$ \frac{y_h'}{y_h} = -2 $$
$$ \int^x \frac{y_h'(t)}{y_h(t)} dt = \int^x -2dt $$
$$ ln|y_h| =-2x + K $$
$$ y_h= Ke^{- 2x } $$
We then have a homogeneous solution \( y_h \):
$$ y_h= Ke^{- 2x } $$
$$ y' + 2y = x^2 \qquad (E) $$
We are looking for a specific solution of the type:
$$ y_s= K(x)e^{- 2x } \qquad (y_s) $$
To do this, we can use the method of the variations of parameters, or use the coefficient identification method.
Using this method, we do have:
$$ y_s' + 2y_s = K'(x)e^{- 2x } - 2K(x)e^{- 2x } + 2 K(x)e^{- 2x } $$
$$ y_s' + 2y_s = K'(x)e^{- 2x } \qquad (E_p) $$
Given the following system:
$$ \Biggl \{ \begin{align*} y' + 2y = x^2 \qquad (E) \\ y_s' + 2y_s = K'(x)e^{- 2x } \qquad (E_p) \end{align*} $$
Thanks to both equations \( (E) \) and \( (E_p) \), we deduce an equation to solve, to determine \( K(x) \):
$$ K'(x)e^{- 2x } = x^2 $$
$$ K'(x) = x^2 e^{2x } $$
We antiderivate each side to determine \( K(x) \):
$$ K(x) = \int^x t^2 e^{2t } \hspace{0.1em} dt$$
We perform an integration by parts with the following choice of \( u \) and \( v' \):
$$ \Biggl \{ \begin{align*} u(t) = t^2 \\ v'(t) = e^{2t } \hspace{0.1em} dt \end{align*} $$
$$ \Biggl \{ \begin{align*} u'(t) = 2t \hspace{0.1em} dt \\ v(t) = \frac{1}{2} e^{2t } \end{align*} $$
$$K(x) = \Biggl[t^2 \frac{1}{2} e^{2t }\Biggr]^x - \int^x \frac{1}{2} 2t \hspace{0.2em} e^{2t } \hspace{0.2em} dt $$
$$K(x) = x^2 \frac{1}{2} e^{2x }- \int^x t \hspace{0.2em} e^{2t } \hspace{0.2em} dt $$
We perform another an integration by parts:
$$ \Biggl \{ \begin{align*} u(t) = t \\ v'(t) = e^{2t } \hspace{0.1em} dt \end{align*} $$
$$ \Biggl \{ \begin{align*} u'(t) = dt \\ v(t) = \frac{1}{2} e^{2t } \end{align*} $$
$$K(x) = x^2 \frac{1}{2} e^{2x }- \Biggl( \Biggl[t \frac{1}{2} e^{2t }\Biggr]^x - \int^x \frac{1}{2} \hspace{0.2em} e^{2t } \hspace{0.2em} dt \Biggr) $$
$$K(x) = x^2 \frac{1}{2} e^{2x }- x \frac{1}{2} e^{2x } + \int^x \frac{1}{2} \hspace{0.2em} e^{2t } \hspace{0.2em} dt $$
$$K(x) = x^2 \frac{1}{2} e^{2x }- x \frac{1}{2} e^{2x } +\frac{1}{4} e^{2x } $$
$$K(x) = e^{2x } \Biggl( \frac{ x^2}{2}- \frac{x}{2} +\frac{1}{4}\Biggr) \qquad (K) $$
Now, we inject \( (K) \) into \( (y_s) \):
$$ y_s= e^{2x } \Biggl( \frac{ x^2}{2}- \frac{x}{2} +\frac{1}{4}\Biggr) e^{- 2x } $$
$$ y_s= \frac{ x^2}{2}- \frac{x}{2} +\frac{1}{4} $$
Given the relative simplicity of the equation \( (E) \):
$$ y' + 2y = x^2 \qquad (E) $$
We can look for a specific solution \( y_s \) of type second degree polynomial:
$$ y_s= ax^2 + bx +c \qquad (y_s) $$
By injecting \(y_s\) into \( (E)\), we do have:
$$ (2ax + b) + 2(ax^2 + bx +c ) = x^2 $$
$$ 2ax^2 + (2a + 2b)x + (b+2c)= x^2 $$
Which leads us to the following system:
$$ \left \{ \begin{align*} 2a = 1 \\ 2a + 2b = 0 \\ b + 2c = 0 \end{align*} \right \} $$
$$ \left \{ \begin{align*} a = \frac{1}{2} \\ 1 + 2b = 0 \hspace{0.2em} \Longleftrightarrow \hspace{0.2em} b = -\frac{1}{2} \\ -\frac{1}{2} + 2c = 0 \hspace{0.2em} \Longleftrightarrow \hspace{0.2em} c = \frac{1}{4} \end{align*} \right \} $$
So, we directly obtain solutions for \(a, b, c\):
$$ \left \{ a = \frac{1}{2}, \hspace{0.2em} b = -\frac{1}{2}, \hspace{0.2em} c = \frac{1}{4} \right \} $$
And therefore a solution for \( y_s \):
$$ y_s= \frac{x^2 }{2}-\frac{x}{2} + \frac{1}{4} $$
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= Ke^{- 2x } + \frac{x^2 }{2}-\frac{x}{2} + \frac{1}{4} $$
If \( y_t \) is a solution of \( (E) \), then:
$$ y_t' + 2 y_t = x^2$$
Let us check it.
$$ y_t' + 2 y_t = \Biggl(-2 Ke^{- 2x } + x -\frac{1}{2} \Biggr) + 2 \Biggl( Ke^{- 2x } + \frac{x^2 }{2}-\frac{x}{2} + \frac{1}{4} \Biggr)$$
$$ y_t' + 2 y_t = \hspace{0.2em} \underbrace{-2 Ke^{- 2x } + 2 Ke^{- 2x }} _\text{ \( = 0 \)} \hspace{0.2em} + \hspace{0.2em} x^2 + \hspace{0.2em} \underbrace{ x -\frac{1}{2} -x + \frac{1}{2}} _\text{ \( = 0 \)} $$
$$ y_t' + 2 y_t = x^2$$
\( y_t \) is definitely a total solution of \( (E) \).
Let us take a continuous coefficient \( a(x) = \frac{1}{x} \), and a function \( f(x) = x^3\), then the equation \( (E) \) becomes:
$$ y' + \frac{y}{x} = x^3 \qquad (E) $$
$$ y' + \frac{y}{x} = 0 \qquad (H) $$
$$ y' = - \frac{y}{x} $$
$$ \frac{y'}{y} = - \frac{1}{x} $$
$$ ln |y| = -ln|x| + C $$
$$ y = e^{-ln(x) + C} $$
$$ y = \frac{K}{x} $$
We then have a homogeneous solution \( y_h \):
$$ y_h= \frac{K}{x}$$
$$ y' + \frac{y}{x} = x^3 \qquad (E) $$
We are looking for a specific solution of the type:
$$ y_s= \frac{K(x)}{x} \qquad (y_s) $$
Using this method, we do have:
$$ y_s' + \frac{y}{x} = \frac {K'(x)x - K(x)}{x^2} + \frac {K(x) }{x^2} $$
$$ y_s' + \frac{y}{x} = \frac {K'(x)}{x} \qquad (E_p) $$
Given the following system:
$$ \left \{ \begin{align*} y' + \frac{y}{x} = x^3 \qquad \qquad (E) \\ y_s' + \frac{y_s}{x} = \frac {K'(x)}{x} \qquad (E_p) \end{align*} \right \} $$
Thanks to both equations \( (E) \) and \( (E_p) \), we deduce an equation to solve, to determine \( K(x) \):
$$\frac {K'(x)}{x} = x^3 $$
$$ K'(x) = x^4 $$
We antiderivate each side to determine \( K(x) \):
$$ K(x) = \int^x t^4 \hspace{0.2em} \hspace{0.1em} dt$$
$$ K(x) =\frac{x^5}{5} $$
Now, injecting \( (K) \) into \( (y_s) \):
$$ y_s= \frac{x^5}{5}\frac{1}{x} $$
$$ y_s= \frac{x^4}{5} $$
The total solution of \( (E) \) s the addition of the two solutions \( y_h \) and \( y_s \), so:
$$ y_t= y_h + y_s $$
$$ y_t= \frac{K}{x} + \frac{x^4}{5} $$
If \( y_t \) is solution of \( (E) \), then:
$$ y_t' + \frac{y_t}{x} = x^3$$
Let us check it.
$$ y_t' + \frac{y_t}{x} = \Biggl(-\frac{ K }{x^2} + \frac{4x^3 }{5} \Biggr) + \Biggl( \frac{ \frac{K}{x} + \frac{x^4}{5}}{x}\Biggr)$$
$$ y_t' + \frac{y_t}{x} = -\frac{ K }{x^2} + \frac{4x^3 }{5} + \frac{K}{x^2} + \frac{x^4}{5x}$$
$$ y_t' + \frac{y_t}{x} = \hspace{0.2em} \underbrace{\frac{K}{x^2} - \frac{ K }{x^2}} _\text{ \(= 0\)} \hspace{0.2em} + \hspace{0.2em} \frac{4x^3 }{5} + \frac{x^3}{5}$$
$$ y_t' + \frac{y_t}{x} =x^3$$
\( y_t \) is definitely a total solution of \( (E) \).