Using the Anzats $y(t) = t^r$, we find $r(r-1)-2=0$ and thus the fundamental set of solutions $y_1(t)=t^2$ and $y_2(t)=t^{-1}$.
We have $W[y_1,y_2](t) = y_1(t)y'_2(t)-y_1'(t)y_2(t) = -t^2 t^{-2} – 2t t^{-1} = -3$.
The method of variation of parameters now gives a particular solution of the form $y_p(t) = u_1(t)y_1(t)+u_2(t)y_2(t)$ with $$u_1'(t) = -\frac{t^2 y_2(t)}{W[y_1,y_2](t)} = \frac{1}{3} t$$ and $$u_1'(t) = \frac{t^2 y_1(t)}{W[y_1,y_2](t)} = -\frac{1}{3}t^4.$$
Hence, we have $u_1(t) = \frac{1}{6}t^2$ and $u_2(t) = -\frac{1}{15}t^5$. This gives $$y_p=u_1(t)y_1(t)+u_2(t)y_2(t) = \bigg( \frac{1}{6}-\frac{1}{15} \bigg)t^4 = \frac{1}{10}t^4\ .$$
Inserting this into the ODE $L[y] = t^2y''-2y$, results in $L[y_p]=t^4$, not $t^2$.
Wolfram Alpha gives the particular solution $y_p(t) = \frac{1}{3}t^2 \log (t)$
Question: why does my application of the method of variation of parameters give a wrong particular solution? Where have I made a mistake?
Context: this is problem 2.4.9 of Braun's Differential Equations and Their Applications.
Best Answer
Put the differential equation in the classical form before to apply the method of variation of parameters: $$y''+b(t)y'+c(t)y=f(t)$$ $$y''-\dfrac 2{t^2}y=\color{red}{1}$$
So now you have that: $$u_1'(t) = -\frac{ y_2(t)}{W[y_1,y_2](t)} = \frac{1}{3t} $$ And $$u_1'(t) = \frac{ y_1(t)}{W[y_1,y_2](t)} = -\frac{1}{3}t^2$$