Skip to main content

Chapter 7 Models

Section 7.1 Functions modelling rate of accumulation

Subsection 7.1.1 Concept and basic examples

In Chaptersย 5โ€“6, we explored starting with a quantity function and computing the quantityโ€™s rate of accumulation. From this point to the end of Chapterย 21, we will most often be concerned with the opposite problem: starting with a model of the rate of accumulation of some quantity and from that computing accumulation amounts and, ultimately, obtaining a quantity function that can be used to predict specific future quantity amounts.

Definition 7.1.1. Rate function.

Suppose \(q \) is a quantity that is varying over time. A rate function for \(q \) is a function \(r(t) \) whose output represents the instantaneous rate of accumulation of \(q \) at a specific time \(t \text{.}\)

Example 7.1.2. Inflating a raft.

You bring an inflatable raft on a trip to the lake, along with a portable air pump to inflate it. The air pump has three settings:
Notice that the specification for each of the three settings is given in volume-per-unit-time, so these are inflation rates.
You run the pump at medium for one minute, but itโ€™s taking too long so you bump it up to high. After two minutes on high, the raft is nearly inflated but the pump seems like itโ€™s getting a bit hot as it works to counter-act the tendency of the raft to want to deflate, so you switch it to low for one more minute before turning it off.
We can model the rate of accumulation of air in the raft using the following rate function, with time \(t \) measured in minutes and output \(r \) measured in cubic metres per minute.
\begin{equation*} r(t) = \begin{cases} 0.5 \amp 0 \le t \lt 1 \\ 0.75 \amp 1 \le t \lt 3 \\ 0.25 \amp 3 \le t \lt 4 \end{cases} \end{equation*}

Note 7.1.3. Units for rate functions.

In Exampleย 7.1.2, outputs for \(r(t) \) were measured in cubic metres per minute. In general, for every rate function \(r \) the outputs \(r(t) \) should similarly be measured in output-units-per-input-unit, where โ€œoutput unitsโ€ corresponds to the units of the varying quantity \(q \) for which \(r \) is a rate function, and โ€œinput unitsโ€ corresponds to the units of the independent variable \(t \) (for us, usually some unit of time).
A rate of accumulation can vary a lot more than just jumping from one value to another.

Example 7.1.4. Varying speed.

You get in your car and pull out, then accelerate up to the city speed limit of 50 kmโ„h. With a stop light ahead, you slow down to a stop, wait for the light to turn green, then get back up to speed. A little later you merge onto the highway and accelerate some more.
In the case of forward motion, speed represents the rate of accumulation of mileage. And in the scenario described above, speed is itself varying.
Graph of a rate-of-travel model.
A speed-vs-time graph, with the vertical axis in kilometres-per-hour and the horizontal axis in hours. The function graphed is a constant zero along the negative horizontal axis. After \(t = 0 \text{,}\) the graph increases steeply and continuously up to \(50 \) and maintains that level until \(t = 1 \text{,}\) at which point it decreases steeply and continuously back down to \(0 \text{.}\) It remains \(0 \) until just before \(t = 1.5 \text{,}\) and from there is again increases steeply and continuously up to \(50 \text{.}\) It again maintains that level until just after \(t = 3 \text{,}\) before increasing steeply and continuously up to \(100 \text{,}\) a level it maintains for the remainder of the graph (which ends at \(t = 5 \)).
Figure 7.1.5. Graph of a rate-of-travel model.
In Figureย 7.1.5, the plotted curve passes the Vertical Line Test, and so represents the graph of a function โ€” in this case, a velocity function, \(v(t) \text{.}\)
We could imagine many other scenarios involving a varying quantity and a rate function for that quantity.

Example 7.1.6. Measuring water flow.

A drain pipe empties into a covered reservoir. As rain water falls, it is collected and routed through the drain pipe and accumulates in the reservoir. A flow meter is installed in the drain pipe to measure the rate of water flow into the reservoir in litres per second. If water only enters the reservoir through the drain pipe, then the rate of accumulation of water in the reservoir is the same as the rate of flow of water in the drain pipe, and the a function \(r(t) \) that represents the reading on the flow meter at time \(t \) will be a rate function for the quantity of water in the reservoir.

Subsection 7.1.2 Rate functions versus derivative functions

