impera Open Impera

AP Calculus BC · 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.

Worked example

show $y = e^{3x}$ solves $y' = 3y$.

  1. $y' = 3e^{3x}$.
  2. $3y = 3e^{3x}$.
  3. They are equal, so it is a solution. ✓
Check yourself

Which function is a solution of dy/dx = y?

  • y = ln x

  • y = 4eˣ

  • y = 4x

  • y = x²

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:

  • The area under each solution curve

  • The value of y at each point of the plane

  • The slope of solution curves at each point

  • Only one particular solution curve

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.

Worked example

$\frac{dy}{dx} = x - y$

  1. At $(0, 0)$: slope $0$ (horizontal).
  2. At $(1, 0)$: slope $1$.
  3. At $(0, 1)$: slope $-1$.
  4. At $(1, 1)$: slope $0$.
  5. 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:

  • The x-axis

  • The line y = 1

  • The line x = 1

  • The y-axis

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.

Worked example

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.

  1. Slopes depend only on $y$, so the equation is $\frac{dy}{dx} = g(y)$.
  2. 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?

  • dy/dx = x²

  • dy/dx = x + y

  • dy/dx = y²

  • dy/dx = xy

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}$.

Worked example

$\frac{dy}{dx} = x - y$

  1. $\frac{d^2y}{dx^2} = 1 - \frac{dy}{dx} = 1 - (x - y) = 1 - x + y$.
  2. 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² =

  • 2y

  • 2

  • 0

  • 4y

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).

Worked example

$\frac{dy}{dx} = x - y$ at a few points.

  1. (0, 0): 0. (1, 0): 1. (0, 1): −1. (1, 1): 0. (2, 1): 1. (−1, 1): −2.
  2. Slopes are zero along the line y = x.
  3. 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.

  1. Depends on y only.
  2. Zero at y = 0 and y = 2; positive between.
  3. $\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.

  1. Sign matches the sign of xy.
  2. $\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

  1. Start at the given point.
  2. Follow the direction of the segments in both directions.
  3. Keep the curve tangent to nearby segments; do not cross equilibrium solutions.
  4. 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.

Worked example

$\frac{dy}{dx} = x - y$.

  1. $\frac{d^2y}{dx^2} = 1 - \frac{dy}{dx} = 1 - x + y$.
  2. 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:

  • dy/dx = g(y)

  • dy/dx = f(x)

  • dy/dx = xy

  • dy/dx = x + y

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)$.
Example

"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:

  • Be straight lines

  • Pass through every point

  • Follow the direction of the segments

  • Cross the segments at right angles

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