Solving the Logistic Differential Equation

Learning Outcomes

  • Draw a direction field for a logistic equation and interpret the solution curves
  • Solve a logistic equation and interpret the results

The logistic differential equation is an autonomous differential equation, so we can use separation of variables to find the general solution.

Step 1: Setting the right-hand side equal to zero leads to [latex]P=0[/latex] and [latex]P=K[/latex] as constant solutions. The first solution indicates that when there are no organisms present, the population will never grow. The second solution indicates that when the population starts at the carrying capacity, it will never change.

Step 2: Rewrite the differential equation in the form



Then multiply both sides by [latex]dt[/latex] and divide both sides by [latex]P\left(K-P\right)[/latex]. This leads to



Multiply both sides of the equation by [latex]K[/latex] and integrate:

[latex]\displaystyle\int \frac{K}{P\left(K-P\right)}dP=\displaystyle\int rdt[/latex].


The left-hand side of this equation can be integrated using partial fraction decomposition. We leave it to you to verify that



Then the equation becomes

[latex]\begin{array}{ccc}\hfill {\displaystyle\int \frac{1}{P}+\frac{1}{K-P}dP}& =\hfill & {\displaystyle\int rdt}\hfill \\ \hfill \text{ln}|P|-\text{ln}|K-P|& =\hfill & rt+C\hfill \\ \hfill \text{ln}|\frac{P}{K-P}|& =\hfill & rt+C.\hfill \end{array}[/latex]


Now exponentiate both sides of the equation to eliminate the natural logarithm:

[latex]\begin{array}{ccc}\hfill {e}^{\text{ln}|\frac{P}{K-P}|}& =\hfill & {e}^{rt+C}\hfill \\ \hfill |\frac{P}{K-P}|& =\hfill & {e}^{C}{e}^{rt}.\hfill \end{array}[/latex]


We define [latex]{C}_{1}={e}^{c}[/latex] so that the equation becomes



To solve this equation for [latex]P\left(t\right)[/latex], first multiply both sides by [latex]K-P[/latex] and collect the terms containing [latex]P[/latex] on the left-hand side of the equation:

[latex]\begin{array}{ccc}\hfill P& =\hfill & {C}_{1}{e}^{rt}\left(K-P\right)\hfill \\ \hfill P& =\hfill & {C}_{1}K{e}^{rt}-{C}_{1}P{e}^{rt}\hfill \\ \hfill P+{C}_{1}P{e}^{rt}& =\hfill & {C}_{1}K{e}^{rt}.\hfill \end{array}[/latex]


Next, factor [latex]P[/latex] from the left-hand side and divide both sides by the other factor:

[latex]\begin{array}{ccc}\hfill P\left(1+{C}_{1}{e}^{rt}\right)& =\hfill & {C}_{1}K{e}^{rt}\hfill \\ \hfill P\left(t\right)& =\hfill & \frac{{C}_{1}K{e}^{rt}}{1+{C}_{1}{e}^{rt}}.\hfill \end{array}[/latex]


The last step is to determine the value of [latex]{C}_{1}[/latex]. The easiest way to do this is to substitute [latex]t=0[/latex] and [latex]{P}_{0}[/latex] in place of [latex]P[/latex] in the equation [latex]\frac{P}{K-P}={C}_{1}{e}^{rt}[/latex] and solve for [latex]{C}_{1}\text{:}[/latex]

[latex]\begin{array}{ccc}\hfill \frac{P}{K-P}& =\hfill & {C}_{1}{e}^{rt}\hfill \\ \hfill \frac{{P}_{0}}{K-{P}_{0}}& =\hfill & {C}_{1}{e}^{r\left(0\right)}\hfill \\ \hfill {C}_{1}& =\hfill & \frac{{P}_{0}}{K-{P}_{0}}.\hfill \end{array}[/latex]


Finally, substitute the expression for [latex]{C}_{1}[/latex] into the equation before the last:



Now multiply the numerator and denominator of the right-hand side by [latex]\left(K-{P}_{0}\right)[/latex] and simplify:

[latex]\begin{array}{cc}\hfill P\left(t\right)& =\frac{\frac{{P}_{0}}{K-{P}_{0}}K{e}^{rt}}{1+\frac{{P}_{0}}{K-{P}_{0}}{e}^{rt}}\hfill \\ & =\frac{\frac{{P}_{0}}{K-{P}_{0}}K{e}^{rt}}{1+\frac{{P}_{0}}{K-{P}_{0}}{e}^{rt}}\cdot \frac{K-{P}_{0}}{K-{P}_{0}}\hfill \\ & =\frac{{P}_{0}K{e}^{rt}}{\left(K-{P}_{0}\right)+{P}_{0}{e}^{rt}}.\hfill \end{array}[/latex]


We state this result as a theorem.

Solution of the Logistic Differential Equation

Consider the logistic differential equation subject to an initial population of [latex]{P}_{0}[/latex] with carrying capacity [latex]K[/latex] and growth rate [latex]r[/latex]. The solution to the corresponding initial-value problem is given by




The solution to the logistic differential equation has a point of inflection. To find this point, set the second derivative equal to zero:

