Find the general solution for $t^2y'' -2y = t^2 -1$ The question already gives $y_1=t^2$ and $y_2=t^{-1}$ as solutions to the homogeneous equation.
So the homogeneous equation is:
$y_h = c_1t^2 + c_2t^{-1}$
So we need to find the particular solution, we have a polynomial as the RHS of the EDO, so our $y_p$ will be
$y_p = At^2 + Bt + C$
$\Rightarrow y_p'= 2At + B$
$\Rightarrow y_p''= 2A$
We substitute our findings in the EDO:
$t^2(2A) - 2(At^2+Bt+C) = t^2 - 1$
$-2Bt - 2C = t^2 - 1$
$\Rightarrow -2B = 0, -2C = -1$
$\Rightarrow B = 0, C = 1/2, A = ???$
The part of the LHS that was multiplying A cancelled itself, so we can't determine A. What should I do in this situation?
 A: HINT
Here I propose an alternative way to solve it for the sake of curiosity.
We can rearrange the LHS in order to obtain:
\begin{align*}
t^{2}y'' - 2y = t^{2} - 1 & \Longleftrightarrow (t^{2}y'' + 2ty') - (2ty' + 2y) = t^{2} - 1\\\\
& \Longleftrightarrow (t^{2}y')' - 2(ty)' = t^{2} - 1\\\\
& \Longleftrightarrow t^{2}y' - 2ty = \frac{t^{3}}{3} - t + c\\\\
& \Longleftrightarrow y' - \frac{2y}{t} = \frac{t}{3} - \frac{1}{t} + \frac{c}{t^{2}}
\end{align*}
where you can apply the integrating factor method.
Can you take it from here?
A: When the forcing function $t^2-1$  matches one of the homogeneous solutions, you have to toss in a factor of $\ln t$.  Try instead
$$y_p = At^2\ln t + Bt \ln t + C\ln t.$$
(This is the equivalent of the constant coefficient case when you multiply by $t$ when the forcing function matches a homogeneous solution.)
A: $$t^2y'' -2y = t^2 $$
$$\implies y_p=At^2\ln t$$
And for the second DE:
$$t^2y'' -2y =  -1$$
you need $y_p=B$.
So that for the original DE:
$$t^2y'' -2y = t^2 -1$$
$$\implies y_p=At^2 \ln t+ B$$
