Free AP Calculus AB Differential Equations

AP Calculus AB · Differential Equations · free lesson

Slope Fields: Sketching and Reasoning

The idea, then worked examples solved step by step, then practice questions whose numbers change every time you try them.

The idea

A picture of a differential equation

A differential equation such as dydx=x−y\frac{dy}{dx} = x - y does not tell you yy, but it tells you something at every point of the plane: if a solution's graph passes through the point (x,y)(x, y), its slope there is x−yx - y. At (2,1)(2, 1) the slope is 2−1=12 - 1 = 1; at (0,3)(0, 3) it is 0−3=−30 - 3 = -3. Draw that slope as a short line segment at many points, and you get a picture of every solution at once.

Definition.

A slope field for dydx=f(x,y)\frac{dy}{dx} = f(x, y) is a set of short line segments, one at each point of a grid, each with slope f(x,y)f(x, y) at its point. A segment has no arrowhead: it only shows the steepness and the direction (rising, falling or level) of a solution through that point.

Drawing one by hand

The AP exam often prints a grid of points and asks you to draw the segments. Work out the slope at each point first. For dydx=x−y\frac{dy}{dx} = x - y at the nine points with xx and yy in {−1,0,1}\{-1, 0, 1\}:

x=−1x = -1x=0x = 0x=1x = 1
y=1y = 1−2-2−1-100
y=0y = 0−1-10011
y=−1y = -1001122

Then draw at each point a short segment of that slope: level for 0, rising for a positive slope, falling for a negative one, and steeper for a larger size. Watch the nine segments go in, one point at a time:

Check the picture against the table. Along the diagonal from (−1,−1)(-1, -1) to (1,1)(1, 1) every slope is 0 and every segment is level. At (1,−1)(1, -1) the slope is 22, steep and rising; at (−1,1)(-1, 1) it is −2-2, steep and falling. A segment of slope 1 rises at 45°, so slope 2 must look clearly steeper than slope 1.

Solutions follow the segments

With segments at many points the field shows the shape of every solution. The graph of a solution runs along the segments, tangent to each one it meets, and never cuts across them. Choose a starting value y(0)=by(0) = b below, and the solution through (0,b)(0, b) is drawn on the field of dydx=x−y\frac{dy}{dx} = x - y:

Move bb and look to the right: whatever bb is, the solution bends toward the same rising line, y=x−1y = x - 1. On that line the slope given by the equation is x−(x−1)=1x - (x - 1) = 1, the slope of the line itself, so the line is a solution too, and the field steers the others toward it. Reading where solutions go in the long run is a question the exam asks.

Reading a field: what the slope depends on

The quickest way to match a slope field to its equation is to ask where the slopes stay the same.

  • If dydx\frac{dy}{dx} depends on xx only (such as dydx=x\frac{dy}{dx} = x), every segment in one vertical column is the same: the slopes change from left to right only.
  • If dydx\frac{dy}{dx} depends on yy only (such as dydx=2−y\frac{dy}{dx} = 2 - y), every segment in one horizontal row is the same: the slopes change from bottom to top only.
  • If it depends on both (such as dydx=xy\frac{dy}{dx} = xy), neither rows nor columns are constant.

Here are the three fields. First dydx=x\frac{dy}{dx} = x: look down any column.

Next dydx=2−y\frac{dy}{dx} = 2 - y: look along any row.

Last dydx=xy\frac{dy}{dx} = xy: no row and no column is constant.

Then use the zero slopes and the signs. For dydx=2−y\frac{dy}{dx} = 2 - y the segments are level along the line y=2y = 2, rise below it and fall above it; dydx=y−2\frac{dy}{dx} = y - 2 would have the same level line but the opposite signs. For dydx=xy\frac{dy}{dx} = xy the segments are level on both axes, and rise in the first and third quadrants, where xx and yy have the same sign.

Concavity from the equation

To know whether a solution is concave up or down, find d2ydx2\frac{d^2y}{dx^2} by differentiating the equation with respect to xx, remembering that yy is a function of xx (so the derivative of yy is dydx\frac{dy}{dx}). For dydx=x−y\frac{dy}{dx} = x - y:

d2ydx2=1−dydx=1−(x−y)=−x+y+1\begin{aligned} \frac{d^2y}{dx^2} &= 1 - \frac{dy}{dx} = 1 - (x - y) = {-x + y + 1} \end{aligned}

So the solutions are concave up where y>x−1y > x - 1 (above the line the solutions approach) and concave down below it, exactly what the slider picture shows.

Note.

On the AP exam the usual slips are: segments drawn with the wrong sign, or with steepness that does not grow with the size of the slope (slope 2 must be steeper than slope 1); a field matched by xx when its slopes are constant along horizontal rows, so they depend on yy; and a solution curve drawn cutting across the segments instead of running along them. When you sketch at given points, every zero slope must be clearly level.

Worked examples

Worked examples

Each example is one kind of question the AP exam asks on slope fields. The tools are always the same: the equation gives the slope at any point; zero slopes are level segments; slopes constant down columns mean xx only, constant along rows mean yy only; and d2ydx2\frac{d^2y}{dx^2}, found from the equation, gives the concavity. Every number in the working is found by the engine.

Example.

1. Sketching the field at given points. Draw the slope field for dydx=x(y−1)\frac{dy}{dx} = x(y - 1) at the nine points with xx in {−1,0,1}\{-1, 0, 1\} and yy in {0,1,2}\{0, 1, 2\}.

