Here are the steps to solve the logistic equation as a seperable differential equation.
\begin{equation*}
\frac{dp}{dt} = \alpha p \left( 1 - \frac{p}{K} \right)
\end{equation*}
I take \(f(t)
= \alpha\) and \(g(p) = p \left( 1 - \frac{p}{K}
\right)\) and use the separable technique from the previous section.
\begin{equation*}
\int \frac{1}{p \left( 1 - \frac{p}{K} \right)} dp = \int
\alpha dt
\end{equation*}
I can simplify the nested fraction on the left by multiplying by \(K\text{.}\)
\begin{equation*}
\int \frac{K}{p(K-p)} dp = \int \alpha dt
\end{equation*}
Unfortunately, the left integral uses a technique that I won’t cover in this course (it is covered in Calculus II). Using a technique called partial fracitons, the left side can be split up this way.
\begin{equation*}
\frac{K}{p(K-p)} = \frac{1}{p} + \frac{1}{K-p}
\end{equation*}
Using linearity, this turns the left side integral into two integrals.
\begin{equation*}
\int \frac{1}{p} dp + \int \frac{1}{K-p} dp = \int \alpha dt
\end{equation*}
Now I can do both of these integrals. The second integral on the left uses a substitution \(u = K-p\text{,}\) for which I won’t show the steps here.
\begin{equation*}
\ln p - \ln (K-p) = \alpha t + c
\end{equation*}
Then I want to try to solve for \(p\text{.}\) I can first use a property of the logarithm.
\begin{equation*}
\ln \frac{p}{K-p} = \alpha t + c
\end{equation*}
Then I can apply the exponential to both sides.
\begin{equation*}
\frac{p}{K-p} = e^{\alpha t + c} = e^c e^{\alpha t}
\end{equation*}
I’ll write \(e^c = b\text{,}\) simply to have an easier way to deal with this constant.
\begin{equation*}
\frac{p}{K-p} = be^{\alpha t}
\end{equation*}
I’ll then take reciprocals of both sides.
\begin{equation*}
\frac{K-p}{p} = \frac{1}{be^{\alpha t}}
\end{equation*}
This lets me simplify the left side.
\begin{equation*}
\frac{K}{p} - 1 = \frac{1}{be^{\alpha t}}
\end{equation*}
Then there is only one \(p\) term, which I can isolate.
\begin{gather*}
\frac{K}{p} = \frac{1}{be^{\alpha t}} + 1 = \frac{be^{\alpha
t} + 1}{be^{\alpha t}}\\
\frac{p}{K} = \frac{b e^{\alpha t}}{be^{\alpha t} +1}\\
p = \frac{Kbe^{\alpha t}}{be^{\alpha t} +1}
\end{gather*}
This is the logistic growth function. However, this is not precisely the form that I gave for it in Section 5.3. The reason the forms differ is that this constant \(b\) is not the starting population. If I use an initial condition \(p(0) = p_0\) in the solution, I get this expression.
\begin{equation*}
p_0 = \frac{Kbe^{0}}{be^{0} +1} = \frac{Kb}{b+1}
\end{equation*}
Skipping the algebra steps, I solve for \(b\text{.}\)
\begin{equation*}
b = \frac{p_0}{K-p_0}
\end{equation*}
I can put this into the expression.
\begin{equation*}
p(t) = \frac{K\left( \frac{p_0}{K-p_0} \right) e^{\alpha
t}}{ \left( \frac{p_0}{K - p_0} \right) e^{\alpha t} +1}
\end{equation*}
Finally, I simplify by multiplying numerator and denominator by \((K-p_0)\)
\begin{equation*}
p(t) = \frac{Kp_0e^{\alpha t}}{ p_0e^{\alpha t} + K - p_0}
= \frac{Kp_0e^{\alpha t}}{ p_0(e^{\alpha t}- 1) + K}
\end{equation*}