Differential Equations

Second Order Equations

2nd Order Diff Equations Logo

Second Order Linear Homogeneous Differential Equations with Variable Coefficients

Solved Problems

Example 3.

Write a homogeneous linear differential equation, if its fundamental system of solutions is known and has the form \(x,{e^x}.\)

Solution.

We find the derivatives of the given functions:

\[{y'_1} = x' = 1,\;\; {y^{\prime\prime}_1} = 1' = 0;\]
\[{y'_2} = {\left( {{e^x}} \right)^\prime } = {e^x},\;\; y^{\prime\prime}_2 = \left( {{e^x}} \right)^\prime = e^x.\]

The desired differential equation is expressed in terms of the determinant:

\[\left| {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}}&y\\ {{y'_1}}&{{y'_2}}&y'\\ {{y^{\prime\prime}_1}}&{{y^{\prime\prime}_2}}&y^{\prime\prime} \end{array}} \right| = 0,\;\; \Rightarrow \left| {\begin{array}{*{20}{c}} x&{{e^x}}&y\\ 1&{{e^x}}&y'\\ 0&{{e^x}}&y^{\prime\prime} \end{array}} \right| = 0.\]

Expand the determinant along the \(1\)st column:

\[x\left( {{e^x}y^{\prime\prime} - {e^x}y'} \right) - 1 \cdot \left( {{e^x}y^{\prime\prime} - {e^x}y} \right) = 0,\;\; \Rightarrow {e^x}\left[ {\left( {xy^{\prime\prime} - xy'} \right) - \left( {y^{\prime\prime} - y} \right)} \right] = 0.\]

Given that \({e^x} \ne 0,\) we obtain after simplification

\[xy^{\prime\prime} - xy' - y^{\prime\prime} + y = 0,\;\; \Rightarrow \left( {x - 1} \right)y^{\prime\prime} - xy' + y = 0.\]

Example 4.