[latex]\begin{array}{ccc}\hfill P\left(t\right)& =\hfill & \frac{{P}_{0}K{e}^{rt}}{\left(K-{P}_{0}\right)+{P}_{0}{e}^{rt}}\hfill \\ \hfill {P}^{\prime }\left(t\right)& =\hfill & \frac{r{P}_{0}K\left(K-{P}_{0}\right){e}^{rt}}{{\left(\left(K-{P}_{0}\right)+{P}_{0}{e}^{rt}\right)}^{2}}\hfill \\ \hfill P^{\prime\prime}\left(t\right)& =\hfill & \frac{{r}^{2}{P}_{0}K{\left(K-{P}_{0}\right)}^{2}{e}^{rt}-{r}^{2}{P}_{0}{}^{2}K\left(K-{P}_{0}\right){e}^{2rt}}{{\left(\left(K-{P}_{0}\right)+{P}_{0}{e}^{rt}\right)}^{3}}\hfill \\ & =\hfill & \frac{{r}^{2}{P}_{0}K\left(K-{P}_{0}\right){e}^{rt}\left(\left(K-{P}_{0}\right)-{P}_{0}{e}^{rt}\right)}{{\left(\left(K-{P}_{0}\right)+{P}_{0}{e}^{rt}\right)}^{3}}.\hfill \end{array}[/latex]


Setting the numerator equal to zero,



As long as [latex]{P}_{0}\ne K[/latex], the entire quantity before and including [latex]{e}^{rt}[/latex] is nonzero, so we can divide it out:



Solving for [latex]t[/latex],

[latex]\begin{array}{ccc}\hfill {P}_{0}{e}^{rt}& =\hfill & K-{P}_{0}\hfill \\ \hfill {e}^{rt}& =\hfill & \frac{K-{P}_{0}}{{P}_{0}}\hfill \\ \hfill \text{ln}{e}^{rt}& =\hfill & \text{ln}\frac{K-{P}_{0}}{{P}_{0}}\hfill \\ \hfill rt& =\hfill & \text{ln}\frac{K-{P}_{0}}{{P}_{0}}\hfill \\ \hfill t& =\hfill & \frac{1}{r}\text{ln}\frac{K-{P}_{0}}{{P}_{0}}.\hfill \end{array}[/latex]


Notice that if [latex]{P}_{0}>K[/latex], then this quantity is undefined, and the graph does not have a point of inflection. In the logistic graph, the point of inflection can be seen as the point where the graph changes from concave up to concave down. This is where the “leveling off” starts to occur, because the net growth rate becomes slower as the population starts to approach the carrying capacity.

Try It

try it

A population of rabbits in a meadow is observed to be [latex]200[/latex] rabbits at time [latex]t=0[/latex]. After a month, the rabbit population is observed to have increased by [latex]4\text{%}[/latex]. Using an initial population of [latex]200[/latex] and a growth rate of [latex]0.04[/latex], with a carrying capacity of [latex]750[/latex] rabbits,

  1. Write the logistic differential equation and initial condition for this model.
  2. Draw a slope field for this logistic differential equation, and sketch the solution corresponding to an initial population of [latex]200[/latex] rabbits.
  3. Solve the initial-value problem for [latex]P\left(t\right)[/latex].
  4. Use the solution to predict the population after [latex]1[/latex] year.

Activity: Logistic Equation with a Threshold Population

An improvement to the logistic model includes a threshold population. The threshold population is defined to be the minimum population that is necessary for the species to survive. We use the variable [latex]T[/latex] to represent the threshold population. A differential equation that incorporates both the threshold population [latex]T[/latex] and carrying capacity [latex]K[/latex] is



where [latex]r[/latex] represents the growth rate, as before.

  1. The threshold population is useful to biologists and can be utilized to determine whether a given species should be placed on the endangered list. A group of Australian researchers say they have determined the threshold population for any species to survive: [latex]5000[/latex] adults. (Catherine Clabby, “A Magic Number,” American Scientist 98(1): 24, doi:10.1511/2010.82.24. accessed April 9, 2015, Therefore we use [latex]T=5000[/latex] as the threshold population in this project. Suppose that the environmental carrying capacity in Montana for elk is [latex]25,000[/latex]. Set up the above equation using the carrying capacity of [latex]25,000[/latex] and threshold population of [latex]5000[/latex]. Assume an annual net growth rate of [latex]18\text{%}[/latex].
  2. Draw the direction field for the differential equation from step [latex]1[/latex], along with several solutions for different initial populations. What are the constant solutions of the differential equation? What do these solutions correspond to in the original population model (i.e., in a biological context)?
  3. What is the limiting population for each initial population you chose in step [latex]2?[/latex] (Hint: use the slope field to see what happens for various initial populations, i.e., look for the horizontal asymptotes of your solutions.)
  4. This equation can be solved using the method of separation of variables. However, it is very difficult to get the solution as an explicit function of [latex]t[/latex]. Using an initial population of [latex]18,000[/latex] elk, solve the initial-value problem and express the solution as an implicit function of [latex]t[/latex], or solve the general initial-value problem, finding a solution in terms of [latex]r,K,T,\text{and}{P}_{0}[/latex].