# Integrating Factor - Not getting the answer given?

$y' - 4y = t$

My integrating factor is $e^{-4t}$

$\int e^{-4t}y'$ - $\int 4e^{-4t}y$ = $\int te^{-4t}$

$\int (e^{-4t}y)'$ = $\int te^{-4t}$

$e^{-4t}y$ = $-4te^{-4t}$ - $e^{-4t}$

I end up with $y' = -4t -1 + ce^{4t}$

Where did I go wrong?

-
We can't tell you where you went wrong unless you show us your workings. –  lemon Apr 26 '14 at 16:34
Added some steps –  Finance Apr 26 '14 at 16:42
check integration by parts again –  ketan Apr 26 '14 at 16:47
A different way to tackle this ODE, is to recall that any solution $\varphi$ equals $\varphi_h+\varphi_p$ where $\varphi_h$ is a solution of $y'-4y=\bf 0$ and $\varphi _p$ is one solution of $y'(t)-4y(t)=t$. It easy to guess a solution $\varphi _p$ just by looking, because the RHS is a polynomial. One can see that $\varphi_p$ given by $\varphi_p(t)=-\dfrac {1}4\left(t+\dfrac 1 4\right)$ is a solution and $\varphi _h$ is very easy to find. –  Git Gud Apr 26 '14 at 17:06
@GitGud Is there somewhere explaining this method more thoroughly that can be applied to more complex ODE's? –  Finance Apr 26 '14 at 17:56

Let $u=t$, $du=dt$, $dv=e^{-4t}$, and $v=-\cfrac{1}{4}e^{-4t}$, then using integration by parts, $\displaystyle\int te^{-4t}\, dt$ should be \begin{align} \int te^{-4t}\, dt&=-\cfrac{t}{4}e^{-4t}+\cfrac{1}{4}\int e^{-4t}\,dt\\ &=-\cfrac{t}{4}e^{-4t}+\cfrac{1}{4}\left(-\cfrac{1}{4}e^{-4t}\right)+C\\ &=-\cfrac{t}{4}e^{-4t}-\cfrac{1}{16}e^{-4t}+C\\ \end{align}
You integrated $\int te^{-4t}\mathrm dt$ incorrectly. It should be $$\int te^{-4t}\mathrm dt=-\dfrac{t}{4}e^{-4t}-\dfrac{1}{16}e^{-4t}+c$$ Then multiplying both sides by $e^{4t}$ gives you $$y=-\dfrac{t}{4}-\dfrac{1}{16}+ce^{4t}$$