Solving linear Ordinary differential equations with variable coefficients $$x^3y'' - 3x^2y' + xy = \sin \ln x + 1; y' = \frac{d}{dx}$$
How can I solve this equation?
 A: $$(x^3)y'' - 3(x^2)y' + xy = \sin(\ln x) + 1 $$ 
divide by x
$$x^2y'' - 3xy' + y = \frac{\sin(\ln x) + 1}{x} $$ 
the solution of homogeneous equation 
$$x^2y''-3xy'+y=0$$
this is Euler-cauchy equation
so
$$r(r-1)-3r+1=0$$
$$r^2-4r+1-0$$
$$r_{1,2}=2\pm \sqrt{3}$$
$$y_c=c_1x^{2+\sqrt{3}}+c_2x^{2-\sqrt{3}}$$
to find the general solution, use the variation of parameters method
so that
$$y=u_1x^{2+\sqrt{3}}+u_2x^{2-\sqrt{3}}$$
A: Given the expression of the RHS, I would try the substitution $\ln x=t$.
Then
$$\frac{dy}{dx}=\frac{dy}{dt}\frac{dt}{dx}=\dot ye^{-t}$$ and $$\frac{d^2y}{dx^2}=(\ddot y-\dot y)e^{-2t}.$$
The equation becomes
$$e^{3t}(\ddot y-\dot y)e^{-2t}- 3e^{2t}\dot y e^{-t} + e^ty = \sin(t) + 1,$$
or
$$\ddot y-4\dot y+y=(\sin t+1)e^{-t}.$$
Then general solution will be of the form
$$y=C_0e^{r_0t}+C_1e^{r_1t}+(A\cos t+B\sin t-1)e^{-t},$$ (with $r_0,r_1$ roots of the characteristic equation and $A,B$ to be determined by identification) i.e.
$$y=C_0x^{r_0}+C_1x^{r_1}+\frac{A\cos\ln x+B\sin\ln x-1}x.$$
A: Another approach, with change of variable in order to simplify the ODE :

