Ask your own question, for FREE!
Mathematics 8 Online
OpenStudy (michele_laino):

Tutorial on first order linear differential equations

OpenStudy (michele_laino):

In my tutoring activity, sometimes, some students ask me how to solve a first order linear differential equation. Now, as we know, there are two methods which can be applied in order to solve a first order linear differential equation, or first order linear ODE, for short. The first of them is the so called separation of variables, through which method, we can obtain the requested solution more o less rapidly. The second method, which is named about variation of arbitrary constant, plans to write a general solution of the associated homogeneous equation to our original ODE, as a function which depends on a certain constant, and subsequently, the substitution of that solution into the original ODE, in order to get the algebraic expression of such constant.

OpenStudy (michele_laino):

In this tutorial, I will provide an useful formula, which allows us to find a solution of a first order linear ODE, when is not possible to apply the method of the separation of variables, and without introducing any constant, whose value has to be determined, as happens when we apply the variation of the arbitrary constant method. Finally, some examples of application, about the theory developed in this tutorial, will be provided.

OpenStudy (michele_laino):

Definition: Let P(t) and Q(t) two continuous real functions, which are defined into an interval I of the real line We say that a C^1 function, u(t) in I is a solution, in I of the subsequent linear first order ODE: \[\Large\left( * \right)\quad u'\left( t \right) + P\left( t \right)u\left( t \right) = Q\left( t \right)\] if the same function u(t), together with its first derivative u'(t), check the equation (*) for every t which belongs to I.

OpenStudy (michele_laino):

Theorem: let t_0 belonging to I and C a real number. Furthermore, let P and Q two continuous real functions within the interval I. Exixts one and only one solution u(t) of the equation (*) within I, such that u(t_0)=C. that solution is given by the subsequent formula: \[\large u\left( t \right) = \exp \left( {\int_{{t_0}}^t { - P\left( s \right)ds} } \right)\left[ {C + \int_{{t_0}}^t {Q\left( r \right)\exp \left( {\int_{{t_0}}^r {P\left( s \right)ds} } \right)dr} } \right]\]

OpenStudy (michele_laino):

Proof: The solutions of the equation (*) are the same of those ones of the subsequent equation: \[\large \exp \left( {\int_{{t_0}}^t {P\left( s \right)ds} } \right)\left[ {u'\left( t \right) + P\left( t \right)u\left( t \right)} \right] = \exp \left( {\int_{{t_0}}^t {P\left( s \right)ds} } \right)Q\left( t \right)\]

OpenStudy (michele_laino):

since the above equation can be obtained from the (*) multiplying both sides by a function, which is different from zero for every t belonging to I.

OpenStudy (michele_laino):

Now the left side of the last equation is the first derivative of the subsequent function: \[\large v\left( t \right) = \exp \left( {\int_{{t_0}}^t {P\left( s \right)ds} } \right)u\left( t \right)\]

OpenStudy (michele_laino):

so, we can write: \[\large v'\left( t \right) = \exp \left( {\int_{{t_0}}^t {P\left( s \right)ds} } \right)Q\left( t \right)\] and integrating once, we get: \[\large v\left( t \right) = \int_{{t_0}}^t {Q\left( r \right)\exp \left( {\int_{{t_0}}^r {P\left( s \right)ds} } \right)dr} + C\] being C=v(t_0)=u(t_0)

OpenStudy (michele_laino):

Finally, using the definition of the function v(t), we get the thesis.

OpenStudy (michele_laino):

When I work with this type of ODE, I usually write the solution, in a shorthand notation, as below: \[\Large u\left( t \right) = {e^{ - \int P }}\left( {C + \int {Q\;{e^{\int P }}} } \right)\]

OpenStudy (michele_laino):

Example of application example #1 Let's suppose that we have to solve the subsequent equation: \[\Large \frac{{y'}}{x} - 2y = 2{x^2}\]

OpenStudy (michele_laino):

We can rewrite that equation as below: \[\Large y' - 2xy = 2{x^3}\]

OpenStudy (michele_laino):

Here, we can write: \[\Large \begin{gathered} P\left( x \right) = - 2x,\quad Q\left( x \right) = 2{x^3} \hfill \\ \int {P = - {x^2}} ,\quad {e^{\int P }} = {e^{ - {x^2}}},\quad {e^{ - \int P }} = {e^{{x^2}}} \hfill \\ \end{gathered} \] so, the solution, is: \[\Large \begin{gathered} y\left( x \right) = {e^{{x^2}}}\left( {C + \int {2{x^3}{e^{ - {x^2}}}dx\;} } \right) \hfill \\ y\left( x \right) = {e^{{x^2}}}\left( {C + {x^2}{e^{ - {x^2}}} - {e^{ - {x^2}}}} \right) \hfill \\ y\left( x \right) = C{e^{{x^2}}} - {x^2} - 1 \hfill \\ \end{gathered} \]

OpenStudy (michele_laino):

Example #2 \[\Large xy' + \left( {x + 1} \right)y = 3{x^2}{e^{ - x}}\]

OpenStudy (anonymous):

OpenStudy (michele_laino):

here we can rewrite bthat equation as below: \[\Large y' + \frac{{x + 1}}{x}y = 3x{e^{ - x}}\] so we have: \[\Large \begin{gathered} P\left( x \right) = \frac{{x + 1}}{x},\quad Q\left( x \right) = 3x{e^{ - x}}, \hfill \\ \hfill \\ {e^{\int P }} = {e^x}{e^{\ln x}} = x{e^x},\quad {e^{ - \int P }} = \frac{{{e^{ - x}}}}{x}\quad \hfill \\ \end{gathered} \] The solution, is therefore: \[\Large \begin{gathered} y\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ = \frac{{{e^{ - x}}}}{x}\left( {C + \int {3x{e^{ - x}}\;x{e^x}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large y\left( x \right) = \frac{{{e^{ - x}}}}{x}\left( {C + {x^3}} \right),\quad C \in \mathbb{R}.\]

OpenStudy (michele_laino):

Example #3 the ODE is: \[\Large y = x\left( {y' - x\cos x} \right)\] which equation, can be rewritten as below: \[\Large y' - \frac{1}{x}y = x\cos x\] so, comparing with the general formula, we have: \[\Large \begin{gathered} P\left( x \right) = - \frac{1}{x},\quad Q\left( x \right) = x\cos x, \hfill \\ \hfill \\ {e^{\int P }} = {e^{ - \int {\frac{{dx}}{x}} }} = {e^{ - \ln x}} = \frac{1}{x},\quad {e^{ - \int P }} = x\quad \hfill \\ \end{gathered} \] The solution is: \[\Large \begin{gathered} y\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ = x\left( {C + \int {x\cos x\;\frac{1}{x}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large y\left( x \right) = x\left( {C + \sin x} \right),\quad C \in \mathbb{R}.\]

OpenStudy (michele_laino):

Example #4 the equation, that we have to solve, is: \[\Large \left( {xy' - 1} \right)\ln x = 2y\] As in the previous examples, we rewrite that equation, in appropriate form, so we get: \[\Large y' - \frac{2}{{x\ln x}}y = \frac{1}{x}\] and comparing that equation with the general formula, we can write: \[\Large \begin{gathered} P\left( x \right) = - \frac{2}{{x\ln x}},\quad Q\left( x \right) = \frac{1}{x}, \hfill \\ \hfill \\ {e^{\int P }} = {e^{ - \int {\frac{2}{{x\ln x}}} }} = {e^{ - \ln \left( {{{\left( {\ln x} \right)}^2}} \right)}} = \frac{1}{{{{\left( {\ln x} \right)}^2}}},\quad \hfill \\ \hfill \\ {e^{ - \int P }} = {\left( {\ln x} \right)^2} \hfill \\ \end{gathered} \] Therefore, the solution, is: \[\Large \begin{gathered} y\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ \hfill \\ = {\left( {\ln x} \right)^2}\left( {C + \int {\frac{1}{x}\frac{1}{{{{\left( {\ln x} \right)}^2}}}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large y\left( x \right) = C{\left( {\ln x} \right)^2} - \ln x,\quad C \in \mathbb{R}.\]

OpenStudy (michele_laino):

Example #5 here, we want to solve this equation: \[\Large \left( {2x + 1} \right)y' = 4x + 2y\] Now, such equation, can be rewritten as below: \[\Large y' - \frac{2}{{2x + 1}}y = \frac{{4x}}{{2x + 1}}\] so, comparing that equation, with the general formula, we get: \[\Large \begin{gathered} P\left( x \right) = - \frac{2}{{2x + 1}},\quad Q\left( x \right) = \frac{{4x}}{{2x + 1}}, \hfill \\ \hfill \\ {e^{\int P }} = {e^{ - \int {\frac{{2dx}}{{2x + 1}}} }} = {e^{ - \ln \left( {2x + 1} \right)}} = \frac{1}{{2x + 1}}, \hfill \\ \hfill \\ {e^{ - \int P }} = 2x + 1\quad \hfill \\ \end{gathered} \] Applying our theorem, we get: \[\Large \begin{gathered} y\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ \hfill \\ = 2x + 1\left( {C + \int {\frac{{4x}}{{2x + 1}}\frac{1}{{2x + 1}}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large y\left( x \right) = \left[ {C + \ln \left( {2x + 1} \right)} \right]\left( {2x + 1} \right) + 1,\quad C \in \mathbb{R}.\]

OpenStudy (michele_laino):

Example #6 here is the equation, that we want to solve: \[\Large xy' - 2y = 2{x^4}\] As usual, we rewrite that equation, in an appropriate form: \[\Large y' - \frac{2}{x}y = 2{x^3}\] So, again, comparing that expression, with the general formula, we get: \[\Large \begin{gathered} P\left( x \right) = - \frac{2}{x},\quad Q\left( x \right) = 2{x^3}, \hfill \\ \hfill \\ {e^{\int P }} = {e^{ - \int {\frac{2}{x}} }} = {e^{ - 2\ln x}} = \frac{1}{{{x^2}}},\quad {e^{ - \int P }} = {x^2} \hfill \\ \end{gathered} \] The solution, therefore, is: \[\Large \begin{gathered} y\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ \hfill \\ = {x^2}\left( {C + \int {2{x^3}\frac{1}{{{x^2}}}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large y\left( x \right) = {x^2}\left( {C + {x^2}} \right),\quad C \in \mathbb{R}.\]

OpenStudy (michele_laino):

Example #7 (The Euler equation) Let's consider this function: \[\Large f\left( x \right) = \cos x + i\sin x\] where, as usual, i is such that: \[\Large {i^2} = - 1\] Now, if we set x=0, we have: \[\Large f\left( 0 \right) = \cos 0 + i\sin 0 = 1\] furthermore, if we compute the first derivative of f(x), we can write: \[\Large \begin{gathered} f'\left( x \right) = - \sin x + i\cos x = \hfill \\ = i\left( {\cos x + i\sin x} \right) = if\left( x \right) \hfill \\ \end{gathered} \] in other word, the function f(x), satisfies the subsequent ODE: \[\Large f'\left( x \right) = if\left( x \right)\] with the initial condition: \[\Large f\left( 0 \right) = 1\] Now, we apply our method, in order to solve that ODE. First I rewrite that equation, as below: \[\Large f' - if = 0\] then comparing that equation, with the general formula, we get: \[\Large \begin{gathered} P\left( x \right) = - i,\quad Q\left( x \right) = 0, \hfill \\ \hfill \\ {e^{\int P }} = {e^{\int i }} = {e^{ix}},\quad {e^{ - \int P }} = {e^{ - ix}} \hfill \\ \end{gathered} \] So the solution, is: \[\Large \begin{gathered} f\left( x \right) = {e^{ - \int P }}\left( {C + \int {Q{e^{\int P }}} } \right) = \hfill \\ \hfill \\ = {e^{ix}}\left( {C + \int {0 \cdot {e^{ - ix}}dx} } \right) \hfill \\ \end{gathered} \] and finally: \[\Large f\left( x \right) = C{e^{ix}},\quad C \in \mathbb{R}\] Now, we apply the initial condition, in so doing we can determine the value of the constant C: \[\Large 1 = f\left( 0 \right) = C{e^{i0}} = C\] so we can write: \[\Large f\left( x \right) = {e^{ix}} = \cos x + i\sin x\] namely the Euler formula.

rvc (rvc):

Very Nice Excellent :)

OpenStudy (michele_laino):

thanks! @rvc :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!