# Solving $\frac{\text{d}P}{\text{d}t}=kP\left(\frac{A-P}{A}\right)\left(\frac{P-m}{P}\right)$

I am having difficulties solving this differential equation for $P$, \begin{align*} \frac{\text{d}P}{\text{d}t}=kP\left(\frac{A-P}{A}\right)\left(\frac{P-m}{P}\right) \end{align*} The context is a population model, where $A$ is the maximum sustainable population, $m$ is the minimum sustainable population and $k$ are constants.

The final answer I get is: \begin{align*} P=\frac{m-Abe^{\frac{(A-m)}{A}kt}}{1-be^{\frac{(A-m)}{A}kt}} \end{align*} where $b=e^c$.

This was achieved after the following:

My final integral after using partial fractions is: \begin{align*} \int\frac{1}{A-m}\left(\frac{1}{A-P}+\frac{1}{P-m}\right)\ \text{d}P&=\int\frac{k}{A}\ \text{d}t \end{align*} My final simplification process after the integration is: \begin{align*} \frac{\ln|P-m|-\ln|P-A|}{A-m}&=\frac{k}{A}t +c\\ \therefore\ln\left|\frac{P-m}{P-A}\right|&=\frac{(A-m)}{A}kt+c\\ \therefore\frac{P-m}{P-A}&=be^{\frac{(A-m)}{A}kt}\;,\;b=e^c\\ \therefore P-m&=be^{\frac{(A-m)}{A}kt}(P-A)\\ \therefore P-m&=Pbe^{\frac{(A-m)}{A}kt}-Abe^{\frac{(A-m)}{A}kt}\\ \therefore P-Pbe^{\frac{(A-m)}{A}kt}&=-Abe^{\frac{(A-m)}{A}kt}+m\\ \therefore P&=\frac{m-Abe^{\frac{(A-m)}{A}kt}}{1-be^{\frac{(A-m)}{A}kt}} \end{align*} Is this correct, or have I made a mistake somewhere?

Thank you very much in advance.

• Should it be $\frac{P-m}{m}$ instead of $\frac{P-m}{P}$ in the problem? – Empiricist Sep 24 '15 at 3:09
• No the question does say $\frac{P-m}{P}$ – T.Walker Sep 24 '15 at 3:11
• Then why not eliminate the $P$ in the numerator and the denominator? – Empiricist Sep 24 '15 at 3:12
• Yes, my first step was $\frac{\text{d}P}{\text{d}t}=\frac{k}{A}(A-P)(P-m)$ – T.Walker Sep 24 '15 at 3:22

Good description of your process. I would like to know the initial value $P_0$. This is because it affects how one deals with the absolute value stuff. You just plain removed the absolute value sign, which for some initial values of $P$ can lead to error.
At a certain stage, you had $P-m=b\dots$. It should have been $P-m=\pm b\dots$.
• $P$ is always positive because it is a population model, but there is no specific value for $P_0$ given. – T.Walker Sep 24 '15 at 3:07
• Yes, $P$ is positive. But how is $P_0$ related to $A$ and to $m$? The sign depends on that. If $P_0$ is unspecified, then we get slightly different possible forms for $P$. – André Nicolas Sep 24 '15 at 3:11
• I think $m<P<A$ would be true. – T.Walker Sep 24 '15 at 3:23
• In principle not necessarily, since population can start below the minimum sustainable, or above the maximum. But if we assume that $m\lt P_0\lt A$, then $P$ will stay within those bounds. And if that is the case, then the equation you wrote is incorrect. It should have been $P-m$ is equal to the messy stuff in front times $A-P$, not $P-A$. Or else you can keep the $P-A$ but then you need a minus sign in front of the $b$. For note that $P-A$ is negative. Or else you can choose to make $b$ negative, but that is in general not done. – André Nicolas Sep 24 '15 at 3:46