In order to motivate differential equations, let us think back to population models where the population changed according to births and deaths. For discrete time models, we established functions that described how many births or deaths to add over the course of a cycle. Such a function represented the total accumulated births or deaths, regardless of exactly when those events occurred. For a continuous time model, we instead think in terms of the rate at which births and deaths are occurring.
A rate of change represents the ratio between the changes of two covarying variables. One of the simplest examples is velocity which is the rate of change of distance traveled with respect to time, for which you probably have heard the saying, distance equals rate times time. Mathematically, this is saying that the distance traveled is proportional to the time spent travelling and the rate (velocity) is the proportionality constant. However, this is technically only true for constant rates of change. Calculus introduced the derivative as the mathematical quantity that measures the instantaneous rate of change. This rate of change results from the idea of computing the limit of an average rate of change.
Consider a quantity \(Q\) that is a function of time \(t\). The instantaneous rate of change of \(Q\) with respect to \(t\) at a particular moment \(t=a\) is defined as the derivative \begin{equation*} \left. \frac{dQ}{dt} \right|_a = \lim_{\Delta t \to 0} \frac{Q(a+\Delta t) - Q(a)}{\Delta t}.\end{equation*} Thinking of this in reverse, this is telling us that the value \(Q(a + \Delta t)\) can approximately be found as \begin{equation*} Q(a + \Delta t) \approx Q(a) + \left.\frac{dQ}{dt}\right|_a \cdot \Delta t.\end{equation*} That is, the increment of change in \(Q\) is approximately just the derivative times the increment of time. The approximation improves as the increment of time decreases and is exact in the limit.
A differential equation is an equation that defines the rate of change (a derivative) for a quantity. Calculus classes often compute derivatives and write them with formulas involving the independent variable. These are technically differential equations, but they are not especially useful in modeling.
Example2.7.1
Given \(y=x^3-4x^2+8x-2\), we can find the derivative \(\frac{dy}{dx}=3x^2-8x+8\). This equation \begin{equation*}\frac{dy}{dx} = 3x^2-8x+8 \end{equation*} is a differential equation involving the independent variable \(x\). The original function \(y=x^3-4x^2+8x-2\) is a solution to the differential equation because the differential equation is true for that function. However, \(y=x^3-4x^2+8x\) is also a solution to the same differential equation. In general, the solution must be of the form \(y = x^3-4x^2+8x+C\) for some constant \(C\). Solutions are not unique unless additional restrictions are provided. That is the purpose of the integration constant \(C\).
Differential equations in modeling occur when the formula that defines the rate of change is a function involving the dependent variable and not just the independent variable. To identify a unique solution, we also need an initial value.
Example2.7.2
The differential equation \(\frac{dP}{dt} = 3 P\) defines the rate of change \(\frac{dP}{dt}\) using a formula involving the dependent variable \(P\). Recall that the exponential function \(P = e^{3t}\) has this behavior since \(\frac{dP}{dt} = 3e^{3t}\). That is, since \(P=e^{3t}\), we have just discovered that \(3P\) and \(\frac{dP}{dt}\) are the same, which is precisely what the equation \(\frac{dP}{dt} = 3P\) means.
In fact, \(P=Ae^{3t}\) will be a solution for any value of \(A\). The derivative, \(\frac{dP}{dt}\) for this formula will be \begin{equation*}\frac{dP}{dt} = \frac{d}{dt}[Ae^{3t}] = A \cdot 3e^{3t} = 3(Ae^{3t}) = 3P.\end{equation*} The value of \(A\) depends on the initial value for the function.
Subsection2.7.3Solutions to Differential Equations¶ permalink
There are many strategies for trying to solve differential equations. These strategies are taught in courses exclusively about differential equations. Our emphasis will be on creating models using differential equations and understanding the behavior of the solutions without requiring formulas as solutions. The following theorem guarantees that a differential equation with an initial value has a unique solution under reasonable conditions.
Theorem2.7.3Existence and Uniqueness of Initial Value Problems
Suppose that \(F(t,y)\) represents a continuous function of both \(t\) and \(y\) such that \(\frac{\partial F}{\partial y}\) exists and is bounded (i.e., small changes in \(y\) should result in small changes in \(F(t,y)\). Then the differential equation \begin{equation*}\frac{dy}{dt} = F(t,y)\end{equation*} with initial value \(y(a) = b\) has a unique solution for some interval \(t \in (a-\epsilon, a+\epsilon)\) with \(\epsilon \gt 0\).
Proof
The proof is outside the scope of this text but is based on the convergence of approximations.
Note that the existence-uniqueness theorem only guarantees that a solution will exist on an interval near the initial value. Sometimes, solutions exist on very short intervals. If the value of the function \(F(t,y)\) is very large, then the solution might run away to infinity. Other times, solutions might exist for all real numbers. The uniqueness property indicates that for any initial value, there can only be one solution.
Knowing that solutions exist, even if we can't find their formulas, we can turn to computers to help us approximate their values using numerical algorithms. One common numerical method will be to approximate the value of the solution at specific values. (Asking for the entire function is usually too much.) The following Sage examples illustrate how we might find such approximations.
Example2.7.4
Find numerical approximations for the solution of the differential equation \begin{equation*}\frac{dy}{dt} = 20-4y\end{equation*} with various initial values \(y(0)=y_0\). The Sage script below allows you to vary the initial value and create a table of approximating values as well as generate a graph of the approximation.
In addition to solving the differential equation numerically, we can explore a differential equation graphically through a plot called a slope field. Although a differential equation could be any equation that involves the derivative, in modeling we usually think of a differential equation in the form presented in the existence–uniqueness theorem where the derivative is equal to an expression that depends on the independent and dependent variables, such as \begin{equation*}\frac{dy}{dt} = F(t,y).\end{equation*} Because the value of the derivative represents a slope, this equation allows us to define what the slope would be at every point in the \((t,y)\)-plane.
Definition2.7.5Slope Field
A slope field is a geometric representation of a differential equation wherein every point \((t,y)\) in the plane is represented by a line segment at that point having the slope \(\frac{dy}{dt}=F(t,y)\). Because every point is impossible to visualize, in practice the graph only shows the slope field at points on a grid of equally spaced points.
The solution to a differential equation \(\frac{dy}{dt}=F(t,y)\) with an initial value \(y(t_0)=y_0)\) will be a function whose graph includes the point \((t_0,y_0)\) and then at every point has a tangent line that has the same slope as the slope field at that point. This means that the curve follows the direction of the arrows.
Computer packages allow us to easily generate slope fields. Evaluate the following Sage scripts to see a variety of different examples.
Example2.7.6
The differential equation \(\frac{dy}{dt} = 3\) has a rate formula \(F(t,y)=3\) that is constant. This means that every point has the same slope. Solutions will follow straight lines.
Note that there are infinitely many different solutions corresponding to a family of parallel lines with slope 3. Given any particular point (initial value), there will only be one of those lines passing through the point. That is the uniqueness of solutions of differential equations.
Example2.7.7
The differential equation \(\frac{dy}{dt} = 3t^2-4\) has a rate formula \(F(t,y)=3t^2-4\). The rate formula in this case depends only on the independent variable \(t\). You should notice that the slope is the same at points that are on the same vertical line, \(t=a\).
In calculus, we learned that \(\frac{dy}{dt}=3t^2-4\) can be solved for \(y\) using antiderivatives, where we get \(y=t^3-4t+C\), where \(C\) is a constant of integration. This corresponds to a horizontal translation or shift, which is the appropriate analogue for the parallel lines in the first example. That is, we should think of the lines in the first example as vertical shifts of one another.
Example2.7.8
The differential equation \(\frac{dy}{dt} = 3y^2-4\) has a rate formula \(F(t,y)=3y^2-4\). The rate formula uses the same operations as the previous example but in terms of the dependent variable \(y\). You should notice that the slope is the same at points that are on the same horizontal line \(y=b\).
Notice that solutions are no longer vertical translations or shifts of one another. However, you should see that every solution will have corresponding solutions that are horizontal translations. Different curves correspond to different initial conditions. In this example, we can see that there are three basic classes of solutions. Above a certain point, the graphs grow without bound and head to infinity at some finite time. (This is an example of why the existence–uniqueness theorem only guaranteed a solution for a limited interval.) Between two values that we will soon learn are equilibrium solutions, solutions form a transition from the upper equilibrium (unstable) to the lower equilibrium (stable). Solutions that begin below the lower equilibrium all rise and asymptotically approach the stable equilibrium.
Example2.7.9
The differential equation \(\frac{dy}{dt} = 3y^2-4t\) has a rate formula \(F(t,y)=3y^2-4t\). Because this rate formula depends on both \(t\) and \(y\), solutions do not share either horizontal or vertical translations.