# Homework Help: How to solve this differential equation?

1. Sep 27, 2011

### zheng89120

1. The problem statement, all variables and given/known data

Assume NA = NAo exp(-t/a)

Solve the differential equation:

dNB/dt + NB/b = NA/a

2. Relevant equations

differential equations

3. The attempt at a solution

trial function: NB = C exp(-t/a) + D exp (-t/b)

with initial condition: C + D = NBo

I tried plugging in this and NA into the original equation, but was not able to solve for C or D...

2. Sep 27, 2011

### vela

Staff Emeritus
Show us what you got because what you described should work.

Note that the D term will vanish when you plug it in because it's the solution to the homogeneous differential equation. This allows you to solve for C.

3. Sep 27, 2011

### zheng89120

Unfortunately I don't really have much experience with this kind of differential equation. After I substituted the trial function and C = NB - D into the equation, I got:

[ -(NB-D)/a*exp(-t/a) - D/b*exp(-t/b) ] + [ NB-D/b*exp(-t/a) - D/b*exp(-t/b) ] = NA/a*exp(-t/a)

how would you solve 'D' from this?

4. Sep 27, 2011

### vela

Staff Emeritus
You want to plug the trial function into the differential equation:
$$\frac{d}{dt}(C e^{-t/a} + D e^{-t/b}) +\frac{1}{b}(C e^{-t/a} + D e^{-t/b}) = \frac{N_{A_0}}{a} e^{-t/a}$$
When you differentiate the first term, you'll see the e-t/b terms cancel out, which leaves only the e-t/a terms, allowing you to solve for C. Once you know C, you can solve for D.

5. Sep 27, 2011

### zheng89120

Ok, thanks for the insightful help, vela. This is what I got for NB, with D=NBo-C :

NB = [NAo / (a/b-1)] *exp(-t/a) + [NBo - NAo / (a/b - 1)] *exp(-t/b)

assuming this is correct.