AP Calculus AB · Differential equations
Slope fields
1Differential equations
A differential equation is an equation involving a function and its derivatives, such as
$$\frac{dy}{dx} = 2x \qquad \frac{dy}{dt} = 0.3y \qquad \frac{dy}{dx} = x - y$$
A solution is a function that makes the equation true. For example, $y = x^2 + 5$ solves $\frac{dy}{dx} = 2x$.
To verify a solution, substitute it (and its derivatives) into the equation.
show $y = e^{3x}$ solves $y' = 3y$.
- $y' = 3e^{3x}$.
- $3y = 3e^{3x}$.
- They are equal, so it is a solution. ✓
Check yourself
Which function is a solution of dy/dx = y?
Show the answer
y = 4eˣ
Its derivative equals itself.
2What a slope field shows
A differential equation $\frac{dy}{dx} = f(x, y)$ gives the slope of the solution curve at every point. A slope field (direction field) draws a short line segment with that slope at many grid points.
Solution curves follow the segments, like iron filings show a magnetic field. Each initial condition (a starting point) picks out one particular solution curve.
The slope field for dy/dx = x − y, with the solution through (0, 1) following the segments
Check yourself
A slope field for dy/dx = f(x, y) shows:
Show the answer
The slope of solution curves at each point
Short segments with slope f(x, y).
3Sketching a slope field
Compute the slope at each grid point and draw a short segment.
$\frac{dy}{dx} = x - y$
- At $(0, 0)$: slope $0$ (horizontal).
- At $(1, 0)$: slope $1$.
- At $(0, 1)$: slope $-1$.
- At $(1, 1)$: slope $0$.
- Along the line $y = x$, every slope is $0$; along $y = x - 1$, every slope is $1$.
Quick observations help:
- If $\frac{dy}{dx}$ depends only on $x$, segments in each vertical column are parallel.
- If it depends only on $y$, segments in each horizontal row are parallel.
- Where $\frac{dy}{dx} = 0$, segments are horizontal.
Check yourself
For dy/dx = y − 1, the segments are horizontal along:
Show the answer
The line y = 1
Slope 0 when y = 1.
4Matching equations to fields
To match a slope field to its equation, test a few easy points and look for patterns.
a slope field has horizontal segments along the $x$-axis, positive slopes above it and negative slopes below it, with the same slopes along each row.
- Slopes depend only on $y$, so the equation is $\frac{dy}{dx} = g(y)$.
- Slope $0$ when $y = 0$, positive when $y > 0$: consistent with $\frac{dy}{dx} = y$.
Equilibrium solutions are horizontal lines $y = k$ where $\frac{dy}{dx} = 0$ for all $x$. For $\frac{dy}{dx} = y(4 - y)$, the equilibria are $y = 0$ and $y = 4$.
Check yourself
Which equation has slopes that are the same in each vertical column?
Show the answer
dy/dx = x²
It depends only on x.
5Concavity from the differential equation
You can find $\frac{d^2y}{dx^2}$ from the equation by differentiating implicitly, then substituting $\frac{dy}{dx}$.
$\frac{dy}{dx} = x - y$
- $\frac{d^2y}{dx^2} = 1 - \frac{dy}{dx} = 1 - (x - y) = 1 - x + y$.
- At $(2, 1)$: $\frac{d^2y}{dx^2} = 1 - 2 + 1 = 0$. At $(0, 2)$: $3 > 0$, so solution curves are concave up there.
This is a common AP free-response part, often followed by a question about whether a tangent line estimate is an over- or underestimate.
Check yourself
For dy/dx = 2y, d²y/dx² =
Show the answer
4y
d/dx (2y) = 2 dy/dx = 4y.
6Going deeper: sketching, matching a field to its equation, and reading solution behavior
A slope field for $\frac{dy}{dx} = f(x, y)$ draws, at each point of a grid, a short segment whose slope is f(x, y). Solution curves follow the segments: each is tangent to the segments it meets.
Sketching by hand: evaluate the slope at each grid point and draw a short segment: 0 horizontal; 1 at 45° upward; −1 at 45° downward; large values steep; undefined vertical (or omitted).
$\frac{dy}{dx} = x - y$ at a few points.
- (0, 0): 0. (1, 0): 1. (0, 1): −1. (1, 1): 0. (2, 1): 1. (−1, 1): −2.
- Slopes are zero along the line y = x.
- Below that line (x > y) slopes are positive; above, negative.
Matching a field to an equation: what to look for
- Depends on x only ($\frac{dy}{dx} = f(x)$): segments are identical along each vertical line (each column the same).
- Depends on y only ($\frac{dy}{dx} = g(y)$): identical along each horizontal line (each row the same).
- Where is the slope zero? Find the curve where f(x, y) = 0 and look for horizontal segments there.
- Where is it undefined? (For $\frac{x}{y}$: along y = 0.)
- Signs by region: positive or negative in each quadrant.
- Symmetry and how steepness grows.
Worked example (matching): a field has horizontal segments along the x-axis and along y = 2, positive slopes between them, negative slopes above y = 2 and below y = 0, and every row identical.
- Depends on y only.
- Zero at y = 0 and y = 2; positive between.
- $\frac{dy}{dx} = y(2 - y)$.
Worked example (matching): slopes are zero along the y-axis, positive in quadrants I and III, negative in II and IV.
- Sign matches the sign of xy.
- $\frac{dy}{dx} = xy$ (or a positive multiple).
Equilibrium solutions: constant solutions y = c where $\frac{dy}{dx} = 0$ for all x. For $\frac{dy}{dx} = y(2 - y)$: y = 0 and y = 2.
- Stable: nearby solutions approach it (y = 2 here: solutions starting between 0 and 2 rise toward it; those above fall toward it).
- Unstable: nearby solutions move away (y = 0).
Sketching a solution through a point
- Start at the given point.
- Follow the direction of the segments in both directions.
- Keep the curve tangent to nearby segments; do not cross equilibrium solutions.
- The curve must be a function of x (no vertical turning back) and pass through the initial point.
Reading long-term behavior: for $\frac{dy}{dx} = y(2 - y)$ with y(0) = 0.5, the solution increases and $\lim_{x \to \infty} y = 2$.
Concavity from the differential equation: differentiate implicitly.
$\frac{dy}{dx} = x - y$.
- $\frac{d^2y}{dx^2} = 1 - \frac{dy}{dx} = 1 - x + y$.
- At (0, 1): slope −1, second derivative 2: the solution is decreasing and concave up there.
Checking a proposed solution: substitute into the equation. Is $y = x - 1 + Ce^{-x}$ a solution of y′ = x − y? y′ = 1 − Ce⁻ˣ; x − y = 1 − Ce⁻ˣ. Yes.
Why slope fields? Many differential equations cannot be solved with formulas; the field shows the behavior of all solutions at once.
Common mistakes
- Drawing every segment with the same slope along rows when the equation depends on x.
- Solution curves that cross each other or cut across the segments.
- Missing the horizontal segments where the slope is zero.
- Confusing the slope field with the graph of f.
- Sketching a solution that does not pass through the given point.
Check yourself
In the slope field of a differential equation, all the segments along any horizontal line are parallel to each other. The equation has the form:
Show the answer
dy/dx = g(y)
Along a horizontal line y is constant, so a slope that depends only on y is the same across the row.
7For top marks
- When sketching, compute slopes at every requested point; make segments visibly steep, shallow, positive or negative.
- Draw solution curves that follow the segments without crossing them.
- To find concavity, differentiate the DE implicitly and substitute for $\frac{dy}{dx}$.
- Use the tangent line from the DE to approximate: at $(x_0, y_0)$, $y \approx y_0 + \frac{dy}{dx}\big|_{(x_0, y_0)}(x - x_0)$.
"At $(1, 2)$, $\frac{dy}{dx} = 1 - 2 = -1$, so the tangent line is $y - 2 = -(x - 1)$, and $y(1.1) \approx 1.9$."
Check yourself
Solution curves on a slope field should:
Show the answer
Follow the direction of the segments
They are tangent to the segments.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera