Skip to main content
Mathematics LibreTexts

13.1: Linear and Nonlinear Differential Equations

  • Page ID
    121152
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Learning Objectives
    1. Identify the distinction between unlimited and density-dependent population growth. Be able to explain terms in the logistic equation in its original version, Equation (13.1.1), and its rescaled version, Equation (13.1.3).
    2. State the definition of a linear differential equation.
    3. Explain the law of mass action, and derive simple differential equations for interacting species based on this law.

    In the model for population growth in Chapter 11, we encountered the differential equation

    \[\frac{d N}{d t}=k N, \nonumber \]

    where \(N(t)\) is population size at time \(t\) and \(k\) is a constant per capita growth rate. We showed that this differential equation has exponential solutions. It means that two behaviors are generically obtained: explosive growth if \(k>0\) or extinction if \(k<0\).

    The case of \(k>0\) is unrealistic, since real populations cannot keep growing indefinitely in an explosive, exponential way. Eventually running out of space or resources, the population growth dwindles, and the population attains some static level rather than expanding forever. This motivates a revision of our previous model to depict density-dependent growth.

    Mastered Material Check
    1. What is meant by an analytic solution to a differential equation?
    2. What other kind of solutions are possible?
    3. Give an example of a nonlinear function \(f(y)\).
    Mastered Material Check
    1. What happens in the case that \(k=0\) ? Explain under what conditions this might arise and what happens to the population \(N(t)\) in this case.

    The logistic equation for population growth

    Let \(N(t)\) represent the size of a population at time \(t\), as before. Consider the differential equation

    \[\frac{d N}{d t}=r N \frac{(K-N)}{K} \]

    We call this differential equation the logistic equation.The logistic equation has a long history in modelling population growth of humans, microorganisms, and animals. Here the parameter \(r\) is the intrinsic growth rate and \(K\) is the carrying capacity. Both \(r, K\) are assumed to be positive constants for a given population in a given environment.

    In the form written above, we could interpret the logistic equation as

    \[\frac{d N}{d t}=R(N) \cdot N \nonumber\]

    where

    \[R(N)=\left[r \frac{(K-N)}{K}\right] . \nonumber \]

    The term \(R(N)\) is a function of \(N\) that replaces the constant rate of growth \(k\) (found in the unrealistic, unlimited population growth model). \(R\) is called the density dependent growth rate.

    Linear versus Nonlinear

    The logistic equation introduces the first example of a nonlinear differential equation. We explain the distinction between linear and nonlinear differential equations and why it matters.

    Definition 13.1 (Linear differential equation)

    A first order differential equation is said to be linear if it is a linear combination of terms of the form

    \[\frac{d y}{d t}, \quad y, \quad 1 \nonumber \]

    that is, it can be written in the form

    \[\alpha \frac{d y}{d t}+\beta y+\gamma=0 \]

    where \(\alpha, \beta, \gamma\) do not depend on \(y\). Note that "first order" means that only the first derivative (or no derivative at all) may occur in the equation.

    Mastered Material Check
    1. Can the differential equation \(\frac{d y}{d t}=a-b y\) be written in the form (13.1.2)? If so, what are the values of \(\alpha, \beta, \gamma ?\)

    So far, we have seen several examples of this type with constant coefficients \(\alpha, \beta, \gamma\). For example, \(\alpha=1, \beta=-k\), and \(\gamma=0\) in Equation \(11.2\) whereas \(\alpha=1, \gamma=-a\), and \(\beta=b\) in Equation (12.2.1). A differential equation that is not of this form is said to be nonlinear.

    Example 13.1 (Linear versus nonlinear differential equations)

    Which of the following differential equations are linear and which are nonlinear?

    1. \(\frac{d y}{d t}=y^{2}\)
    2. \(\frac{d y}{d t}-y=5\)
    3. \(y \frac{d y}{d t}=-1\)
    Solution

    Any term of the form \(y^{2}, \sqrt{y}, 1 / y\), etc. is nonlinear in \(y\). A product such as \(y \frac{d y}{d t}\) is also nonlinear in the independent variable. Hence equations (a), (c) are nonlinear, while (b) is linear.

    Mastered Material Check
    1. For what values of \(\alpha, \beta\) and \(\gamma\) can Example 13.1(b) be put into the form (13.1.2)?

    The significance of the distinction between linear and nonlinear differential equations is that nonlinearities make it much harder to systematically find a solution to the given differential equation by "analytic" methods. Most linear differential equations have solutions that are made of exponential functions or expressions involving such functions. This is not true for nonlinear equations.

    However, as we see shortly, geometric methods are very helpful in understanding the behavior of such nonlinear differential equations.

    Law of Mass Action

    Nonlinear terms in differential equations arise naturally in various ways. One common source comes from describing interactions between individuals, as the following example illustrates.

    In a chemical reaction, molecules of types \(A\) and \(B\) bind and react to form product \(P\). Let \(a(t), b(t)\) denote the concentrations of \(A\) and \(B\). These concentrations depend on time because the chemical reaction uses up both types in producing the product.

    The reaction only occurs when \(A\) and \(B\) molecules "collide" and stick to one another. Collisions occur randomly, but if concentrations are larger, more collisions take place, and the reaction is faster. If either the concentration \(a\) or \(b\) is doubled, then the reaction rate doubles. But if both \(a\) and \(b\) are doubled, then the reaction rate should be four times faster, based on the higher chances of collisions between \(A\) and \(B\). The simplest assumption that captures this dependence is

    \[\text{rate of reaction} \propto a \cdot b \nonumber\]

    or

    \[\text{rate of reaction} =k \cdot a \cdot b \nonumber\]

    where \(k\) is some constant that represents the reactivity of the molecules.

    We can formally state this result, known as the Law of Mass Action as follows:

    The Law of Mass Action

    The rate of a chemical reaction involving an interaction of two or more chemical species is proportional to the product of the concentrations of the given species.

    Mastered Material Check
    1. If the concentration of \(A\) is tripled, and that of \(B\) is doubled, how much faster would we expect the reaction rate to be?
    2. Why does the product \(a \cdot b\), rather than the sum \(a+b\) appear in the Law of Mass Action ?
    Example 13.2 (Differential equation for interacting chemicals)

    Substance A is added at a constant rate of I moles per hour to a 1-litre vessel. Pairs of molecules of \(A\) interact chemically to form a product \(P\). Write down a differential equation that keeps track of the concentration of A, denoted \(y(t)\).

    Solution

    First consider the case that there is no reaction. Then, the addition of \(A\) to the reactor at a constant rate leads to changing \(y(t)\), described by the differential equation

    \[\frac{d y}{d t}=I . \nonumber \]

    When the chemical reaction takes place, the depletion of \(A\) depends on interactions of pairs of molecules. By the law of mass action, the rate of reaction is of the form \(k \cdot y \cdot y=k y^{2}\), and as it reduces the concentration, it appear with a minus sign in the DE. Hence

    \[\frac{d y}{d t}=I-k y^{2} . \nonumber \]

    This is a nonlinear differential equation - it contains a term of the form \(y^{2}\).

    Example 13.3 (Logistic equation reinterpreted)

    Rewrite the logistic equation in the form

    \[\frac{d N}{d t}=r N-b N^{2} \nonumber \]

    (where \(b=r / K\) is a positive quantity).

    1. Interpret the meaning of this restated form of the equation by explaining what each of the terms on the right hand side could represent.
    2. Which of the two terms dominates for small versus large population levels?
    Solution

    a) This form of the equation has growth term \(r N\) proportional to population size, as encountered previously in unlimited population growth. However, there is also a quadratic (nonlinear) rate of loss (note the minus sign) \(-b N^{2}\). This term could describe interactions between individuals that lead to mortality, e.g. through fighting or competition.

    b) From familiarity with power functions (in this case, the functions of \(N\) that form the two terms, \(r N\) and \(b N^{2}\) ) we can deduce that the second, quadratic term dominates for larger values of \(N\), and this means that when the population is crowded, the loss of individuals is greater than the rate of reproduction.

    Mastered Material Check
    1. In each of Examples \(13.2\) and 13.3, clearly identify the constant quantities.

    Scaling the Logistic Equation

    Consider units involved in the logistic equation (13.1.1):

    \[\frac{d N}{d t}=r N \frac{(K-N)}{K} . \nonumber \]

    This equation has two parameters, \(r\) and \(K\). Since units on each side of an equation must balance, and must be the same for terms that are added or subtracted, we can infer that \(K\) has the same units as \(N\), and thus it is a population density. When \(N=K\), the population growth rate is zero \((d N / d t=0)\).

    It turns out that we can understand the behavior of the logistic equation by converting it to a "generic" form that does not depend on the constant \(K\). We do so by transforming variables, which amounts to choosing a convenient way to measure the population size.

    Example 13.4 (Rescaling)

    Define a new variable

    \[y(t)=\frac{N(t)}{K}, \nonumber \]

    with \(N(t)\) and \(K\) as in the logistic equation. Then \(N(t)=K y(t)\).

    1. Interpret what the transformed variable y represents.
    2. Rewrite the logistic equation in terms of this variable.
    Solution

    a) The variable, \(y(t)\) represents a scaled version of the population density. Instead of measuring the population in some arbitrary units - such as number of individuals per acre, or number of bacteria per \(\mathrm{ml}-y(t)\) measures the population in "multiples of the carrying capacity."

    For example, if the environment can sustain 1000 aphids per plant (so \(K=1000\) individuals per plant), and the current population size on a given plant is \(N=950\) then the value of the scaled variable is \(y=950 / 1000=\) 0.95. We would say that "the aphid population is at \(95 \%\) of its carrying capacity on the plant."

    b) Since \(K\) is assumed constant, it follows that

    \[N(t)=K y(t) \quad \Rightarrow \quad \frac{d N}{d t}=K \frac{d y}{d t} . \nonumber \]

    Using this, we can simplify the logistic equation as follows:

    \[\frac{d N}{d t}=r N \frac{(K-N)}{K} \nonumber \]

    \[\Rightarrow \quad K \frac{d y}{d t}=r(K y) \frac{(K-K y)}{K} \]

    \[\Rightarrow \quad \frac{d y}{d t}=r y(1-y) \nonumber \]

    Equation (13.1.3) "looks simpler" than Equation (13..11) since it depends on only one parameter, \(r\). Moreover, by understanding this equation, and transforming back to the original logistic in terms of \(N(t)=K y(t)\), we can interpret results for the original model. While we do not go further with transforming variables at present, it turns out that one can also further reduce the scaled logistic to an equation in which \(r=1\) by "rescaling time units".

    Mastered Material Check
    1. Suppose an environment can sustain 2000 aphids per plant, and the current population size on a given plant is 1700 . What is \(K, N\) and \(y\) based on this information?
    2. This population is at what percent of its carrying capacity?
    Mastered Material Check
    1. What are the units of the parameter \(r\)?
    2. How might we use the parameter \(r\) to define a time-scale?

    This page titled 13.1: Linear and Nonlinear Differential Equations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Leah Edelstein-Keshet via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.