# Differential Equation $\frac{dP}{dt} = kP(1-P)$

I have a question about solving this differential equation.

So, the question is to solve it given that $P(0)=\frac23$

So this is what I've done so far

$$\frac{dP}{dt} = kP(1-P)$$ $$k\,dt = \frac{dP}{P(1-P)}$$ $$\int{k\,dt} = \int\frac{dP}{P(1-P)}$$ $$kt + C = \ln(P) - \ln(1-P)$$ $$\frac23k + C = \ln(0) - \ln(1)$$

This is where I'm lost in finding $C$ because $\ln(0)$ is $-\infty$ Am I doing something wrong?

• @Semiclassical Oh, yeah. Forgot about that! My main point was that the integral of the product is not necessarily the product of the integrals. – beep-boop Jul 29 '14 at 21:53
• @alexqwx He didn't multiply them; he used partial fractions then integrated. – Jam Jul 29 '14 at 21:53
• @alexqwx Very true. I find it quite irksome when people omit the absolute values :) – Jam Jul 29 '14 at 21:57
• @IlikeSerena $P(t)$ was originally population as a function of time but he got his variables the wrong way round (it was supposed to be $P(\frac{2}{3})=0$). Here's the original question bit.ly/WM7HwT . I didn't report this one as a duplicate because there were no answers on the previous one. – Jam Jul 29 '14 at 22:09
• @IlikeSerena Sorry about that, Panthy's right; he originally wrote it as $P(0)=\frac{2}{3}$ with $P$ as population in $10\,000$'s. – Jam Jul 29 '14 at 22:15

You're right on track except for the last step.

When filling in $P(0)=\frac23$, you should fill in $t=0$ and $P=\frac 23$. So: $$kt+C=\ln P - \ln(1-P)$$ $$k\cdot 0+C=\ln \frac23 - \ln(1-\frac23)$$ $$C=\ln 2$$

• Ah thank you, silly mistake on my part! – Panthy Jul 29 '14 at 21:55

You set $P=0$ and $t=2/3$.

But you needed $t=0$ and $P=2/3$.

You found

$$kt+C=\ln(P(t))-\ln(1-P(t))$$ so for $t=0$ and since $P(0)=\frac23$ we have $$C=\ln\left(\frac{\frac23}{1-\frac23}\right)=\ln2$$ Now we express $P$ as function of $t$ so $$\frac{P(t)}{1-P(t)}=2e^{kt}\iff P(t)=2e^{kt}-2P(t)e^{kt}\iff P(t)=\frac{2e^{kt}}{1+2e^{kt}}$$

• I have a tiny question: If P(1) = 8/10 what is k? When i substitute the values in I get some random answer on wolfram alpha wolframalpha.com/input/… – Panthy Jul 29 '14 at 22:03
• Just we need to solve for $k$ the equation $$\frac8{10}=\frac25 e^k\iff k=\ln 2$$ – user63181 Jul 29 '14 at 22:06