Solution of the first order equation $y'=\lambda y-\lambda e^{\lambda t}$ I've been trying to solve this first order ODE $y'=\lambda y-\lambda e^{\lambda t}$ but to no avail.
Here is what I've done.
$y'=\lambda( y- e^{\lambda t})$
$\implies \int\frac{1}{y-e^{\lambda t}}\frac{dy}{dt}dt=\int\lambda dt$
$\implies \int\frac{1}{y-e^{\lambda t}}dy=\int\lambda dt$
$\implies \ln  \left( y-{{\rm e}^{\lambda\,t}} \right)=\lambda t+c$
$\implies y-{{\rm e}^{\lambda\,t}}=Ae^{\lambda t}$ where $A=e^c.$
$\implies y=(A+1)e^{\lambda t}$ but Maple is providing the solution as $y=(A-t\lambda)e^{\lambda t}$. Where I'm I missing it? 
 A: $y'=\lambda y-\lambda e^{\lambda t}$
$-\lambda e^{\lambda t}= y'-\lambda y =e^{\lambda t}\left(e^{-\lambda t}y(t)\right)'   $
$\left(e^{-\lambda t}y(t)\right)'  =  -\lambda $
$e^{-\lambda t}y(t) = -\lambda t +c$
$y(t) = -\lambda te^{\lambda t} +ce^{\lambda t},$
$c\in \mathbb R$
A: As Kenny mentioned in the comments, you cannot treat t as a constant in the integral on the left side of your equation while you integrate t as a variable on the right.  Also as projectilemotion mentioned in the comments, this problem can be solved via integrating factor.
$y' = \lambda y - \lambda e^{\lambda t}$
$\implies y' - \lambda y = - \lambda e^{\lambda t}$
Now multiply by the integrating factor $e^{-\lambda t}$ to get
$y'e^{- \lambda t} - \lambda y e^{-\lambda t} = - \lambda$
$\implies (y e^{- \lambda t})' = - \lambda$
Then integrate with respect to  t to get
$ y e^{- \lambda t} = - \lambda t + A$
So that
$y = -\lambda t e^{\lambda t} + A e^{\lambda t} = (A - \lambda t)e^{\lambda t}$
A: Hint: Your equation has the form $y'+p(t)y=q(t)$. This is a first order, non-homogeneous differential equation.  This type of differential equation can be solved by applying variation of parameters. Rearranging your equation: $y'-\lambda y=-\lambda e^{\lambda t}$
In your case $p(t)=-\lambda$ and  $q(t)=-\lambda e^{\lambda t}$.
