# Separating an ODE

1. May 21, 2007

### John O' Meara

The rate of growth of the population x of a country is proportional to the product of x and (M-x), where M is a constant. Assume that x can be regarded as a continuous function of the time t with a continuous derivative at all times and show that if x=M/2 when t=50 then
$$x=\frac{M}{1+\exp^{-Mk(t-50)}} \\$$.
My attempt:
$$\frac{dx}{dt} \propto x(M-x)$$ Therefore
$$\int\frac{1}{x(M-x)}dx = k\int dt$$ Solving the first integral, using partial fractions, we get:
$$\int \frac{1}{x(M-x)} dx = \frac{-1}{M} \int \frac{1}{x} dx + \frac{1}{M} \int \frac{1}{m-x} dx \\$$
Solving the 2nd integral on the l.h.s., let u=M-x => -du=dx, therefore $$\int \frac{1}{x(M-x)} dx = \frac{-1}{M} \ln{x} + \frac{-1}{M} \int \frac{1}{u}du \\$$ =-1/M(ln(x) + ln(m-x)) = -1/M*ln(x(M-x)) = $$k\int dt$$.
Therefore ln(x(M-x)) = -M*k*t - M*c. => $$x(M-x) = \exp{-M(kt+c)}$$.
As you can see x is not separated, but I cannot find the mistake/s that gave rise to this. Thanks for helping.

Last edited: May 21, 2007
2. May 21, 2007

### neutrino

Recheck the integration by partial fractions.

3. May 21, 2007

### John O' Meara

I now get x/(M-x) =$$\exp{-M(kt+c)$$

4. May 21, 2007

### neutrino

What you wrote as

$$\int \frac{1}{x(M-x)} dx = \frac{-1}{M} \int \frac{1}{x} dx + \frac{1}{M} \int\frac{1}{m-x} dx \\$$

should have been...

$$\int \frac{1}{x(M-x)} dx = \frac{1}{M} \int \frac{1}{x} dx + \frac{1}{M} \int \frac{1}{M-x} dx \\$$

i.e.No minus signs.

$$\frac{1}{M}\left[\ln{x} - \ln{\left(M-x\right)}\right] = k\int{dt}$$