I'm trying to solve the following problem. Given the following system of differential equations
$\frac{dN_1}{dt}=-\lambda_1 \cdot N_1$
$\frac{dN_2}{dt}=\lambda_1 \cdot N_1 -\lambda_2 \cdot N_2$
$\frac{dN_3}{dt}= \lambda_2 \cdot N_2$
Setting $N_1(0)=N_{01}$, $N_2(0)=N_{02}$ and $N_3(0)=N_{03}$ find the solutions.
My problem is the final one, $\frac{dN_3}{dt}$. I've been told that the solution to this differential equation is given as
$N_3(t)=\frac{\lambda_1 \cdot \lambda_2}{\lambda_2-\lambda_1} \cdot N_{01} \cdot (\frac{e^{-\lambda_2\cdot t}}{\lambda_2}-\frac{e^{-\lambda_1\cdot t}}{\lambda_1})-N_{02}\cdot e^{-\lambda_2t}+(N_{01}+N_{02}+N_{03})$
My work so far:
I've managed to show that
$N_2(t)=\frac{\lambda_1}{\lambda_2-\lambda_1} \cdot N_{01} \cdot (e^{-\lambda_1t}-e^{-\lambda_2t})+N_{02}\cdot e^{-\lambda_2t}$
Inserting this into $\frac{dN_3}{dt}= \lambda_2 \cdot N_2$ gets me:
$\frac{dN_3}{dt}=N_2(t)=\frac{\lambda_2 \cdot \lambda_1}{\lambda_2-\lambda_1} \cdot N_{01} \cdot (e^{-\lambda_1t}-e^{-\lambda_2t})+N_{02}\cdot e^{-\lambda_2t}$
and integrating both sides, I get (rewriting slightly)
$N_{03}(t)=\frac{\lambda_2 \cdot \lambda_1}{\lambda_2-\lambda1}\cdot N_{01} \cdot (\frac{e^{-\lambda_2\cdot t}}{\lambda_2}-\frac{e^{-\lambda_1\cdot t}}{\lambda_1})-\frac{N_{02}}{-\lambda_2}\cdot e^{-\lambda_2t}+c$
I can solve for $c$ to get $c=N_{01}+N_{0_3}+N_{02} \cdot \frac{1}{\lambda_2}$, but I can't seem to get rid of the term $\frac{1}{-\lambda_2}$ to get the desired expression of $N_3(t)$.
Any help is appreciated.
Glad you have found your solution, but an alternative approach
$\frac{dN_1}{dt}=-\lambda_1 \cdot N_1$
$\frac{dN_2}{dt}=\lambda_1 \cdot N_1 -\lambda_2 \cdot N_2$
$\frac{dN_3}{dt}= \lambda_2 \cdot N_2$
Can be integrated at once $$ \frac{dN_2}{dt} = -\frac{dN_1}{dt} - \frac{dN_3}{dt} \implies\frac{d}{dt}\left(N_2 + N_1 + N_3\right) = 0 $$ so we have $$ N_2 + N_1 + N_3 = k $$ where $k$ is a constant which we know in terms of initial conditions
This means that you only need to find 2 of the 3 functions as the final one is fixed by the constant. This is not helpful here, as you already done the hard work, but for future reference try to see if you can find this conservative property which means you can do less work.