Not getting the right answer to $t^2 y'' -2y = 3t^2-1$, given $y_1(t) =t^2$ and $y_2(t) = \dfrac 1t$ I am trying to find a particular solution of $t^2 y'' -2y = 3t^2-1$, given that $y_1(t) =t^2$ and $y_2(t) = \dfrac 1t$ are solutions to the corresponding homogenous equation. I rewrote the equation as $y'' - \dfrac {2}{t^2}y = 3 - \dfrac {1}{t^2}$
The formula for a particular solution $Y(t)$ is $ \displaystyle Y(t)=-y_1(t) \int \dfrac {y_2(t) g(t)}{W(y_1, y_2)(t)} dt +y_2(t) \int \dfrac {y_1(t) g(t)}{W(y_1, y_2)(t)} dt$ 
I calculated that $W(y_1, y_2)(t)=-3$. Now $\displaystyle \int \dfrac {y_2(t) g(t)}{W(y_1, y_2)(t)} dt = \int \dfrac {\frac 1t \left(3-\frac {1}{t^2} \right)}{-3} dt = - \dfrac 13 \int \left(\dfrac 3t - \dfrac {1}{t^3}\right)  dt = -\dfrac 13 \left( \ln t - \dfrac {1}{2t^2}\right) $
$= -\dfrac 13 \ln t + \dfrac {1}{6t^2}$
Similarly, $\displaystyle \int \dfrac {y_1(t) g(t)}{W(y_1, y_2)(t)} dt = \int \dfrac {t^2 \left(3-\frac {1}{t^2} \right)}{-3} dt = - \dfrac 13 \int \left(3t^2 - 1\right)  dt = -\dfrac 13 \left(t^3-t \right) = -\dfrac {1}{3}t^3 + \dfrac 13t$
Plugging in the formula, 
$-y_1(t)\left(-\dfrac 13 \ln t + \dfrac {1}{6t^2} \right) + y_2(t) \left( -\dfrac {1}{3}t^3 + \dfrac 13t \right) = -t^2\left(-\dfrac 13 \ln t + \dfrac {1}{6t^2} \right) + \dfrac 1t \left( -\dfrac {1}{3}t^3 + \dfrac 13t \right)$
$= \dfrac {t^2}{3} \ln {t} - \dfrac 16 - \dfrac {1}{3} t^2 + \dfrac 13 = \dfrac {t^2}{3} \ln {t}  - \dfrac {1}{3} t^2 + \dfrac 16 $
However, the book says that the answer is $Y(t) = \dfrac 12 + t^2 \ln t$, and WolframAlpha confirms this.
 A: 
The following line is incorrect:
  $$\displaystyle \int \dfrac {y_2(t) g(t)}{W(y_1, y_2)(t)} dt = \int \dfrac {\frac 1t \left(3-\frac {1}{t^2} \right)}{-3} dt = - \dfrac 13 \int \left(\dfrac 3t - \dfrac {1}{t^3}\right)  dt = -\dfrac 13 \left( \ln t - \dfrac {1}{2t^2}\right)$$

This is simply because:
$$\int \frac{3}{t}~dt=3\ln{t}+C \\ \int \frac{1}{t^3}~dt=-\frac{1}{2t^2}+C$$
Doing the integration correctly results in:
$$\int \dfrac {y_2(t) g(t)}{W(y_1, y_2)(t)} dt=-\frac{1}{3}\int \left(\dfrac 3t - \dfrac {1}{t^3}\right)  dt=-\frac{1}{3}\left(3\ln{t}+\frac{1}{2t^2}\right)=-\ln{t}-\frac{1}{6t^2}$$
Note that I omitted the constant of integration because it will be absorbed by the arbitrary constant in the complementary solution after multiplication by $y_1(t)$.
Substituting this into your formula for the particular solution will give you the result you require.

Edit: Added some information I wrote on the comments, since I see you did not notice that you could remove the $-\frac{1}{3}t^2$ from your incorrect solution:
Note that if you just simply plug it into your formula after fixing the integration, you should obtain:

  \begin{align} y_p(t)=t^2\ln{t}-\frac{1}{3}t^2+\frac{1}{2} \end{align}

However, remember that the $t^2$ term is already in your complementary solution:

 \begin{align} y(t)=y_c(t)+y_p(t)=c_1 t^2+\frac{c_2}{t}+t^2\ln{t}-\frac{1}{3}t^2+\frac{1}{2}=k_1 t^2+\frac{c_2}{t}+t^2\ln{t}+\frac{1}{2}\end{align}

Where $k_1=c_1-\frac{1}{3}$. Therefore, you can write your particular solution more simply as:

  \begin{align} y_p(t)=t^2\ln{t}+\frac{1}{2} \end{align}

This is exactly the same result your book suggests.
