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?
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*}