We created the concept of derivative value (Definitionย 5.5.1) specifically to represent the instantaneous rate of accumulation of some quantity, and then collected all derivative values of one quantity function \(q(t) \) into the derivative function \(q'(t) \) (Definitionย 6.1.1).

Example 7.1.8. A derivative as rate function.

In Exampleย 2.3.1, we modelled the salary of salespeople who were paid a base salary, commission on each sale, and a bonus commission on each sale above some threshold. The model we came up with for the salary \(s(u) \) as a function of the number of units \(u \) sold was
\begin{equation*} s(u) = \begin{cases} 4000 + 10 u \amp 0 \le u \le 100 \\ 4000 + 10 u + 5 (u - 100) \amp u \gt 100 \text{.}\end{cases} \end{equation*}
Simplifying the second formula in the piecewise definition, we can write
\begin{equation*} s(u) = \begin{cases} 4000 + 10 u \amp 0 \le u \le 100 \\ 3500 + 15 u \amp u \gt 100 \text{.}\end{cases} \end{equation*}
The rate of accumulation of salary relative to number of units sold is constant โ€” salary increases by \(10 \) dollars per extra unit sold โ€” up until the threshold where the bonus kicks in, at \(u = 100 \text{.}\) After that, the rate of accumulation of salary jumps to a new level: salary increases by \(15 \) dollars per extra unit sold. The derivative function keeps track of how the rate of accumulation varies:
\begin{equation*} s'(u) = \begin{cases} 10 \amp 0 \lt u \lt 100 \\ 15 \amp u \gt 100 \text{.}\end{cases} \end{equation*}
Note that the salary function is not differentiable at \(u = 100 \) because it has a cusp, and so the piecewise definition of \(s'(u) \) above leaves the derivative function undefined there. (See Subsectionย 5.7.1.)
We know that the constant rate for a linear function is just the slope of the line, so essentially the derivative function simply extracts the slopes of the two โ€œpiecesโ€ of \(s(u) \) on their respective subdomains.
In light of Patternย 7.1.7 it is natural to wonder why we would bother making Definitionย 7.1.1 as a separate definition; why not simply refer to any function that measures rate of accumulation as a derivative function? The reason is to make a distinction between different cases of โ€œstarting information.โ€ If we begin with a quantity function \(q \) with a known formula, then we may attempt to directly compute its derivative function \(q'(t) \text{.}\) On the other hand, if we begin instead with a model \(r(t) \) for the rate at which some quantity is accumulating (as in Exampleย 7.1.2), can we call \(r(t) \) a derivative function if we donโ€™t know a corresponding function \(q(t) \) for which it is the derivative (that is, for which \(r(t) = q'(t)\))? While Patternย 7.1.7 states that every derivative function is a rate function, at this point it is not clear whether every rate function is a derivative function.

Section 7.2 Differential equations

It is usually difficult to immediately write down a function for a varying quantity. Being able to do so is equivalent to predicting both โ€œpastโ€ and โ€œfutureโ€ values of the quantity for any input value. We might make some observations to collect data points and then try to fit a curve to those data points, but then we are making an assumption in what type of function to fit to the data. The systemโ€™s data might only superficially look like that type of function for the time we are observing it, while the reality of the true underlying behaviour of the system might be completely different.
When we model a system, it is usually easier to model the rate of variation itself, as humans are better at observing change over time. But again, not directly as a formula for a rate function (which is effectively just as difficult as trying to determine a quantity function directly). Instead, we try to model how the variation in the quantity is affected by the quantity itself.
For example, consider trying to model a population of some species of animal over time. It would be very difficult to make an exact prediction like โ€œIn \(t \) years I think the population size will be exactly \(P \text{.}\)โ€ It is much more reasonable to express patterns like โ€œMore animals means more offspring means more animals.โ€ In other words, the rate of accumulation could initially be modelled not directly in terms of time but indirectly in terms of the population size: a large population creates a high rate of accumulation of population because more individuals will produce more offspring, and a small population creates a low rate of accumulation of population because fewer individuals will produce fewer offspring. The next step in analyzing the situation would be to try to make this observation more precise using an equation relating the rate to the quantity size.

Definition 7.2.1. Differential equation.

Let \(q(t) \) represent a quantity function (whose formula is unknown). A differential equation is an equation relating the instantaneous rate of accumulation \(dq/dt \) to the โ€œcurrentโ€ accumulated quantity amount \(q(t) \text{.}\) It is usually expressed in the form
\begin{equation*} \dqdt = r(t,q) \end{equation*}
where
\begin{equation*} r(t,q) = \text{some formula in both } t \text{ and } q(t) \text{.} \end{equation*}
The multivariable function \(r(t,q) \) is called the rate function for the differential equation.

Warning 7.2.2. Equation versus formula.

There is a difference between a formula for a function and an equation. An equation expresses an equality of two different formulas, while a function formula describes the input-output process of the function. For example, the expression \(dq/dt = t^2 \) is not an equation involving the rate of accumulation \(dq/dt \) (even though it contains an equals sign), it is an expression of a formula for the derivative function \(q'(t) \) of some quantity function \(q \text{.}\)

Remark 7.2.3.

Applying the terminology rate function to the multivariable function \(r(t,q) \) in a differential equation is in line with Definitionย 7.1.1 because the differential equation asserts that each output of this function is equal to \(q'(t) \text{,}\) and so represents the instantaneous rate of accumulation of \(q \) at a specific time \(t \text{.}\) However, itโ€™s a special kind of function in that it requires two inputs: both the input value \(t \) and the output value \(q(t) \) at that particular \(t \)-value must be known in order to evaluate it. In examples, often the rate function only involves \(q \) and not \(t \text{,}\) and we may write just \(r(q) \) in those cases.

Example 7.2.4. Radioactive decay.

Physicists observed long ago that radioactive material decays at a rate that is proportional to the amount of material left. That is, if \(q(t) \) models the amount of some sample of radioactive material remaining after a period of time measured by \(t \text{,}\) then there is a positive constant \(k \) so that
\begin{equation} \frac{ dq/dt }{ q(t) } = - k \text{.}\tag{โœถ} \end{equation}
A negative sign is included in the formula (rather than just assuming \(k \) to be negative in the first place) to emphasize that we expect the quantity of material to decay, and so the rate of accumulation should be negative (while the quantity \(q(t) \) will always be positive).
We can re-arrange (โœถ) to
\begin{equation*} \dqdt = - k q(t) \text{,} \end{equation*}
a differential equation relating rate of accumulation to quantity. The rate function for this differential equation is
\begin{equation*} r(q) = -k q \text{.} \end{equation*}
Even though the differential equation expresses a linear relationship between \(dq/dt \) and \(q \text{,}\) the model for \(q(t) \) in terms of \(t \) is definitely not linear, as we will see in Chapterย 16.

Example 7.2.5. Mixing problem.

A 1000 L tank of salt water (brine) is being fed by a supply of fresh brine of concentration 15 gโ„L at a rate of 2 Lโ„s. To maintain a constant volume, old brine is also being drained from the tank at the same rate of 2 Lโ„s. We assume that the tank is well-mixed, so that there are no pockets of higher or lower concentration brine within the tank.
Diagram of brine entering and being drained from a tank so that volume is held constant.
A diagram of a 1000 L tank. Also picture are an inlet pipe pouring liquid into the top of the tank, and an outlet pipe draining liquid from the bottom.
Figure 7.2.6. Brine entering and being drained from a tank so that volume is held constant.
Let \(q(t) \) represent the amount of salt in the tank in grams at \(t \) seconds after the system starts up, so that \(dq/dt \) represents the rate of accumulation of salt in the tank in grams per second. The rate of accumulation is dependent on how much salt is in the tank, because even through brine both enters and drains from the tank at a constant rate, how much salt exits the tank through the drain depends on how much salt is in the tank at that moment.
Is the amount of salt increasing or decreasing? We seem to have both behaviours at once, since salt is entering through the fresh brine supply and is being lost through the drained liquid. The actual rate of accumulation of the quantity of salt is the net effect:
\begin{equation*} \text{rate of accumulation} = (\text{rate in }) - (\text{rate out}) \text{.} \end{equation*}
Letโ€™s analyze these one at a time.
The rate of salt entering is
\begin{align*} \text{rate in} \amp = (15 \; \mathrm{g}/\mathrm{L}) (2 \; \mathrm{L}/\mathrm{s}) \\ \amp = 30 \; \mathrm{g}/\mathrm{s} \text{.} \end{align*}
We can use the same calculation formula of concentration-times-flow-rate to calculate the rate out, where here we want to use the concentration of the mixed solution in the tank. Except we donโ€™t know the concentration because it is varying! However, since the volume in the tank is staying constant at 1000 L, then at any given moment if we knew the value of \(q(t) \) the concentration in the tank would be
\begin{equation*} \frac{q(t)}{1000} \text{.} \end{equation*}
Thus,
\begin{align*} \text{rate out} \amp = \left(\frac{q(t)}{1000} \; \mathrm{g}/\mathrm{L}\right) (2 \; \mathrm{L}/\mathrm{s}) \\ \amp = \frac{q(t)}{500} \; \mathrm{g}/\mathrm{s} \text{.} \end{align*}
Combining the last two calculations yields a differential equation
\begin{equation*} \dqdt = 30 - \frac{q(t)}{500} \end{equation*}
where the rate function is
\begin{equation*} r(q) = 30 - \frac{q}{500} \text{.} \end{equation*}
In all of our examples so far, the rate function for the differential equation involved only the dependent variable \(q \text{;}\) here is an example of a differential equation where the rate function involves both \(q \) and the independent variable \(t \text{.}\)

Example 7.2.7. A completely made-up differential equation.

If \(q(t) \) represents some quantity that is varying over time, then the equation
\begin{equation*} \dqdt = \frac{q(t) \bbrac{1 - q(t)}}{t + 1} \end{equation*}
is a differential equation with rate function
\begin{equation*} r(t,q) = \frac{q \bbrac{1 - q}}{t + 1} \text{.} \end{equation*}
However, a differential equation should not only involve the independent variable \(t \text{,}\) since then that would just be a formula for the derivative function.
After forming a differential equation to model a system, our goal is to recover a formula for the quantity function so that we can make predictions about the behaviour of the system.

Definition 7.2.8. Solution to a differential equation.

Given a differential equation
\begin{equation*} \dqdt = r(t,q) \text{,} \end{equation*}
a solution is a function \(q(t) \) that, when substituted into the right-hand side of the differential equation, gives the correct derivative function \(dq/dt \) for that particular \(q(t) \text{.}\)

Example 7.2.9. A simple differential equation with a simple solution.

Suppose we have an unknown quantity \(q(t) \) that satisfies the differential equation
\begin{equation*} \dqdt = q(t) - 5 t \text{.} \end{equation*}
Is it possible that \(q(t) \) is a linear function? That is, are there any values of \(r \) and \(q_0 \) so that
\begin{equation*} q(t) = r t + q_0 \end{equation*}
is a solution to this differential equation?
Here we are using variable \(r \) to represent the constant rate of accumulation of the linear function \(q(t) \) rather than the rate function for the differential equation. However, they must actually be one and the same, since Patternย 6.3.11 asserts that
\begin{equation*} q(t) = r t + q_0 \quad \implies \qquad \dqdt = r \text{.} \end{equation*}
So under our assumption that \(q(t) \) is linear, the differential equation says that can set the constant \(r \) equal to the rate function for the differential equation:
\begin{align*} r \amp = q(t) - 5 t \\ \implies \quad r \amp = (r t + q_0) - 5 t \\ \implies \quad r \amp = (r - 5) t + q_0 \text{.} \end{align*}
Now, we donโ€™t want to solve for \(t \) in the final equation above โ€” instead we are looking for the values of the constants \(r \) and \(q_0 \) that make this equation true for all values of \(t \). And since the left-hand side is a constant, we will only get equality if the right-hand side is a constant function, which requires
\begin{equation*} r - 5 = 0 \quad \implies \quad r = 5 \text{.} \end{equation*}
In that case, only \(q_0 \) remains on the right-hand side, so matching again left (\(r = 5 \)) with right (\(q_0 \)) we arrive at \(q_0 = 5 \) as well. This tells us that the only linear quantity model that solves the differential equation is
\begin{equation*} q(t) = 5 t + 5 \text{.} \end{equation*}

Definition 7.2.10. Particular solution to a differential equation.

A specific function \(q(t) \) so that the equality expressed in the differential equation is true for that function and its derivative.

Example 7.2.11. A particular solution.

For differential equation
\begin{equation*} \dqdt = q(t) - 5 t \end{equation*}
from Exampleย 7.2.9, the function \(q(t) = 5 t + 5 \) is a particular soluition because for this function, both \(dq/dt \) and \(q(t) - 5 t \) are equal to \(5 \text{,}\) making left-hand-side-equals-right-hand-side true in the differential equation for this particular function.
A differential equation can have many particular solutions. In Exampleย 7.2.9, we found that there was just one linear solution to that particular differential equation, but there could be other, non-linear solutions. Generally when we try to โ€œsolveโ€ a differential equation, we are looking for all possible solution functions \(q(t) \text{,}\) not just particular solutions of a particular form.
Recall that the general idea of a differential equation is an expression of a direct relationship between a quantity and its rate of accumulation. In other words, the behaviour of the system depends on the quantity present. It follows that the precise solution function \(q(t) \) may depend on the โ€œinitialโ€ amount \(q(t_0) \) (where \(t_0 \) represents some โ€œinitialโ€ time, often \(t_0 = 0 \)). However, usually the different solution functions that correspond to different initial conditions are at least of the same type or form and differ only in some parameters (just as different lines have different slopes and vertical intercepts, but are still all lines).

Definition 7.2.12. General solution to a differential equation.

A formula involving the independent variable \(t \) and one or more parameters, so that:
  • Choosing particular value(s) for the parameter(s) provides a formula for a particular solution function \(q(t) \) for the differential equation.
  • Every particular solution of the differential equation can be recovered from choosing particular parameter value(s).

Example 7.2.13. A general solution based on one parameter.

Consider the differential equation
\begin{equation*} \dqdt = \frac{q(t) \cdot \bbrac{1 - q(t)}}{t + 1} \text{.} \end{equation*}
We will learn a technique for solving this equation in Chapterย 16, and when that technique is successfully applied it leads to general solution
\begin{equation*} q(t) = \frac{c (t + 1)}{c t + 1} \end{equation*}
involving the parameter \(c \text{.}\) From this we can obtain many different particular solutions, one for each value of \(c \text{.}\)
For example,
\begin{equation*} c = 1 \qquad \implies \qquad q(t) = \frac{t + 1}{t + 1} = 1 \text{,} \end{equation*}
so in fact in this case we have a constant solution. Is it actually a solution? We know that a constant function isnโ€™t varying, so its rate of accumulation is \(0 \text{.}\) That is,
\begin{equation*} q(t) = 1 \qquad \implies \qquad \dqdt = 0 \text{.} \end{equation*}
In this case,
\begin{align*} \mathrm{LHS} \amp = \dqdt \amp \mathrm{RHS} \amp = \frac{q(t) \cdot \bbrac{1 - q(t)}}{t + 1} \\ \amp = 0 \amp \amp = \frac{1 \cdot \bbrac{1 - 1}}{t + 1} \\ \amp \amp \amp = 0 \text{,} \end{align*}
and so we have \(\mathrm{LHS} = \mathrm{RHS} \text{,}\) as desired.
But other values of \(c \) provide different solution functions. For example,
\begin{gather*} c = -1 \qquad \implies \qquad q(t) = - \frac{t + 1}{- t + 1} \\ c = \sqrt{2} \qquad \implies \qquad q(t) = \frac{\sqrt{2} (t + 1)}{\sqrt{2} t + 1} \\ c = \pi \qquad \implies \qquad q(t) = \frac{\pi (t + 1)}{\pi t + 1} \text{.} \end{gather*}
We wouldnโ€™t want to verify that each of these is a solution one-by-one using the left-hand-side-versus-right-hand-side method as above. Instead we can do it all at once with the general solution expression, by computing \(dq/dt \) from the given parametric expression for \(q(t) \) (treating any parameters just like other numbers in the formulas, not as variables). At this point we are not yet equipped to carry such computations out; later in the course we will learn techniques for computing derivatives of several different kinds of functions, For now, letโ€™s just ask the computer algebra system Sage to compute the derivative for us.
The t |--> portion of the Sage output says that the rate function also uses input variable \(t \text{,}\) and then the formula for the derivative function follows:
\begin{equation*} q'(t) = \frac{-c^2 (t + 1)}{{(c t + 1)}^2} + \frac{c}{c t + 1} \text{.} \end{equation*}
To verify that the general solution formula always provides a solution to the differential equation, no matter the value of the parameter \(c \text{,}\) we would substitute
\begin{equation*} q(t) = \frac{c (t + 1)}{c t + 1} \end{equation*}
into the right-hand side of the differential equation and manipulate it algebraically until it resembles the derivative function \(q'(t) \) above.

Checkpoint 7.2.14.

Carry out the verification of the general solution to the differential equation in Exampleย 7.2.13, using the process described at the end of that example.
When we have a general solution in hand, how do we decide what to take as the value(s) of the parameter(s)? As discussed above, we expect the system being modelled by a differential equation to behave differently when different quantities are present, so we should expect different initial quantities to lead to different solutions.

Definition 7.2.15. Initial value problem.

A differential equation together with a data point \(q(t_0) = q_0 \) representing the โ€œinitialโ€ amount.

Remark 7.2.16.

Often the known data point is at \(t_0 = 0 \text{,}\) making it truly the โ€œinitialโ€ value.

Example 7.2.17. Obtaining a particular solution from an initial condition.

Letโ€™s return to the differential equation and general solution from Exampleย 7.2.13. Suppose we want the particular solution that satisfies initial condition
\begin{equation*} q(0) = 7 \text{.} \end{equation*}
Then
\begin{align*} q(t) = \frac{c (t + 1)}{c t + 1} \qquad \implies \qquad q(0) \amp = \frac{c (0 + 1)}{0 + 1} \\ \amp = c \text{.} \end{align*}
So to get \(q(0) = 7 \) we need \(c = 7 \text{,}\) and the particular solution we were looking for is
\begin{equation*} q(t) = \frac{7 (t + 1)}{7 t + 1} \text{.} \end{equation*}

Warning 7.2.18.

While it will often be the case, it wonโ€™t always happen that the parameter in the general solution ends up representing the initial amount \(q(t_0) \text{.}\)

Section 7.3 Direction fields

Even though we havenโ€™t yet developed any techniques for solving differential equations, we can still get an idea of what solutions look like graphically from the differential equation.
A differential equation only makes sense if we assume that the unknown quantity function \(q(t) \) is differentiable, since otherwise the \(dq/dt \) in the differential equation would be undefined. In Subsectionย 5.6.2 we introduced the concept of local linearity as a graphical interpretation of differentiability and derivative values: at a specific input value \(t = t^\ast \text{,}\) repeatedly zooming in on the graph of a differentiable function \(q \) around the point \(\bbrac{t^\ast, q(t^\ast)} \) eventually leads to the graph resembling a straight line, with the derivative value \(q'(t^\ast) \) representing the slope of that line.
If we assume that a particular solution to a differential equation exists whose graph includes a particular data point, then the rate function for the differential equation tells us the derivative value for the solution function at that point. Graphically, this tells us the slope of the local linearity of the solution function at that point.
We summarize below.
Patternย 7.3.1 summarizes the graphical interpretation of the information provided by a differential equation at one specific data point. We can โ€œstitchโ€ together many such โ€œlocalโ€ pieces of information to create a holistic picture of solution graphs by making a grid of data points in the \(tq \)-plane, and at each point drawing a small line segment with the corresponding slope predicted by the differential equation for that data point. Such a diagram is called a direction field (or slope field), and allows us to visualize the โ€œshapeโ€ of the graphs of potential solution functions without having actual formulas for those functions.

Example 7.3.2. Direction field for radioactive decay.

Letโ€™s return to the differential equation
\begin{equation*} \dqdt = - k q(t) \end{equation*}
from Exampleย 7.2.4. For the purposes of this example, weโ€™ll take \(k = 1/2 \text{,}\) so that
\begin{equation*} \dqdt = - \frac{q(t)}{2} \text{.} \end{equation*}
If the graph of a potential solution passes through the data point \((1,4) \text{,}\) then \(q(1) = 4 \) and
\begin{align*} \funceval{\dqdt}{t = 1} \amp = - \frac{q(1)}{2} \\ \amp = - \frac{4}{2} \\ \amp = - 2 \text{.} \end{align*}
In our direction field we will draw a little line segment at position \((1,4) \) to represent the local linearity of the graph of the solution function \(q(t) \text{,}\) and based on the above calculation we will give that line segment slope \(-2 \text{.}\) But notice what happens if we consider a different potential solution that passes through the data point \((3,4) \text{.}\) Then \(q(3) = 4 \) and
\begin{align*} \funceval{\dqdt}{t = 3} \amp = - \frac{q(3)}{2} \\ \amp = - \frac{4}{2} \\ \amp = - 2 \text{.} \end{align*}
Hence in our direction field we will draw another little line segment at position \((3,4) \text{,}\) this time with slope \(-2 \text{.}\) (Note that the solution that satisfies \(q(1) = 4 \) might not be the same as the solution that satisfies \(q(3) = 4 \text{.}\))
Itโ€™s not a coincidence that we got the same derivative value in both of our example calculations above โ€” since the rate function for the differential equation does not involve the independent variable \(t \text{,}\) different potential solutions that pass through the same output level (\(q \)-value) but at different \(t \)-values will do so with the same slope. For example, any solution that hits \(q(t_0) = 4 \) at some \(t = t_0 \) must have
\begin{equation*} \funceval{\dqdt}{t = t_0} = -2 \text{.} \end{equation*}
With this in mind, we can set up a table to record some \(dq/dt \) values from potential \(q(t) \) values.
\(q(t) \) \(0 \) \(1 \) \(2 \) \(3 \) \(4 \) \(5 \) \(6 \)
\(dq/qt \) \(0 \) \(-1/2 \) \(-1 \) \(-3/2 \) \(-2 \) \(-5/2 \) \(-6 \)
Then when we draw our direction field for this differential equation below in Figureย 7.3.3, we use the same slope value for grid points that are at the same \(q \)-level.
Direction field for a differential equation modelling radioactive decay.
A direction field is plotted in the first quadrant of a set of \(tq \)-axes. Very short line segments are drawn at regular intervals in a grid pattern. Along each horizontal row of the grid, each line segment is identical to the others in that row. But along vertical columns of the grid, the line segments progress from very steep negative slopes at the top to very shallow negative slopes at the bottom, just above the horizontal axis.
Figure 7.3.3. Direction field for a differential equation modelling radioactive decay.
From the direction field, we can see the overall behaviour that individual solutions exhibit: when there is a lot of material (large \(q(t) \)) then it decays rapidly, and where is little material the decay occurs much more slowly.
We can attempt to draw in what graphs of solutions corresponding to different initial condition values \(q(0) \) might look like.
Several solution curves superimposed onto the direction field for a differential equation modelling radioactive decay.
The direction field from Figureย 7.3.3 is reproduced exactly. Over top, six representative solution curves are drawn, following the pattern of the direction field: descending steeply from high vertical positions and descending shallowly from low vertical positions. From left to right:
  1. The first solution curve begins by crossing into the first quadrant at a relatively small \(q \)-value on the vertical axis, and then gently descends toward the horizontal axis.
  2. The second solution curve begins by crossing into the first quadrant approximately midway up the vertical axis, descends fairly steeply toward the horizontal axis, but quickly begins to level out, so that approximately halfway across the diagram horizontally it is descending much more gently.
  3. The third solution curve begins by crossing into the first quadrant near the top of the vertical axis, descends very steeply toward the horizontal axis, but gradually levels out, so that near the right edge of the diagram it is descending more gently.
  4. The fourth, fifth, and sixth solution curves are all similar: beginning at the top of the diagram and to the right of the vertical axis, they descend very steeply, but as they get closer to the right edge of the diagram they begin to show signs of levelling out. The difference in the curves is how far to the right they begin at the top of the diagram.
Figure 7.3.4. Several solution curves superimposed onto the direction field for a differential equation modelling radioactive decay.
In Figureย 7.3.4, we see that the solution curves follow the general direction of the direction field.
We can even use the direction field and representative solution curves to make predictions about solutions, such as long-term behaviour. For example, it appears that no matter the initial amount \(q(0) \text{,}\) all solution functions will satisfy
\begin{equation*} q(t) \to 0 \qquad \text{as} \qquad t \to \infty \text{.} \end{equation*}

Warning 7.3.5. Solutions must pass Vertical Line Test.

All functions must pass the Vertical Line Test (Patternย 2.2.6). So while our grid of points in the setup for a direction field will have many instances of points vertically above/below each other, those necessarily represent different potential solution functions. In particular, following the โ€œshapeโ€ of solution curves starting at different points along the vertical axis gives us a way to investigate how initial conditions affect the behaviour of the system.

Example 7.3.6. A direction field that varies in both horizontal and vertical.

Now letโ€™s try plotting a direction field for the differential equation in Exampleย 7.2.7. This example is slightly different from the last in that the differential equation involves the independent variable as well, so the slopes of our line segments will vary more.
Our differential equation in that example was
\begin{equation*} \dqdt = \frac{q(t) \bbrac{1 - q(t)}}{t + 1} \text{.} \end{equation*}
Here is an example slope calculation for one of the line segments in the direction field. If we assume that there exists a solution function \(q(t) \) whose graph passes through the point \((1,-2) \text{,}\) then that means \(q(1) = -2 \text{,}\) and so
\begin{align*} \funceval{\dqdt}{t = 1} \amp = \frac{q(1) \bbrac{1 - q(1)}}{1 + 1} \\ \amp = \frac{-2 \bbrac{1 - (-2)}}{2} \\ \amp = - 3 \text{.} \end{align*}
So in our direction field we should draw a little line segment at point \((1,-2) \) with slope \(-3 \text{.}\) To get an actual direction field, we repeat the above calculation at a number of points in a grid. In Figureย 7.3.7, we have carried this out for
\begin{align*} 0 \le \amp t \le 4, \amp -4 \le \amp q(t) \le 4 \text{,} \end{align*}
with grid points spaced a half-unit apart.
Direction field for a differential equation involving both the dependent and independent variables.
A direction field is drawn in the first and fourth quadrants of a set of \(tq \)-axes. Very short line segments are drawn at regular intervals in a grid pattern. In the first horizontal row of the grid, at the top of the diagram, the line segments are very steep with a negative slope, but the slope of the segments becomes slightly less steep along the row from left to right. Subsequent rows below that are similar, except that the โ€œstartingโ€ slope at the left end of the row becomes less steep as we descend rows, until the segments in the row at height \(q = 1 \) are all flat horizontal.
We see the same pattern starting at the bottom row in the fourth quadrant: the segments in that bottom row are very steep with a negative slope, but the slope of the segments becomes slightly less steep along the row from left to right, and then as we progress rows upwards the โ€œstartingโ€ slope at the left end of the row becomes less steep, until finally the segments in the row at height \(q = 0 \) are all flat along the horizontal axis.
Finally, there is a single row between heights \(q = 0 \) and \(q = 1 \) where the segments are nearly flat but with a slight positive slope, and the segments become more flat along the row from left to right.
Figure 7.3.7. Direction field for a differential equation involving both the dependent and independent variables.
In this direction field, we can see a few different kinds of behaviours on the domain \(t \ge 0 \text{.}\) First, we can see two equilibrium or โ€œsteady-stateโ€ solutions at \(q(t) = 1 \) and \(q(t) = 0 \text{.}\) (The slope segments at \(q(t) = 0 \) are hidden by the \(t \)-axis, but they are also horizontal there.) Second, when the initial amount \(q(0) \) is positive, the solutions appear to tend to \(1 \) over the long term. That is, when \(q(0) \gt 0 \text{,}\) it appears that we will have
\begin{equation*} q(t) \to 1 \qquad \text{as} \qquad t \to \infty \text{.} \end{equation*}
However, when the initial amount \(q(0) \) is negative, the solutions appear to eventually head sharply downward. That is, when \(q(0) \lt 0 \text{,}\) it appears that we will have
\begin{equation*} q(t) \to -\infty \qquad \text{as} \qquad t \to \infty \text{.} \end{equation*}
Several solution curves superimposed onto the direction field for a differential equation.
The direction field from Figureย 7.3.7 is reproduced exactly. Over top, four example solution curves are drawn:
  1. The first curve begins at the very top of the vertical axis and descends steeply, before quickly flattening out, approaching a horizontal asymptote at \(q = 1 \) from above.
  2. The second curve begins near but slightly above the origin and then gradually increases, approaching a horizontal asymptote at \(q = 1 \) from below.
  3. The third curve begins near but slightly below the origin, then gradually decreases, reaching the right edge of the diagram only a little below the height at which it started at the left edge of the diagram.
  4. The fourth curve begins only a little was below the third curve, but descends quickly, becoming even more steep in its descent as it goes, until it finally reaches the bottom edge of the diagram only a third of the way from left to right across the diagram.
Figure 7.3.8. Several solution curves superimposed onto the direction field for a differential equation.

Definition 7.3.9. Integral curve.

A curve in the \(tq \)-plane that follows the direction field for a specific differential equation.

Warning 7.3.10.

Integral curves do not always represent solution functions, as they sometimes fail the Vertical Line Test. But even in that case we can usually โ€œsnipโ€ them into pieces of the curve so that each individual piece is the graph of a solution function.