Using variation of parameters on $2y'' - 3y' +y = (t^2 +1)e^t$ Suppose $$2y'' - 3y' + y = (t^2 +1)e^t.$$
How do you solve this using variation of parameters? When I try solving this, I get the following answer: 
$$c_1 e^{t/2} + (c_2+\frac{2}{3}t^3 - 4t^2 + 18t)e^t,$$
but the answer in the back of the book (and from WolframAlpha) is 
$$c_1 e^{t/2} + (c_2+\frac{1}{3}t^3 - 2t^2 + 9t)e^t.$$

Here is an outline of my attempt. First, we solve
$$2y'' -3y' +y = 0$$
and find that $y_1(t) = e^{t/2}$ and $y_2(t) = e^t$ are solutions. We next find $u_1(t)$ and $u_2(t)$ so that $y(t) = u_1(t)y_1(t) + u_2(t)y_2(t)$ is a solution to the original differential equation. 
The Wronskian is $W[y_1,y_2](t) = e^{3t/2}/2$.
So, let
 $g(t) = (t^2 + 1)e^t.$ We find that 
$$u_1(t) = \int -\frac{g(t)y_2(t)}{W[y_1,y_2]}dt = -2\int(t^2+1)e^{t/2}dt.$$
Using integration by parts twice yields
$$u_1(t) = -4(t^2+1)e^{t/2} + 16te^{t/2} - 32e^{t/2},$$
which matches with what WolframAlpha says the integral is (after some slight simplifying).
Then, 
$$u_2(t) = \int \frac{g(t)y_1(t)}{W[y_1,y_2]} dt = 2\int (t^2 + 1) dt.$$
And hence $u_2(t) = 2(t^3/3 + t)$.
My solution is thus $y =(c_1 + u_1)y_1 + (c_2+u_2)y_2$, which after simplifying, gives what I wrote above (after absorbing the constant $-36$ into the constant $c_2$).
 A: We are asked to use Variation of Parameters (VoP) on
$$\tag 1 y'' - \dfrac{3}{2}y' +\dfrac{1}{2} y = \dfrac{1}{2}(t^2 +1)e^t$$
Step 1
Find the homogeneous solution to $(1)$
$$\tag 2 y'' - \dfrac{3}{2}y' + \dfrac{1}{2} y =0$$
This yields
$$y_h = c_1e^{t/2} + c_2 e^t$$
Step 2
Set $$y_1 = e^{t/2},~ y_2 = e^t,~ f = \dfrac{1}{2} (t^2 +1)e^t$$
Calculate the Wronskian of $y_1$ and $y_2$ $$W(e^{t/2}, e^t) = \dfrac{1}{2}e^{3 t/2}$$
Using VoP
$$\begin{align} u_1 &= \int \dfrac{-y_2 f}{W(e^{t/2}, e^t)}~ dt = \int \dfrac{-e^t ~(t^2 +1)e^t}{e^{3 t/2}}~ dt = - e^{t/2} \left(2 t^2-8 t+18\right) \\u_2 &= \int \dfrac{y_1 f}{W(e^{t/2}, e^t)}~ dt = \int \dfrac{e^{t/2}~(t^2 +1)e^t }{e^{3 t/2}}~ dt = \dfrac{t^3}{3}+t \end{align}$$
Now, $y_p$ is given by:
$$y_p = y_1 u_1 + y_2 u_2 = e^{t/2}\left(- e^{t/2} \left(2 t^2-8 t+18\right)\right) + e^t\left(\dfrac{t^3}{3}+t\right)$$
Step 3
Our final solution is given by (note that you will add arbitrary constants):
$$y(t) = y_h(t) + y_p(t)$$
A: There is simpler than using all this Wronskian stuff in this particular case.
First the homegenous equation $y'' - \dfrac 32y' +\dfrac{1}{2} y = 0$ resolves to $\ y_h = c_1e^{t/2} + c_2 e^t$
Now since the equation is linear, you simply need to find a particular solution with RHS$=\dfrac 12e^t(t^2+1)$
But given the fact that you already have an homogeneous solution with a term in $e^t$ then you can restrict your search for a polynomial $c_2(t)$ of degree $\deg(t^2+1)+1=3$ 
So if we set $y=(at^3+bt^2+ct+d)e^t$
We get $y'' - \dfrac 32y' +\dfrac{1}{2} y = \dfrac 12e^t\bigg(12at+4b+3at^2+2bt+c\bigg)=\dfrac 12e^t(t^2+1)$
By coefficient identification we find $a=\dfrac 13,b=-2,c=9$
And $y_p=\left(\dfrac {t^3}3-2t^2+9t\right)e^t$ leading immediately to your book solution.
