Using an integrating factor to solve an ODE I have been simply asked to integrate the following:
$dc/dt = 1-c-a c$.
I have used the integrating factor as $e^{(1+a) t}$.
Then finish with $c=1/(1+a)$, however my lecturer gets $c=\frac{1}{1+a}(1-e^{(a+1)t})$.
Could anyone at all show me the method to get this. I know it is meant to be a relatively easy question, but  i just don't know  what i am doing wrong. 
Thank you.
 A: $$
\frac{dc}{dt}+(1+a)c = 1
$$
multiply by integrating factor $e^{(1+a)t}$:
$$\begin{align}
&e^{(1+a)t}\frac{dc}{dt}+(1+a)e^{(1+a)t}c=e^{(1+a)t}
\\
&\frac{d}{dt}\left(e^{(1+a)t}c\right)=e^{(1+a)t}
\\
&e^{(1+a)t}c = \int e^{(1+a)t}\,dt = \frac{e^{(1+a)t}}{1+a}+A
\\
&c = \frac{1}{1+a}+Ae^{-(1+a)t}
\end{align}$$
for some constant $A$.  Presumably there is an initial condition (that R.M. has not told us) to let the lecturer determine the constant $A$
A: I don't think integrating factors are needed here.
Note that
$$
\begin{align}
t
&=\int\frac{\mathrm{d}c}{1-(a+1)c}\\
&=-\frac{1}{a+1}\log(1-(a+1)c)+t_0\tag{1}
\end{align}
$$
Solving $(1)$ yields
$$
\begin{align}
c
&=\frac{1}{a+1}\left(1-e^{-(a+1)(t-t_0)}\right)\\
&=\frac{1}{a+1}-\left(\frac{1}{a+1}-c_0\right)e^{-(a+1)t}\tag{2}
\end{align}
$$
$c=\dfrac{1}{a+1}$ is a particular solution of $(2)$ with $c_0=\frac{1}{a+1}$ ($t_0=-\infty$),
A: what @robjohn said is true:
because of the nature of this equation it is separable so an integrating factor is not strictly necessary. but because you requested it be done in that method:
first consider the form of the equation for an integrating factor: 
A differential equation of the form $y' + P(x)y = Q(x) $ can be solved by 
$ y = \frac{\int{\mu Q(x)} dx}{\mu} + \frac{k}{\mu} $ where $k$ is an arbitrary constant and $\mu $ is the integrating factor ($\mu = e^{\int{P(x)}dx}$)
Let's fit your equation into the form needed for the method of integrating factors (In your case, $y$ is $c$ ): 
$ c' + c(1+a) = 1 $
so you should obtain for an integrating factor of $ \mu = e^{\int{(1+a)}dt} = e^{t(1+a)} $
so $ c = \frac{1}{e^{t(1+a)}} \int{(e^{t(1+a)})dt} + \frac{k}{e^{t(1+a)}}$
if you integrated correctly, you should get $\int{(e^{t(1+a)})dt} = \frac{1}{1+a}e^{t(1+a)}$ which you will find nicely cancels with the integrating factor, $\mu$ which is already in the denominator. So your final answer should be

$ c = \frac{1}{1+a} + \frac{k}{e^{t(1+a)}} = \frac{1}{1+a} + ke^{-t(1+a)} $ 
