# Integrating factor

1. Nov 12, 2014

### Maylis

1. The problem statement, all variables and given/known data
$C_{B}$ is a function of $\tau'$, and $k_{1}$,$k_{2}$, and $C_{A0}$ are constants. I want to solve this differential equation
$$\frac {dC_{B}}{d \tau'} + k_{2}C_{B} = k_{1}C_{A0}e^{-k_{1} \tau'}$$

2. Relevant equations

3. The attempt at a solution
Using the integrating factor, we get
$$\frac {d(C_{B}e^{k_{2} \tau'})}{d \tau'} = k_{1}C_{A0}e^{(k_{2} - k_{1}) \tau'}$$

However, from here I am unsure how to separate this. I was thinking of using chain rule on the inside, but that seems to only get me back to where I started (that's the purpose of the integrating factor??)

2. Nov 12, 2014

### pasmith

The next step is to integrate both sides with respect to $\tau'$. By the fundamental theorem of calculus, the integral of the left hand side is
$$\int \frac{d}{d\tau'} (C_Be^{k_2 \tau'})\,d\tau' = C_Be^{k_2 \tau'} + \mbox{constant}.$$

3. Nov 12, 2014

### HallsofIvy

Staff Emeritus
I don't know what you mean by "separate" or what it is you want to "separate". There is no need to "separate" anything- just go ahead and integrate:
$$\frac{d C_Be^{k_2\tau'}}{d\tau'}= k_1C_{A0}e^{(k_2- k_1)\tau'}$$
$$\int d C_Be^{k_2\tau'}= \int k_1C_{A0}e^{(k_2- k_1)\tau'} d\tau'$$

$$C_Be^{k_2\tau'}= \frac{k_1C_{A0}}{k_2- k_1}e^{(k_2- k_1)}\tau'+ C$$

That's the whole point of an "integrating factor".

4. Nov 12, 2014

### Maylis

$$C_{B} e^{k_{2} \tau'} = \frac {k_{1}C_{A0}}{k_{2} - k_{1}} e^{(k_{2} - k_{1}) \tau'} + C$$
My boundary condition is $C_{B} = 0$ at $\tau' = 0$, this means $C = -\frac {k_{1}C_{A0}}{k_{2} - k_{1}}$

Then the solution is
$$C_{B} = \frac {k_{1}C_{A0}}{k_{2} - k_{1}} e^{(k_{2} - k_{1}) \tau'} - \frac {k_{1}C_{A0}}{k_{2} - k_{1}}$$

But the solution given is
$$C_{B} = k_{1}C_{A0} \Big( \frac {e^{-k_{1} \tau'} - e^{-k_{2} \tau'}}{k_{2} - k_{1}} \Big)$$

5. Nov 12, 2014

### pasmith

No, so far you have $$C_B e^{k_2 \tau'} = \frac {k_{1}C_{A0}}{k_{2} - k_{1}} e^{(k_{2} - k_{1}) \tau'} - \frac {k_{1}C_{A0}}{k_{2} - k_{1}}.$$
Dividing both sides by $e^{k_2 \tau'}$ yields the given solution.

6. Nov 12, 2014

### Maylis

Woops, I see where I made my mistake. Thank you!