Differential Equations

Higher Order Equations

Nth Order Diff Equations Logo

Higher Order Linear Nonhomogeneous Differential Equations with Variable Coefficients

Solved Problems

Example 1.

Find the general solution of the differential equation

\[\left( {{x^2} - 2} \right)y^{\prime\prime\prime} - 2xy^{\prime\prime} - \left( {{x^2} - 2} \right)y' + 2xy = 2x - \frac{4}{y}.\]

Solution.

First we find the general solution of the homogeneous equation

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

We use the symmetry of the equation and introduce the new variable

\[v = y^{\prime\prime} - y.\]

Then the equation becomes:

\[\left( {{x^2} - 2} \right)v' - 2xv = 0.\]

The resulting equation can be easily solved by separation of variables:

\[\left( {{x^2} - 2} \right)\frac{{dv}}{{dx}} = 2xv,\;\; \Rightarrow \frac{{dv}}{v} = \frac{{2xdx}}{{{x^2} - 2}},\;\; \Rightarrow \int {\frac{{dv}}{v}} = \int {\frac{{2xdx}}{{{x^2} - 2}}} ,\;\; \Rightarrow \int {\frac{{dv}}{v}} = \int {\frac{{d\left( {{x^2} - 2} \right)}}{{{x^2} - 2}}} ,\;\; \Rightarrow \ln \left| v \right| = \ln \left| {{x^2} - 2} \right| + \ln {B_1}\;\left( {{B_1} \gt 0} \right),\;\; \Rightarrow \ln \left| v \right| = \ln \left( {{B_1}\left| {{x^2} - 2} \right|} \right),\;\; \Rightarrow \left| v \right| = {B_1}\left| {{x^2} - 2} \right|,\;\; \Rightarrow v = {B_2}\left( {{x^2} - 2} \right),\]

where \({B_2}\) ia an arbitrary number.

We now find the function \(y\left( x \right):\)

\[y^{\prime\prime} - y = v,\;\; \Rightarrow y^{\prime\prime} - y = {B_2}\left( {{x^2} - 2} \right).\]

We have obtained a nonhomogeneous equation of order \(2.\) The solution of the corresponding homogeneous equation is given by

\[y^{\prime\prime} - y = 0,\;\; \Rightarrow {\lambda ^2} - 1 = 0,\;\; \Rightarrow {\lambda _{1,2}} = \pm 1,\;\; \Rightarrow {y_0}\left( x \right) = {C_1}{e^x} + {C_2}{e^{ - x}}.\]

Given that the right side \({B_2}\left( {{x^2} - 2} \right)\) is a quadratic polynomial, we seek a particular solution in the form

\[{y_1} = D{x^2} + Ex + F.\]

We substitute this function and its derivatives

\[{y'_1} = 2Dx + E,\;\; {y^{\prime\prime}_1} = 2D\]

in our nonhomogeneous equation and find the coefficients \(D, E, F:\)

\[2D - \left( {D{x^2} + Ex + F} \right) = {B_2}{x^2} - 2{B_2},\;\; \Rightarrow 2D - D{x^2} - Ex - F = {B_2}{x^2} - 2{B_2}.\]

Consequently,

\[\left\{ \begin{array}{l} - D = {B_2}\\ - E = 0\\ 2D - F = - 2{B_2} \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} D = - {B_2}\\ E = 0\\ F = 0 \end{array} \right..\]

Thus, the particular solution \({y_1}\) is given by

\[{y_1} = - {B_2}{x^2}.\]

Replacing the arbitrary number \( - {B_2}\) with \({C_3},\) we finally obtain the general solution of the homogeneous equation:

\[{y_0}\left( x \right) = {C_1}{e^x} + {C_2}{e^{ - x}} + {C_3}{x^2}.\]

Here, the functions \({Y_1} = {e^x},\) \({Y_2} = {e^{ - x}},\) \({Y_3} = {x^2}\) form a fundamental system of solutions.

Now we find the solution of the nonhomogeneous equation using the method of variation of constants. The general solution is represented as

\[y\left( x \right) = {C_1}\left( x \right){e^x} + {C_2}\left( x \right){e^{ - x}} + {C_3}\left( x \right){x^2},\]

where the derivatives of the unknown functions \({C_1}\left( x \right),\) \({C_2}\left( x \right),\) \({C_3}\left( x \right)\) satisfy the system of equations

\[\left\{ \begin{array}{l} {C'_1}{e^x} + {C'_2}{e^{ - x}} + {C'_3}{x^2} = 0\\ {C'_1}{e^x} - {C'_2}{e^{ - x}} + 2{C'_3}x = 0\\ {C'_1}{e^x} + {C'_2}{e^{ - x}} + 2{C'_3} = 2x - \frac{4}{x} \end{array} \right..\]

Calculate the determinants of this system:

\[W = \left| {\begin{array}{*{20}{c}} {{e^x}}&{{e^{ - x}}}&{{x^2}}\\ {{e^x}}&{ - {e^{ - x}}}&{2x}\\ {{e^x}}&{{e^{ - x}}}&2 \end{array}} \right| = {e^x}{e^{ - x}}\left| {\begin{array}{*{20}{c}} 1&1&{{x^2}}\\ 1&{ - 1}&{2x}\\ 1&1&2 \end{array}} \right| = {1 \cdot \left[ {1\left( { - 2 - 2x} \right) - 1\left( {2 - {x^2}} \right) + 1\left( {2x + {x^2}} \right)} \right]} = - 2 - \cancel{2x} - 2 + {x^2} + \cancel{2x} + {x^2} = 2{x^2} - 4;\]
\[{W_1} = \left| {\begin{array}{*{20}{c}} 0&{{e^{ - x}}}&{{x^2}}\\ 0&{ - {e^{ - x}}}&{2x}\\ {2x - \frac{4}{x}}&{{e^{ - x}}}&2 \end{array}} \right| = \left( {2x - \frac{x}{4}} \right) \left( {2x{e^{ - x}} + {x^2}{e^{ - x}}} \right) = \left( {2{x^2} - 4} \right)\left( {x + 2} \right){e^{ - x}},\]
\[{W_2} = \left| {\begin{array}{*{20}{c}} {{e^x}}&0&{{x^2}}\\ {{e^x}}&0&{2x}\\ {{e^x}}&{2x - \frac{4}{x}}&2 \end{array}} \right| = - \left( {2x - \frac{x}{4}} \right) \left( {2x{e^x} - {x^2}{e^x}} \right) = \left( {2{x^2} - 4} \right)\left( {x - 2} \right){e^x},\]
\[{W_3} = \left| {\begin{array}{*{20}{c}} {{e^x}}&{{e^{ - x}}}&0\\ {{e^x}}&{ - {e^{ - x}}}&0\\ {{e^x}}&{{e^{ - x}}}&{2x - \frac{4}{x}} \end{array}} \right| = {e^{ - x}}{e^x}\left| {\begin{array}{*{20}{c}} 1&1&0\\ 1&{ - 1}&0\\ 1&1&{2x - \frac{4}{x}} \end{array}} \right| = \left( {2x - \frac{x}{4}} \right)\left( { - 1 - 1} \right) = - \frac{2}{x}\left( {2{x^2} - 4} \right).\]

Then the derivatives \({C'_1},\) \({C'_2},\) \({C'_3}\) are

\[{C'_1} = \frac{{{W_1}}}{W} = \frac{{\cancel{\left( {2{x^2} - 4} \right)}\left( {x + 2} \right){e^{ - x}}}}{\cancel{2{x^2} - 4}} = \left( {x + 2} \right){e^{ - x}},\]
\[{C'_2} = \frac{{{W_2}}}{W} = \frac{{\cancel{\left( {2{x^2} - 4} \right)}\left( {x - 2} \right){e^{x}}}}{\cancel{2{x^2} - 4}} = \left( {x - 2} \right){e^{x}},\]
\[{C_3} = \frac{{{W_3}}}{W} = \frac{{ - \frac{2}{x}\cancel{\left( {2{x^2} - 4} \right)}}}{\cancel{2{x^2} - 4}} = - \frac{2}{x}.\]

Integrating, we find the functions \({C_1}\left( x \right),\) \({C_2}\left( x \right),\) \({C_3}\left( x \right):\)

\[{C_1}\left( x \right) = \int {\left( {x + 2} \right){e^{ - x}}dx} = \left[ {\begin{array}{*{20}{l}} {u = x + 2}\\ {v' = {e^{ - x}}}\\ {u' = 1}\\ {v = - {e^{ - x}}} \end{array}} \right] = - \left( {x + 2} \right){e^{ - x}} - \int {\left( { - {e^{ - x}}} \right)dx} = - \left( {x + 2} \right){e^{ - x}} + \int {{e^{ - x}}dx} = - \left( {x + 2} \right){e^{ - x}} - {e^{ - x}} + {A_1} = - \left( {x + 3} \right){e^{ - x}} + {A_1},\]
\[{C_2}\left( x \right) = \int {\left( {x - 2} \right){e^x}dx} = \left[ {\begin{array}{*{20}{l}} {u = x - 2}\\ {v' = {e^x}}\\ {u' = 1}\\ {v = {e^x}} \end{array}} \right] = \left( {x - 2} \right){e^x} - \int {{e^x}dx} = \left( {x - 2} \right){e^x} - {e^x} + {A_2} = \left( {x - 3} \right){e^x} + {A_2},\]
\[{C_3}\left( x \right) = \int {\left( { - \frac{2}{x}} \right)dx} = - 2\int {\frac{{dx}}{x}} = - 2\ln \left| x \right| + {A_3}.\]

Now we can write the general solution of the nonhomogeneous equation:

\[y\left( x \right) = {C_1}\left( x \right){Y_1}\left( x \right) + {C_2}\left( x \right){Y_2}\left( x \right) + {C_3}\left( x \right){Y_3}\left( x \right) = \left[ { - \left( {x + 3} \right){e^{ - x}} + {A_1}} \right]{e^x} + \left[ {\left( {x - 3} \right){e^x} + {A_2}} \right]{e^{ - x}} + \left[ { - 2\ln \left| x \right| + {A_3}} \right]{x^2} = {A_1}{e^x} + {A_2}{e^{ - x}} + {A_3}{x^2} - \left( {x + 3} \right) + x - 3 - 2{x^2}\ln \left| x \right| = {A_1}{e^x} + {A_2}{e^{ - x}} + {A_3}{x^2} - 2{x^2}\ln \left| x \right| - 6.\]
Page 1 Page 2