# Modeling population growth with variable rate in a differential equation

If you consider the classic differential equation used in textbooks to model animal population growth and forget adding in the carrying capacity terms:

$dP/dt$ = rP

It would seem that the above DE would benefit from some variable rate r instead of some fixed rate r in order to achieve a more accurate model.

I tried googling around for this and I'm guessing I simply wasn't using the best keywords. I'm wondering if someone could give an example of a DE where a variable rate r is used and how one usually solves such an equation.

Thanks

• I suppose that you want $r$ to be function of $P$ itself. Is this correct ? – Claude Leibovici Jul 17 '17 at 4:31
• @ClaudeLeibovici oops, i interpreted as a function of $t$, good question – qbert Jul 17 '17 at 4:32
• @ClaudeLeibovici yes that is correct in this instance. though a function of t in other scenarios would also work – H_1317 Jul 17 '17 at 4:32
• @qbert. It could be any of $t$ or $P$. As you wrote, this can make the problem more difficult but doable (probably "easier" with $t$ (?)). – Claude Leibovici Jul 17 '17 at 4:36
• @ClaudeLeibovici i would think so. It also looks cleaner in integral form if your goals is to find an explicit formula for p(t) – qbert Jul 17 '17 at 4:48

If you try this out with $r(t)$ as a non constant function of time:
$$\frac{dp}{dt}=r(t)p(t)\implies \ln(p)=\int r(t)\mathrm dt\implies p(t)=\exp\left ( \int r(t)\right )$$ by the usual separation of variables method.
Whether this turns out to be something nice analytically depends on how easy $r(t)$ is to integrate. However, representing the solution in terms of an integral may be a totally valid solution for your purposes and the method is pretty much identical to the $r$ constant case.
• What about initial conditions? I think $p(0)$ is missing here: as $\ln(p(0))$ in front of the 2nd expression, and $p(0)$ in front of the 3rd expression (from here) – Jesse Knight May 31 at 14:20