What is a Differential Equation
This course is about differential equations. But what is a differential equation?
We are all familiar with algebraic equations, where there is an unknown number (say x) satisfying some relationship involving the operations of algebra, like
A differential equation is a similar type of object, but for calculus. The unknown is no longer a number, but rather a function (say
There are many superficial similarities between differential equations, and the algebraic case you already know. Just like polynomials can come in many different degrees like
form a system for the two unknown numbers
is a system for the two unknown functions
Like in algebra, checking a solution works is easy: if I give you
In both cases the theory of how to find these solutions is more involved: even though you learn the rules of arithmetic in elementary school you don't learn to solve algebraic equations until high school. And similarly for differential equations: you leanred the rules of differentiation in Calculus, but now its finally our time to put them to use!
1.1Local Rules
It's not really that much of an exaggeration to say that differential equations run the world. From economic models, across engineering and the sciences, to our best theories of fundamental physics, all are phrased in the language of differential equations. Perhaps much of this stems from the great mystery that our universe is so well described by mathematics. But there is also a practical, human reason that differential equations show up so often in our lives: it is usually much easier to describe what is happening right now than to describe the whole future at once.
The derivative is exactly this sort of local information. If
Thus, an equation like
is a rule for how the function should behave nearby each point: if we know
the current time
This is often exactly the kind of knowledge the world gives us. Imagine a hot cup of coffee sitting in a room. It may be difficult to say immediately what its temperature will be twenty minutes from now. But it is easy to say how its temperature is changing now: a cup hotter than the room cools down, a cup colder than the room warms up, and a larger temperature difference produces a faster change. The simplest rule with these properties is
Our simple observation about the rate of heating and cooling, translated into mathematics, gives a differential quation for the temperature
The same idea works when several things are changing together. It is hard
to predict the complete histories of a population of hares and a population
of lynx. But some local relationships are easy to express: more hares mean
more food for lynx, while more lynx mean more encounters in which hares are
eaten. This seems like almost no information, yet thinking slowly through how to express this precisely (which we will do in the next chapter) allows one to write down a rather simple set of expressions for the rate of change
Neither population can now be understood by itself: their two local rules are coupled.
Or consider a mass attached to a spring. The farther the spring is
stretched, the harder it pulls back. A simplest precise verison of this would say that the force it pulls with is proportional to the stretch distance
None of these local rules tells us the complete history all at once. A solution is an overall function—or collection of functions—which obeys the rule at every point. It integrates all those nearby instructions into one coherent relationship. This is the reversal at the heart of differential equations: differentiation begins with a known history and extracts its local behavior; a differential equation begins with the local behavior and asks us to reconstruct the possible histories.
We can now collect this language precisely.
Definition 1.1 (Differential equations and solutions). A differential equation is an equation whose unknown is a function and which relates that function to one or more of its derivatives. Its order is the order of the highest derivative which appears.
A solution on an interval is a function which has the required derivatives and makes the equation true at every time in that interval. If several unknown functions must satisfy several differential equations together, the equations form a system, and a solution is the corresponding collection of functions.
1.2Slope Fields
In algebra it is useful to have a graph to help conceptualize a problem (say for a quadratic equation, you can immediately see how many roots there'll be if you can draw a picture, even if you haven't exactly sovled for them yet). And we might hope to find an analog for differetial equations - somethign we can draw that will tell us how thigns behave, even if we haven't done all the work of producing an exact solution yet.
But what's the graph of a differential equation? For the moment, let's
focus on the simplest general case: one unknown function
In algebra, we dont draw the number
If a solution passes through
, what slope must it have there? ( 𝑡 0 , 𝑦 0 )
For example, consider
If a solution passes through
Thus we do not know the solution, but we know one of its tangent lines! We
can record that information by drawing a tiny line segment of slope
The result is called a slope field. We have evaluated the rule everywhere, but we have not solved the equation. Different equations paint very different pictures. Some fields repeat their slopes along horizontal lines, others along vertical lines; some push curves away from the axis, while others pull them toward it. But every one of them is constructed and read in exactly the same way: evaluate the right hand side, then draw the resulting slope.
What does a solution look like in this picture? A function
This is an everywhere requirement. A curve can follow the field perfectly for a long time and then make one wrong turn; at the point of that turn, it is not a solution. A function does not earn partial credit from the differential equation.
This pictorial description already has taught us something important: there is not just one solution to a differential equation. The slope field is filled by an entire family of curves, each following the same local rule. To choose one of them, we specify one piece of additional information: the value of the function at some time. Writing
says that our solution must pass through the point
The differential equation describes the possible histories; the initial condition specifies a point the history must pass through.
Definition 1.2 (Initial conditions and initial value problems). An initial condition specifies the value of an unknown function at a
chosen time, such as
The slope field does tell us one thing about how solution curves can meet. At each point, the equation prescribes just one slope. If two solutions pass through the same point, they must have the same tangent there. They cannot meet with different tangents.
But could two curves meet with the same tangent and then separate? Does an initial condition always select exactly one solution, and how far can we follow it? We will investigate these questions in chapter 3. For now, we can explore the histories suggested by the slope field.
Even without a formula for a single solution, a slope field can tell us where solutions rise and fall, where they have horizontal tangents, and how different starting points may lead to different futures. This is genuine information about the unknown functions, extracted directly from the differential equation.
Try turning the local picture into a global one yourself. Each time you choose a point, the differential equation supplies the slopes which carry one solution through it. Add enough starting points and the slope field begins to fill with histories: the local rule becomes a flow.
1.3Slope Fields with More Variables
So far our slope fields have described equations with one unknown function,
A solution is now a pair of functions,
And what does the differential equation tell us at a possible point
This is exactly the slope-field idea again, only with one more component. We evaluate the equation at many possible points and draw a small segment in the direction it prescribes. The page has become a three-dimensional box, but the thought has not changed.
The figure uses the system
which appeared near the beginning of the chapter. Its segment at
This also tells us exactly what it means for a pair of functions to solve a system. Along its graph,
so the curve is tangent to the field everywhere it goes. An initial
condition must now specify both unknowns, say
The two shadows give us another way to draw the solution: put the graph of
These are two functions belonging to one solution of the system. At each
time, we need both values to know what happens next. The equation
We can therefore still read the differential equations in these pictures,
but we can no longer draw the full slope field in either panel. A point
This way of plotting solutions also works when there are more unknowns. For
example, a simple model of an epidemic tracks three fractions of a
population: the susceptible
where
The combined graph
Definition 1.3 (States and state spaces). The state at a particular time is the complete collection of current values which must be prescribed as initial data at that time. The set of all possible states is the state space. The individual values making up a state are its state coordinates.
For a famous example, here is a solution of the Lorenz system, drawn both as
three functions of time and as the parametric curve
We have learned several ways to picture a solution. But how do we find the functions whose graphs we are drawing? In the next chapter we will put our calculus techniques to work, beginning with the simplest possibility: guess a function and check whether it works.
Problems
The first group checks the language and basic moves of the chapter. The explorations ask you to push those ideas somewhere the text has not already gone. The Python problems begin with supplied code: your job is to read it, change it, and explain the resulting picture.
Check Your Understanding
1Reading a local rule
A room is kept at
Is the object warming or cooling when its temperature is
Compare the rates of change at
Two objects obey this same equation with the same
2Obeying the equation at a point
Consider the differential equation
Verify by substitution that
The function
3Checking the equation and the initial condition
Consider
Check each proposed function against both requirements:
Which satisfy the differential equation? Which satisfy the initial condition? Which satisfy both?
Two proposed solution curves pass through the same point. One has slope
The curves
4A solution you can spot
Suppose all you know about a differential equation is its shape,
Show that
Explain in a sentence why no computation involving
5Two fields by hand
On the window
Each of your two fields repeats itself, but in different directions: one is unchanged as you slide the picture horizontally, the other as you slide it vertically. Say which is which, and explain how you could have predicted this from the equations without drawing anything.
On each sketch, draw the solution curve passing through
6Three rules, three signatures
Consider the three equations
Explorations
7The shape of the field is the shape of the rule
A slope field has the property that its ticks are identical along every
vertical line. What does this say about the right-hand side
Another field has ticks identical along every horizontal line. What does
this say about
For an equation of the kind in the previous part — one whose rule involves
only
8One curve, two shadows
Consider the system
Verify that
Write the direction assigned by the system at
Draw the graphs of
Python: Plotting Local Rules
These problems use NumPy and Matplotlib. Begin with the supplied code and make one change at a time; a plot is part of your answer, but so is the sentence which explains what it shows.
9Build a slope field
The code below draws the slope field of
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(-3, 3, 21)
y = np.linspace(-3, 3, 21)
T, Y = np.meshgrid(t, y)
S = T - Y
length = np.sqrt(1 + S**2)
plt.quiver(T, Y, 1 / length, S / length,
angles="xy", pivot="mid", color="steelblue")
plt.xlabel("t")
plt.ylabel("y")
plt.show()
Explain the jobs of meshgrid, S, and length. Why do the two components
passed to quiver describe a segment of slope
Change only the line defining S to draw the fields of
Create a Boolean mask for points where abs(S) < 0.15 and plot those points
on top of one field. What curve is your code detecting?
10Plot the components of a solution
Use the following samples from the solution of
t = np.linspace(0, 4 * np.pi, 500)
f = np.sin(t)
g = np.cos(t)
Create a figure with two panels:









