#### Answer

$$y= \left( - t^2-2( t+1 )+6e^t\right).$$

#### Work Step by Step

This is a linear equation and has the integrating factor as follows
$$\alpha(t)= e^{\int P(t)dt}=e^{ \int - dt}=e^{-t}.$$
Now the general solution is \begin{align} y& =\alpha^{-1}(t)\left( \int\alpha(t) Q(t)dt +C\right)\\ & =e^t\left( \int e^{-t}t^2dt+C\right)\\ & =e^t\left( -e^{-t}t^2-2( e^{-t}t+ e^{-t})+C\right)\\ & = \left( - t^2-2( t+1 )+Ce^t\right) \end{align} where we used integration by parts. Since $y(0)=4$, then $4=-2+C$ and hence $C=6$. Thus, the general solution is: $$y= \left( - t^2-2( t+1 )+6e^t\right).$$