Work out the slope at each point:

x=−1x = -1x=0x = 0x=1x = 1
y=2y = 2−1-10011
y=1y = 1000000
y=0y = 01100−1-1

The whole middle column (x=0x = 0) and the whole middle row (y=1y = 1) have slope 0: five level segments. The four corners have slope 1 or −1-1: segments at 45°, rising where the slope is 11 and falling where it is −1-1.

Result.

Level segments at the five points with x=0x = 0 or y=1y = 1; rising (slope 1) at (1,2)(1, 2) and (−1,0)(-1, 0); falling (slope −1-1) at (−1,2)(-1, 2) and (1,0)(1, 0).

Example.

2. Matching a field to its equation. The slope field below is for one of these equations: dydx=x+1\frac{dy}{dx} = x + 1, dydx=y+1\frac{dy}{dx} = y + 1, dydx=−y−1\frac{dy}{dx} = -y - 1, dydx=x+y\frac{dy}{dx} = x + y. Which one?

Look along a row: in each horizontal row the segments are all the same, while they change from row to row. So dydx\frac{dy}{dx} depends on yy only, which leaves y+1y + 1 and −y−1-y - 1; x+1x + 1 would be constant down columns, and x+yx + y along neither.

Now the signs. The level segments are along y=−1y = -1, where both remaining choices are 0. Above that line the segments rise, so the slope is positive for y>−1y > -1: at (0,1)(0, 1), y+1=2y + 1 = 2 is positive and −y−1-y - 1 is negative. And the segments get steeper farther from y=−1y = -1, as y+1y + 1 does.

Result.

dydx=y+1\frac{dy}{dx} = y + 1.

Example.

3. A solution through a point, and where it goes. For dydx=12y(3−y)\frac{dy}{dx} = \frac{1}{2}y(3 - y), sketch the solutions through (0,1)(0, 1) and through (0,4)(0, 4). Find lim⁡x→∞y\lim_{x \to \infty} y for each.

The slope depends on yy only, and it is 0 when y=0y = 0 or y=3y = 3: the constant functions y=0y = 0 and y=3y = 3 are solutions, and the field is level along those two lines.

Start at (0,1)(0, 1): the slope is 11, positive, so the solution rises. It keeps rising while 0<y<30 < y < 3, but as yy nears 3 the slopes shrink toward 0, so the curve levels off under the line y=3y = 3 without crossing it (two solutions cannot cross where the field gives one slope). Start at (0,4)(0, 4): the slope is −2-2, negative, so that solution falls toward y=3y = 3 from above.

Result.

Both solutions approach the level line: lim⁡x→∞y=3\lim_{x \to \infty} y = 3 for each, the one through (0,1)(0, 1) rising to it and the one through (0,4)(0, 4) falling to it.

Example.

4. Where the slopes are zero, positive and negative. For dydx=x(y−1)\frac{dy}{dx} = x(y - 1), describe the points where the slope is 0, where it is positive and where it is negative.

The product x(y−1)x(y - 1) is 0 when x=0x = 0 or y=1y = 1: along the yy-axis and along the horizontal line y=1y = 1 (dashed below). These two lines cut the plane into four regions, and the sign of a product is positive when its two factors have the same sign:

  • x>0x > 0 and y>1y > 1: positive (at (2,3)(2, 3) the slope is 44);
  • x<0x < 0 and y<1y < 1: positive (at (−2,−1)(-2, -1) it is 44);
  • x>0x > 0 and y<1y < 1, or x<0x < 0 and y>1y > 1: negative (at (2,−1)(2, -1) it is −4-4).
Result.

Slope 0 on the line x=0x = 0 and on the line y=1y = 1; positive where xx and y−1y - 1 have the same sign; negative where they have opposite signs.

Example.

5. Concavity and a relative minimum from the equation. Let y=f(x)y = f(x) be the solution of dydx=x+y−1\frac{dy}{dx} = x + y - 1 with f(1)=0f(1) = 0. Find d2ydx2\frac{d^2y}{dx^2} in terms of xx and yy, and decide whether ff has a relative minimum, a relative maximum or neither at x=1x = 1.

Differentiate the equation with respect to xx. The derivative of xx is 1, and the derivative of yy is dydx\frac{dy}{dx}:

d2ydx2=1+dydx=1+(x+y−1)=x+y\begin{aligned} \frac{d^2y}{dx^2} &= 1 + \frac{dy}{dx} = 1 + (x + y - 1) = {x + y} \end{aligned}

At the point (1,0)(1, 0): dydx=1+0−1=0\frac{dy}{dx} = 1 + 0 - 1 = {0} and d2ydx2=1+0=1\frac{d^2y}{dx^2} = 1 + 0 = {1}. The first derivative is 0 and the second is positive, so by the second derivative test ff has a relative minimum at x=1x = 1. The solution through (1,0)(1, 0) on the field shows it: level at the point, curving up on both sides.

Result.

d2ydx2=x+y\frac{d^2y}{dx^2} = {x + y}; at (1,0)(1, 0), dydx=0\frac{dy}{dx} = {0} and d2ydx2=1>0\frac{d^2y}{dx^2} = {1} > 0, so ff has a relative minimum at x=1x = 1.

Practice

Answer AP-style questions on slope fields: sketching and reasoning. Each answer is checked, with the full solution, and every try brings new numbers. Practice needs a free account: it keeps your progress.

Practise slope fields: sketching and reasoning with new numbers