Homogeneous linear equations of order 2 with non constant coefficients

We will show a method for solving more general ODEs of 2n order, and now we will allow non constant coefficients. The price that we have to pay is that we have to know one solution.

The method that we will give is called method of reduction of the order and will give us the second solution to an ODE if we already know one.

Let's suppose that we have an ODE:$$$a_2(x)y''+a_1(x)y'+a_0(x)y=0$$$and a solution $$y_1(x)$$ of this ODE.

The ODE$$$(x^3-2x^2)y''-(x^3+2x^2-6x)y'+(3x^2-6)y=0$$$from which we know a solution: $$y_1(x)=x^3$$.

Then we look for the second solution of the form $$$y_2(x)=y_1(x)\cdot u(x)$$$ Then: $$$\begin{array}{l} y=u\cdot y_1 \\ y'=y_1' \cdot u+y_1\cdot u' \\ y''=y_1''\cdot u +2y_1' \cdot u'+y\cdot u''\end{array}$$$ Let's designate this as a solution: $$$\begin{array}{l} a_2(x)y''+a_1(x)y'+a_0(x)y= \\ =a_2(x)\Big(y''\cdot y+2y_1'+y_1\cdot u''\Big)+a_1(x)\Big(y'\cdot u+y_1u'\Big)= \\ =u''(a_2y_1)+u'(2a_2y_1'+a_1y_1)+u(a_2y_1''+a_1y_1'+a_0y_1)\end{array}$$$ Bearing in mind that $$y_1(x)$$ is a solution, the last term is zero. Therefore: $$$u''(a_2y_1)+u'(2a_2y_1'+a_1y_1)=0$$$ This is a ficticious second order ODE, since the term without derivation does not appear.

Namely, if we introduce the change $$w(x)=u'(x)$$, we have the following homogeneous linear ODE of order 1: $$$w'(a_2y_1)+w(2a_2y_1'+a_1y_1)=0$$$

In our example, replacing the corresponding values of the coefficients, we have: $$$\begin{array}{rcl} w'\Big( x^3(x^3-2x^2)\Big)+w\Big(2(x^3-2x^2)3x^2-(x^3+2x^3-6x)x^3\Big) & = & 0 \\ w'\Big(x^6-2x^5\Big)+w\Big(6x^5-12x^4-x^6-2x^5+6x^4\Big)&=&0 \\ w'\Big(x^6-2x^5\Big)+w\Big(-x^6+4x^5-6x^4\Big)&=&0 \\ w'\Big(x-2\Big)+w\Big(x^2+4x-6\Big)&=&0\end{array}$$$ We solve this ODE and obtain $$w(x)$$. Looking for the primitive function of $$w (x)$$, we obtain $$u (x)$$.

Finally, we see that $$y_2(x)=y_1(x) \cdot u(x)$$ is the second solution, which is linearly independent of the first one.

Finally, in our example, we obtain: $$\displaystyle w(x)=\frac{e^x(x-2)}{x^3}$$ We compute the primitive function, $$u(x)=\displaystyle \int \frac{e^x (x-2)}{x^3} \ dx=\frac{e^x}{x^2}$$ So the general solution is: $$y(x)=c_1x^3+c_2xe^x$$