<s>[INST] Problem solving homogenous second order DE, $x''-\frac{1}{t}x'+\frac{1}{t^2}x=0$ So, here is the DE: 
$$x''-\frac{1}{t}x'+\frac{1}{t^2}x=0$$
 I tried to solve it using a substitution of variables: $z=x' \Rightarrow x''=\frac{dx'}{t}=\frac{dz}{dt}=\frac{dz}{dx}\cdot \frac{dx}{dt}=\frac{dz}{dx}\cdot z$ Then DE can be rewritten as $$\frac{dz}{dx}z -\frac{1}{t}x'+\frac{1}{t^2}x=0$$ Then multiplying expression by $dx$ we get $$zdz-\frac{1}{t}x'dx+\frac{1}{t^2}xdx =0$$ Then taking an integrating the expression we get: $$\frac{z^2}{2}-\frac{1}{t}x+\frac{1}{2t^2}x^2=const. \; const. = k$$
$z^2=\frac{2x}{t}-\frac{x^2}{t^2}+k$ But here I already know that when I will take a square root of the right side of the expression and will try to integrate both sites, it won't give me any sensible result. So where is my mistake?
 [/INST] $$x''-\frac{1}{t}x'+\frac{1}{t^2}x=0$$
$$\implies t^2x''-tx'+x=0\tag1$$
Take $~t=e^z\implies z=\ln t~$.
$~x'=\dfrac{dx}{dt}=\dfrac{dx}{dz}\cdot \dfrac{dz}{dt}\implies \dfrac{1}{t}\cdot \dfrac{dx}{dz}\implies tx'=\dfrac{dx}{dz}=Dx~,\qquad\text{where}\quad D\equiv \dfrac{d}{dz}~$.
$~x''=\dfrac{d^2x}{dt^2}=\dfrac{d}{dt}\left[\dfrac{dx}{dt}\right]=-\dfrac{1}{t^2}\cdot \dfrac{dx}{dz}+\dfrac{1}{t}\cdot \dfrac{d^2x}{dz^2}\cdot \dfrac{dz}{dt}=-\dfrac{1}{t^2}\cdot \dfrac{dx}{dz}+\dfrac{1}{t^2}\cdot \dfrac{d^2x}{dz^2}$
$ \implies t^2x''=(D^2-D)x~$.
From $(1)$ ,
$$(D^2-D)x-Dx+x=0$$
$$\implies (D^2-2D+1)x=0\tag2$$
Let $~x=e^{mz}~$ be a trial solution of $(1)$, then putting the value of $~x~$ in $(2)$, we have $$m^2-2m+1=0\implies m=1~,~~1$$
So the general solution of $(2)$ is $$x=(A+B~z)~e^z$$where $~A,~B~$are constants of integration.
And the general solution of $(1)$ is $$ x=(A+B~\ln t)~t$$where $~A,~B~$are constants of integration.
</s>