Respuesta :
For the corresponding homogeneous equation,
[tex]x^2y''+xy'+y=0[/tex]
we can look for a solution of the form [tex]y=x^m[/tex], with derivatives [tex]y'=mx^{m-1}[/tex] and [tex]y''=m(m-1)x^{m-2}[/tex]. Substituting these into the ODE gives
[tex]m(m-1)x^m+mx^m+x^m=0\implies m^2+1=0\implies m=\pm i[/tex]
which admits two solutions, [tex]y_1=x^i[/tex] and [tex]y_2=x^{-i}[/tex], which we can write as
[tex]x^i=e^{\ln x^i}=e^{i\ln x}=\cos(\ln x)+i\sin(\ln x)[/tex]
and by the same token,
[tex]x^{-i}=\cos(\ln x)-i\sin(\ln x)[/tex]
so we see two independent solutions that make up the characteristic solution,
[tex]y_c=C_1\cos(\ln x)+C_2\sin(\ln x)[/tex]
For the non-homogeneous ODE, we make the substitution
[tex]x=e^t\iff t=\ln x[/tex]
so that by the chain rule, the first derivative becomes
[tex]\dfrac{\mathrm dy}{\mathrm dx}=\dfrac{\mathrm dy}{\mathrm dt}\dfrac{\mathrm dt}{\mathrm dx}=\dfrac{\mathrm dy}{\mathrm dt}\dfrac1x[/tex]
[tex]\dfrac{\mathrm dy}{\mathrm dx}=e^{-t}\dfrac{\mathrm dy}{\mathrm dt}[/tex]
Let [tex]f(t)=\dfrac{\mathrm dy}{\mathrm dx}[/tex]. Then the second derivative becomes
[tex]\dfrac{\mathrm d^2y}{\mathrm dx^2}=\dfrac{\mathrm df}{\mathrm dx}=\dfrac{\mathrm df}{\mathrm dt}\dfrac{\mathrm dt}{\mathrm dx}=\left(-e^{-t}\dfrac{\mathrm dy}{\mathrm dt}+e^{-t}\dfrac{\mathrm d^2y}{\mathrm dt^2}\right)\dfrac1x[/tex]
[tex]\dfrac{\mathrm d^2y}{\mathrm dx^2}=e^{-2t}\left(\dfrac{\mathrm d^2y}{\mathrm dt^2}-\dfrac{\mathrm dy}{\mathrm dt}\right)[/tex]
Substituting these into the ODE gives
[tex]e^{2t}\left(e^{-2t}\left(\dfrac{\mathrm d^2y}{\mathrm dt^2}-\dfrac{\mathrm dy}{\mathrm dt}\right)\right)+e^t\left(e^{-t}\dfrac{\mathrm dy}{\mathrm dt}\right)+y=t^2+2e^t[/tex]
[tex]y''+y=t^2+2e^t[/tex]
Look for a particular solution [tex]y_p=a_0+a_1t+a_2t^2+be^t[/tex], which has second derivative [tex]{y_p}''=2a_2+be^t[/tex]. Substituting these into the ODE gives
[tex](2a_2+be^t)+(a_0+a_1t+a_2t^2+be^t)=t^2+2e^t[/tex]
[tex](2a_2+a_0)+a_1t+a_2t^2+2be^t=t^2+2e^t[/tex]
[tex]\implies a_0=-2,a_1=0,a_2=1,b=1[/tex]
so that the particular solution is
[tex]y_p=t^2-2+e^t[/tex]
Solving in terms of [tex]x[/tex] gives the solution
[tex]y_p=(\ln x)^2-2+x[/tex]
and the overall general solution is
[tex]y=y_c+y_p[/tex]
[tex]\boxed{y=C_1\cos(\ln x)+C_2\sin(\ln x)+(\ln x)^2-2+x}[/tex]