Find the general solution of the equation \[{x^2}y^{\prime\prime} - 2xy' + 2y = 0,\] given the particular solution \({y_1} = x.\)

Solution.

We make the substitution \(y = {y_1}z \) \(= xz.\) Then

\[y' = {\left( {xz} \right)^\prime } = z + xz',\;\; y^{\prime\prime} = {\left( {z + xz'} \right)^\prime } = z' + z' + xz^{\prime\prime} = 2z' + xz^{\prime\prime}.\]

After substituting the original equation becomes:

\[{x^2}\left( {2z' + xz^{\prime\prime}} \right) - 2x\left( {z + xz'} \right) + 2xz = 0,\;\; \Rightarrow \cancel{\color{blue}{2{x^2}z'}} + {x^3}z^{\prime\prime} - \cancel{\color{red}{2xz}} - \cancel{\color{blue}{2{x^2}z'}} + \cancel{\color{red}{2xz}} = 0,\;\; \Rightarrow {x^3}z^{\prime\prime} = 0.\]

By replacing \(z' = p,\) we obtain a compact equation \({x^3}p' = 0,\) whose solution is the function \(p = {C_1}.\)

From here we find the function \(z:\)

\[p = {C_1},\;\; \Rightarrow z' = {C_1},\;\; \Rightarrow z = {C_1}x + {C_2}.\]

Now we can write the general solution of the equation:

\[y\left( x \right) = xz = x\left( {{C_1}x + {C_2}} \right) = {C_1}{x^2} + {C_2}x.\]

Example 5.

Find the general solution of the equation \[\left( {{x^2} + 1} \right)y^{\prime\prime} - 2y = 0.\]

Solution.

First, choose a particular solution for the given equation. Based on the structure of the equation, we can try to find a particular solution in the form of a quadratic function:

\[{y_1} = A{x^2} + Bx + C.\]

Its derivatives will be equal to

\[{y'_1} = 2Ax + B,\;\; {y^{\prime\prime}_1} = 2A.\]

Substituting this into the differential equation, we determine the coefficients \(A, B, C:\)

\[\left( {{x^2} + 1} \right) \cdot 2A - 2\left( {A{x^2} + Bx + C} \right) \equiv 0,\;\; \Rightarrow \cancel{2A{x^2}} + 2A - \cancel{2A{x^2}} - 2Bx - 2C \equiv 0.\]

It is seen that the coefficients must satisfy the conditions

\[\left\{ \begin{array}{l} - 2B = 0\\ 2A - 2C = 0 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} B = 0\\ A = C \end{array} \right..\]

A function of the form \({y_1} = C\left( {{x^2} + 1} \right)\) corresponds to these conditions. Thus, we can take the function \({y_1} = {{x^2} + 1}\) as a particular solution.

We make the following substitution to reduce the order of the equation:

\[y = {y_1}z = \left( {{x^2} + 1} \right)z,\;\; \Rightarrow y' = 2xz + \left( {{x^2} + 1} \right)z',\;\; \Rightarrow y^{\prime\prime} = 2z + 2xz' + 2xz' + \left( {{x^2} + 1} \right)z^{\prime\prime} = 2z + 4xz' + \left( {{x^2} + 1} \right)z^{\prime\prime}.\]

Then the equation becomes:

\[\left( {{x^2} + 1} \right) \left[ {2z + 4xz' + \left( {{x^2} + 1} \right)z^{\prime\prime}} \right] - 2\left( {{x^2} + 1} \right)z = 0,\;\; \Rightarrow \left( {{x^2} + 1} \right) \left[ {\cancel{2z} + 4xz' + \left( {{x^2} + 1} \right)z^{\prime\prime} - \cancel{2z}} \right] = 0,\;\; \Rightarrow \left( {{x^2} + 1} \right)z^{\prime\prime} + 4xz' = 0.\]

With another change \(z' = p\left( x \right),\) we obtain

\[\left( {{x^2} + 1} \right)p' + 4xp = 0.\]

Now we have a linear equation of the first order, which can be solved by separation of variables:

\[\left( {{x^2} + 1} \right)\frac{{dp}}{{dx}} = - 4xp,\;\; \Rightarrow \frac{{dp}}{p} = - \frac{{4xdx}}{{{x^2} + 1}},\;\; \Rightarrow \int {\frac{{dp}}{p}} = - 2\int {\frac{{d\left( {{x^2} + 1} \right)}}{{{x^2} + 1}}} ,\;\; \Rightarrow \ln\left| p \right| = - 2\ln \left( {{x^2} + 1} \right) + \ln {C_1},\;\; \Rightarrow \ln \left| p \right| = \ln \frac{{{C_1}}}{{{{\left( {{x^2} + 1} \right)}^2}}},\;\; \Rightarrow p = \frac{{{C_1}}}{{{{\left( {{x^2} + 1} \right)}^2}}}.\]

We solve one more equation for \(z:\)

\[p = z' = \frac{{{C_1}}}{{{{\left( {{x^2} + 1} \right)}^2}}},\;\; \Rightarrow z = \int {\frac{{dx}}{{{{\left( {{x^2} + 1} \right)}^2}}}} .\]

This integral is calculated using the reduction formula:

\[\int {\frac{{dx}}{{{{\left( {{x^2} + 1} \right)}^2}}}} = \frac{x}{{2\left( {{x^2} + 1} \right)}} + \frac{1}{2}\int {\frac{{dx}}{{{x^2} + 1}}} = \frac{x}{{2\left( {{x^2} + 1} \right)}} + \frac{1}{2}\arctan x + {C_2}.\]

As a result, we get the following expression for \(z:\)

\[z = {C_1}\left[ {\frac{x}{{2\left( {{x^2} + 1} \right)}} + \frac{1}{2}\arctan x + {C_2}} \right] = \frac{{{C_1}x}}{{{x^2} + 1}} + {C_1}\arctan x + {C_2},\]

where the constants \({C_1}\) and \({C_2}\) are renormalized to simplify the expression.

Thus, the general solution has the form:

\[y = \left( {{x^2} + 1} \right)z = {C_1}x + {C_1}\left( {{x^2} + 1} \right)\arctan x + {C_2}\left( {{x^2} + 1} \right) = {C_1}\left[ {x + \left( {{x^2} + 1} \right)\arctan x} \right] + {C_2}\left( {{x^2} + 1} \right).\]

Example 6.

Find the general solution of the equation \[{x^2}y^{\prime\prime} - 4xy' + 6y = 0\] using the Liouville formula. A particular solution of the equation is known and has the form \({y_1} = {x^2}.\)

Solution.

Let \({y_1}\) and \({y_2}\) be linearly independent particular solutions of the given equation (the solution \({y_1}\) is known). Then the Liouville formula is written as

\[W\left( x \right) = {W_{{y_1},{y_2}}}\left( x \right) = \left| {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}}\\ {{y'_1}}&{{y'_2}} \end{array}} \right| = {W_0}\left( x \right)\exp \left( { - \int\limits_{{x_0}}^x {\frac{{{a_1}\left( t \right)}}{{{a_0}\left( t \right)}}dt} } \right).\]

The integral in this expression is equal to

\[\int\limits_{{x_0}}^x {\frac{{{a_1}\left( t \right)}}{{{a_0}\left( t \right)}}dt} = \int\limits_{{x_0}}^x {\left( {\frac{{ - 4t}}{{{t^2}}}} \right)dt} = \left. {\left( { - 4\ln t} \right)} \right|_{{x_0}}^x = - 4\ln x + 4\ln {x_0} = - \ln {x^4} + \ln x_0^4 = - \ln \frac{{{x^4}}}{{x_0^4}}.\]

Substituting this, we obtain

\[\left| {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}}\\ {{y'_1}}&{{y'_2}} \end{array}} \right| = {W_0}\left( x \right)\exp \left( {\ln \frac{{{x^4}}}{{x_0^4}}} \right) = \frac{{{W_0}\left( x \right)}}{{x_0^4}}{x^4} = {C_1}{x^4},\]

where \({C_1}\) is an arbitrary constant.

As the particular solution \({y_1}\) is known, we get a first order differential equation for the determination of the other particular solution \({y_2}.\) After dividing by \(y_1^2\) we have:

\[\left. {{y'_2}{y_1} - {y_2}{y'_1} = {C_1}{x^4}} \right|:y_1^2,\;\; \Rightarrow \frac{{{y'_2}{y_1} - {y_2}{y'_1}}}{{y_1^2}} = \frac{{{C_1}{x^4}}}{{y_1^2}},\;\; \Rightarrow \left( {\frac{{{y_2}}}{{{y_1}}}} \right)^\prime = \frac{{{C_1}{x^4}}}{{y_1^2}} = \frac{{{C_1}\cancel{x^4}}}{{\cancel{x^4}}} = {C_1}.\]

From this we find the function \({y_2}:\)

\[\frac{{{y_2}}}{{{y_1}}} = {C_1}x + {C_2},\;\; \Rightarrow {y_2} = {y_1}\left( {{C_1}x + {C_2}} \right) = {x^2}\left( {{C_1}x + {C_2}} \right) = {C_1}{x^3} + {C_2}{x^2},\]

where \({C_1},\) \({C_2}\) are constants of integration. It is clear that \({y_2}\) is actually the general solution of the equation.

Example 7.

Find the general solution of the equation \[{x^2}y^{\prime\prime} + xy' - y = 0\] (for \(x \ne 0\) by the Liouville formula, if a particular solution is known: \({y_1} = x.\)

Solution.

Using the Liouville formula we get the following equation for the determination of the second particular solution \({y_2}:\)

\[W\left( x \right) = {W_{{y_1},{y_2}}}\left( x \right) = \left| {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}}\\ {{y'_1}}&{{y'_2}} \end{array}} \right| = {C_1}\exp \left( { - \int {\frac{{{a_1}\left( x \right)}}{{{a_0}\left( x \right)}}dx} } \right).\]

The integral in this formula is

\[\int {\frac{{{a_1}\left( x \right)}}{{{a_0}\left( x \right)}}dx} = \int {\frac{x}{{{x^2}}}dx} = \int {\frac{{dx}}{x}} = \ln \left| x \right|.\]

Then we can write

\[{y'_2}{y_1} - {y_2}{y'_1} = {C_1}{e^{ - \ln \left| x \right|}},\;\; \Rightarrow {y'_2}{y_1} - {y_2}{y'_1} = {C_1}{e^{\ln \frac{1}{{\left| x \right|}}}},\;\; \Rightarrow {y'_2}{y_1} - {y_2}{y'_1} = \frac{{{C_1}}}{x},\]

where \({C_1}\) is an arbitrary constant.

Divide both sides of the equation by \(y_1^2 = {x^2}\) (assuming that \(x \ne 0\)).

\[\frac{{{y'_2}{y_1} - {y_2}{y'_1}}}{{y_1^2}} = \frac{{{C_1}}}{{xy_1^2}},\;\; \Rightarrow \left( {\frac{{{y_2}}}{{{y_1}}}} \right)^\prime = \frac{{{C_1}}}{{x \cdot {x^2}}} = \frac{{{C_1}}}{{{x^3}}},\;\; \Rightarrow \frac{{{y_2}}}{{{y_1}}} = \int {\frac{{{C_1}}}{{{x^3}}}dx} = - \frac{{{C_1}}}{{2{x^2}}} + {C_2} = \frac{{{C_1}}}{{{x^2}}} + {C_2}.\]

Here, we redefined: \( - {\frac{{{C_1}}}{2}} \to {C_1}.\) The final answer is

\[{y_2} = {y_1}\left( {\frac{{{C_1}}}{{{x^2}}} + {C_2}} \right) = x\left( {\frac{{{C_1}}}{{{x^2}}} + {C_2}} \right) = \frac{{{C_1}}}{x} + {C_2}x.\]
Page 1 Page 2