Separation of Variables

1. Jan 19, 2012

Dustinsfl

$$\displaystyle\frac{dN}{dt} = rN\left(1-\frac{N}{K}\right)$$

$$\displaystyle\int\frac{KdN}{N\left(K-N\right)} = \int rdt$$

$$\displaystyle K\int\frac{dN}{N}-K\int\frac{dN}{K-N}=r\int dt$$

Now, I obtain:

$$K\ln\left(\frac{N}{K-N}\right) = rt+c$$

$$\left(\frac{N}{K-N}\right)^K=C_0r^{rt}$$

The final solution is $$N(t) =\frac{C_0Ke^{rt}}{K+C_0(e^{rt}-1)}$$

I don't see how I can manipulate my equation to that. Is there a mistake or am I not seeing something.

Last edited: Jan 19, 2012
2. Jan 19, 2012

Dick

On the left side, you seem to have changed $\frac{K}{N (K-N)}$ into $\frac{K}{N} - \frac{K}{K-N}$. That's not right at all.

3. Jan 19, 2012

Dustinsfl

It should be $$\frac{N}{K-N} = C_0e^{rt}$$

Correct?

4. Jan 19, 2012

Dick

You didn't do partial fractions correctly the first time. That looks like a step in the right direction, yes.

5. Jan 19, 2012

Dustinsfl

There is still something wrong...

From that, I end up with:

$$N = KC_0e^{rt}-NC_0e^{rt} \Rightarrow N(t)=\frac{KC_0e^{rt}}{1+C_0e^{rt}}$$

I have a sign issue and I am missing a K.

6. Jan 19, 2012

SammyS

Staff Emeritus
It's not true that
$\displaystyle \int\frac{KdN}{N\left(K-N\right)} =K\int\frac{dN}{N}-K\int\frac{dN}{K-N}$​
You cannot break up an integral that way.

$\displaystyle\frac{1}{N}+\frac{1}{K-N}\ne\frac{1}{N(K-N)}\,,$

However, $\displaystyle \frac{1}{K}\left(\frac{1}{N}+\frac{1}{K-N}\right)=\frac{1}{N(K-N)}\,,$ which is a result that can be obtained using partial fraction decomposition.

7. Jan 20, 2012

Dustinsfl

I know, I have fixed that part.

8. Jan 20, 2012

Dustinsfl

But I can't figure out how to manipulate that into

$$N(t)=\frac{N_0Ke^{rt}}{K+N_0(e^{rt}-1)}$$

I forgot to mention that $$N(0)=N_0$$

9. Jan 20, 2012

Dick

Use the form you derived before.
$$N(t)=\frac{KC_0e^{rt}}{1+C_0e^{rt}}$$.
That tells you
$$N_0=\frac{KC_0}{1+C_0}$$
That's the relation between the two constants in the two different forms.

10. Jan 20, 2012

Dustinsfl

I have all that, but I still can't get to the final form. I tried solving for C but that didn't go anywhere fruitful.

11. Jan 20, 2012

Dick

You seem to have exactly the right idea of what to do. Solve for C_0 in terms of N_0 and substitute that back into N(t). It works for me. If it doesn't go anywhere fruitful for you can you show why not?

12. Jan 20, 2012

Dustinsfl

Just to verify, this what you get when you substitute correct?

$$\displaystyle N(t)=\frac{K\left(\frac{N_0}{K-N_0}\right)e^{rt}}{1+\left(\frac{N_0}{K-N_0}\right)e^{rt}}$$

13. Jan 20, 2012

Dick

Sure. Continue.

14. Jan 20, 2012

Dustinsfl

I got it. I don't know what the problem was earlier.

Thanks.