Solve the differential equation $t^2y''+3ty'+y=\frac{1}{t}$ Solve the equation 
$$t^2y''+3ty'+y=\frac{1}{t}$$ with $t \gt 0$
My try:
The given differential equation is actually of second order:
Let us use the substitution:
$ty=p$
$$ty'+y=\frac{dp}{dt}-(1)$$
$$ty''+2y'=\frac{d^2p}{dt^2}$$
$$t^2y''+2ty'=t\frac{d^2p}{dt^2}-(2)$$
Adding (1) and (2) we get:
$$t^2y''+3ty'+y=t\frac{d^2p}{dt^2}+\frac{dp}{dt}$$
Hence the equation is now:
$$t\frac{d^2p}{dt^2}+\frac{dp}{dt}=\frac{1}{t}$$
Let us use another substitution:
$\frac{dp}{dt}=q$
Then the equation is:
$$t\frac{dq}{dt}+q=\frac{1}{t}$$
$$\frac{dq}{dt}+\frac{q}{t}=\frac{1}{t^2}$$
Which is a Linear first order differential equation with integrating factor given by:
$$I(t)=e^{\int \frac{dt}{t}}=e^{\ln|t|}=|t|=t$$
The solution is:
$$qt=\int \frac{dt}{t}+C$$
$$qt=\ln t+C$$
$$q=\frac{\ln t+C}{t}$$
Now we get:
$$\frac{dp}{dt}=\frac{\ln t+C}{t}$$
Integrating we get:
$$p=\int \frac{ln t}{t}+\int \frac{C}{t}+D$$
$$p=\frac{1}{2}\left(\ln t\right)^2+C\ln(t)+D$$
Hence the final solution is:
$$ty=\frac{1}{2}\left(\ln t\right)^2+C\ln(t)+D$$
$$y=\frac{\frac{1}{2}\left(\ln t\right)^2+C\ln(t)+D}{t}$$
Where $C$ and $D$ are constants:
Is there any different approach?
 A: The given ODE reduces to the following solution
\begin{align*}
& t^{2}y^{\prime\prime} + 3ty^{\prime} + y = \frac{1}{t} \Leftrightarrow (t^{2}y^{\prime\prime} + 2ty^{\prime}) + (ty^{\prime} + y) = \frac{1}{t} \Leftrightarrow (t^{2}y^{\prime})^{\prime} + (ty)^{\prime} = \frac{1}{t} \Leftrightarrow\\
&\int (t^{2}y^{\prime})^{\prime}\mathrm{d}t + \int (ty)^{\prime}\mathrm{d}t = \int\frac{1}{t}\mathrm{d}t \Leftrightarrow t^{2}y^{\prime} + ty = \ln|t| + c \Leftrightarrow ty^{\prime} + y = \frac{\ln|t| + c}{t} \Leftrightarrow\\
& (ty)^{\prime} = \frac{\ln|t| + c}{t} \Leftrightarrow \int(ty)^{\prime}\mathrm{d}t = \int\left(\frac{\ln|t|}{t} + \frac{c}{t}\right)\mathrm{d}t \Leftrightarrow y(t) = \frac{\ln^{2}|t|}{2t} + \frac{c\ln|t|}{t} + \frac{k}{t}
\end{align*}
A: The homogeneous equation is of Euler-Cauchy type, looking for basis solutions of the form $t^r$ leads to
$$
0=r(r-1)+3r+1=(r+1)^2.
$$
The basis solutions for this double root are thus $t^{-1}$, $t^{-1}\ln t$. 
As the right side has the same exponent $-1$, the method of undetermined coefficients provides indeed that the particular solution is of the form $y_p=Ct^{-1}(\ln t)^2$. Insertion into the equation allows then to compute $C$.
