OpenStax Calculus 2

Chapter 4: Introduction to Differential Equations

4.1 Basics of Differential Equations

Study guide for Calculus Volume 2 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

Almost every law worth writing down describes a rate rather than a value. A falling object obeys a statement about its acceleration, a cooling cup of coffee obeys a statement about how fast its temperature drops, and a population obeys a statement about how fast it grows. None of these tells you the quantity directly. Each tells you the derivative, and leaves you to reconstruct the quantity from it.

An equation that relates an unknown function to its own derivatives is a differential equation, and solving one means producing a function that makes the equation true on some interval. That is a different kind of task from the ones you have been doing. In an algebraic equation you hunt for a number; here you hunt for a function, and the answer is usually not a single function but a whole family of them, indexed by constants of integration.

The reason for the family is already familiar. Antidifferentiation never returns one answer, because adding a constant does not change a derivative. Every differential equation inherits that ambiguity, and the ambiguity is a feature: it is exactly the room you need to accommodate a starting condition. Supply the value of the unknown function at one point and the family collapses to a single member.

So this section sets up the vocabulary that the rest of the chapter uses without comment. You will learn to say how complicated an equation is (its order), to recognize the well-behaved class that has a general theory (linear equations), to test a candidate solution without solving anything, and to pin down one solution out of a family using initial data.

Decoder

A function solves a differential equation on an interval when substituting it and its derivatives into the equation produces a true statement at every point of that interval.

The word doing the work is “substituting”. Verifying a solution is not solving; it is a computation you can always carry out. Differentiate the candidate as many times as the equation asks, drop those expressions into the equation, and simplify both sides. If they agree identically, you have a solution. If they agree only at isolated points, you do not.

The phrase “on an interval” is not decoration. A formula can satisfy the equation on part of the line and be undefined elsewhere, so a complete answer names the interval as well as the formula. A solution that blows up at $x = 1$ is still a perfectly good solution to the left of $1$, and a different one to the right.

The classic mistake is to treat the arbitrary constant as optional. Writing $y = e^{2x}$ when the family is $y = Ce^{2x}$ answers a question nobody asked: it names one member and hides the rest. Keep the constant until an initial condition tells you what it equals.

Definitions and results

Differential equation. An equation involving an unknown function of one variable together with one or more of its derivatives. The unknown is the function, not a number.

Order. The order of the equation is the highest derivative that appears in it. The equation $y' = x y$ has order $1$; the equation $y'' + 4y = \cos x$ has order $2$. Order counts derivatives, not powers.

Linear equations. An equation of order $n$ is linear when it can be written as

$$ a_n(x)\,y^{(n)} + a_{n-1}(x)\,y^{(n-1)} + \cdots + a_1(x)\,y' + a_0(x)\,y = f(x) $$

That is, the unknown function and its derivatives appear only to the first power, never multiplied by each other, and never inside another function. The coefficients $a_i(x)$ and the right side $f(x)$ may be as complicated as they like, because they do not involve $y$.

Nonlinear equations. Anything that fails the test above: $y^2$, $(y')^3$, $y\,y'$, $\sin y$, $\sqrt{y}$. A single such term makes the whole equation nonlinear, and nonlinear equations have no general solution method.

Solution. A function $y = \varphi(x)$, differentiable enough times on an interval $I$, such that substituting it into the equation gives an identity valid for every $x$ in $I$.

General solution. A formula describing all solutions, carrying one arbitrary constant for each order of the equation. A first-order equation produces a one-parameter family; a second-order equation produces a two-parameter family.

Particular solution. One member of the family, obtained by fixing the constants. Equivalently, one curve out of the family of curves the general solution describes.

Initial-value problem. A differential equation together with enough values of $y$ and its derivatives at a single point to determine the constants. A first-order problem needs $y(x_0)$; a second-order problem needs $y(x_0)$ and $y'(x_0)$.

The simplest case. When the equation reads $\frac{dy}{dx} = f(x)$, with no $y$ on the right, solving it is antidifferentiation and nothing more:

$$ y = \int f(x)\,dx + C $$

Every technique in this chapter exists because most equations are not this case.

Worked examples

Verifying a family of solutions

Show that $y = Ce^{-3x} + \tfrac{1}{3}$ solves $y' = 1 - 3y$ for every constant $C$.

Differentiate the candidate: $y' = -3Ce^{-3x}$. Now compute the right side at the same function:

$$ 1 - 3y = 1 - 3\left(Ce^{-3x} + \tfrac{1}{3}\right) = 1 - 3Ce^{-3x} - 1 = -3Ce^{-3x} $$

The two sides agree for every $x$ and every $C$, so the whole family solves the equation. Notice that $C = 0$ gives the constant function $y = \tfrac13$, whose derivative is $0$; the equation agrees, since $1 - 3\left(\tfrac13\right) = 0$. Constant solutions are worth spotting because they are the ones that never move.

Reading off order and linearity

Classify each equation.

$$ y'' + 4y = \sin x, \qquad \frac{dy}{dx} = y^2 - x, \qquad x^2 y''' - (\cos x)\,y' + y = e^x, \qquad y'' + y\,y' = 0 $$

The first has order $2$ and is linear: $y$ and $y''$ appear alone, and $\sin x$ sits on the right where the unknown is not involved. The second has order $1$ and is nonlinear, because of $y^2$. The third has order $3$ and is linear; the coefficients $x^2$ and $-\cos x$ are functions of $x$ only, which is allowed. The fourth has order $2$ and is nonlinear, because $y$ multiplies $y'$.

An initial-value problem solved by antidifferentiation

Solve $\dfrac{dy}{dx} = 6x^2 - 4x$ with $y(1) = 5$.

The right side does not involve $y$, so integrate directly:

$$ y = 2x^3 - 2x^2 + C $$

Impose the condition: $y(1) = 2 - 2 + C = C$, so $C = 5$ and the particular solution is

$$ y = 2x^3 - 2x^2 + 5 $$

Check both requirements. Differentiating gives $6x^2 - 4x$, which is the equation, and substituting $x = 1$ gives $2 - 2 + 5 = 5$, which is the initial condition. A solution has to pass both tests, and it is cheap to run them.

A second-order problem from motion

An object is launched upward from a height of $6$ feet with an initial speed of $48$ feet per second, and gravity gives it a constant acceleration of $-32$ feet per second squared. With $s(t)$ the height,

$$ \frac{d^2 s}{dt^2} = -32, \qquad s(0) = 6, \qquad s'(0) = 48 $$

Antidifferentiate once: $s'(t) = -32t + C_1$, and $s'(0) = 48$ forces $C_1 = 48$. Antidifferentiate again: $s(t) = -16t^2 + 48t + C_2$, and $s(0) = 6$ forces $C_2 = 6$. The particular solution is

$$ s(t) = -16t^2 + 48t + 6 $$

Two constants appeared because the order was two, and two pieces of initial data were needed to remove them. As a sanity check, the velocity vanishes at $t = 1.5$, and the height there is $-16(2.25) + 72 + 6 = 42$ feet, which is above the launch height as it should be.

Practice

Start with the vocabulary. These items give you an equation and ask for its order, whether it is linear or nonlinear, and whether a proposed function actually satisfies it.

Practice

Generated problems for this section, graded instantly.

Then the machinery you already own. When the right side involves only the independent variable, solving is antidifferentiation, and an initial condition fixes the constant.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on order and linearity, verifying candidate solutions, and recovering a particular solution from initial data.

Quiz

5 problems with a score at the end.