AP Calculus AB · Lesson 33 of 35
CalcIQ · AP Calculus AB

Lesson 33: Slope Fields & Separable Differential Equations

Unit 7 · Differential Equations · Exam Weight:** 6–12% · 33/35 lessons · Mathematical Practice:** 2 — Connecting Representations; 1 — Implementing Mathematical Processes
Calculator:** Mixed
Objectives:
  • Recognize what a differential equation is, and understand that its solution is a function (or family of functions), not a number — and verify a proposed solution by substituting it back into the equation.
  • Read and sketch a slope field for dy/dx = (expression in x and/or y), use it to describe the behavior of solution curves, and match a slope field to its differential equation.
  • Solve a separable differential equation by separating variables and integrating, then apply an initial condition to find the particular solution, solving for y explicitly and stating its domain when possible.

(a) Opening Question

Suppose a quantity y changes so that, at every point, its rate of change equals twice the product of x and y itself:

dy/dx = 2xy

Is y = 3eˣ² a solution to this equation? How would you check — without solving anything from scratch?

Take a minute before reading on.

You do not need to "solve" the equation to test a candidate. A solution is a function, and a function is a solution exactly when plugging it in makes both sides agree. Differentiate y = 3eˣ² using the chain rule: dy/dx = 3eˣ² · (2x) = 6x eˣ². Now compute the right side using the same y: 2xy = 2x · 3eˣ² = 6x eˣ². The two sides match for every x, so yes, y = 3eˣ² is a solution. This is the heartbeat of the whole unit: a differential equation is a condition on a function's derivative, and "solving" it means finding the functions that satisfy that condition. This lesson teaches you to read those functions off a picture (slope fields) and to compute them by hand (separable equations).


(b) Core Concepts

What a differential equation is — and what a solution is

A differential equation is an equation that relates a function to its derivative(s). In AB, they almost always have the form

dy/dx = (some expression in x and/or y)

The unknown is not a number — it is a function y = f(x). A solution of the differential equation is any function that, when substituted in, makes the equation true for every x in some interval. Because antidifferentiation introduces a +C, a differential equation usually has a whole family of solutions, called the general solution. Pinning down one specific member requires an initial condition — a known point y(x₀) = y₀ the solution must pass through. The single function selected by the initial condition is the particular solution.

Verify by substitution. The most reliable thing you can do with a proposed solution is check it: differentiate the candidate, and confirm dy/dx equals the right-hand side after substituting the candidate for y. The AP exam frequently asks "show that y = ... is a solution," and the expected work is exactly this substitution.

Mini-example. Show y = e^(−x²/2) solves dy/dx = −xy.

Differentiate: dy/dx = e^(−x²/2) · (−x) = −x·e^(−x²/2). Substitute into the right side: −xy = −x·e^(−x²/2). The sides agree, so y = e^(−x²/2) is a solution. ✓

Slope fields

You can often see the solutions before computing them. A slope field (or direction field) is a grid of short line segments. At each point (x, y), the segment is drawn with slope equal to dy/dx evaluated there. Since dy/dx is the slope of a solution curve passing through that point, the segments are tiny tangent lines: a solution curve is any curve that flows tangent to the segments everywhere.

How to read one. Pick a point, evaluate dy/dx there, and that number is the segment's slope. Three patterns are worth memorizing:

Slope field for dy/dx = x − y on [−3, 3] × [−3, 3

Matching a slope field to a differential equation is a signature AB skill. Use these tests, in order:

  1. Find where the slope is zero. Set dy/dx = 0 and identify that set of points — they will show as horizontal segments. For dy/dx = x − y, the zero-slope set is the line y = x. For dy/dx = xy, it is the two axes (x = 0 or y = 0).
  2. Check dependence. Does the field's slope change as you move horizontally only, vertically only, or both? dy/dx = x → parallel along verticals; dy/dx = y → parallel along horizontals.
  3. Check signs in regions. Pick a test point in each region and confirm the sign (up-tilt vs. down-tilt) matches.

These three checks usually eliminate every wrong option without sketching the whole field.

Beyond AB (not tested here). BC students also learn Euler's method, a numerical scheme that steps along a slope field to approximate a solution. Euler's method is not on the AP Calculus AB exam — you will not be tested on it in this course. Everything graded in this lesson stays on slope fields and separable equations.

Separable differential equations

A differential equation is separable if you can algebraically write it so that all the y's (and dy) are on one side and all the x's (and dx) are on the other:

dy/dx = g(x)·h(y)   ⟶   (1/h(y)) dy = g(x) dx

Then integrate both sides. You get an antiderivative on each side; combine the two constants of integration into a single + C on one side (conventionally the x side). This produces the general solution, often implicitly. Apply the initial condition to find C, then solve for y explicitly if possible.

Fully worked separable equation, start to finish. Solve dy/dx = 2xy with the initial condition y(0) = 3.

Step 1 — Separate. Divide both sides by y and multiply by dx:

(1/y) dy = 2x dx

Step 2 — Integrate both sides.

∫ (1/y) dy = ∫ 2x dx
ln|y| = x² + C

(Only one + C is needed.)

Step 3 — Solve for y. Exponentiate both sides: |y| = e^(x² + C) = e^C · eˣ². Writing the positive constant e^C (with the sign of y absorbed) as a single constant A, the general solution is

y = A eˣ²

Step 4 — Apply the initial condition y(0) = 3: 3 = A e⁰ = A·1, so A = 3. The particular solution is

y = 3 eˣ²

Step 5 — Verify by substitution. Differentiate: dy/dx = 3 eˣ² · (2x) = 6x eˣ². The right side is 2xy = 2x·(3eˣ²) = 6x eˣ². They match, and y(0) = 3e⁰ = 3. ✓ Solution confirmed.

Applying the initial condition early vs. late

A clean shortcut: you may apply the initial condition right after integrating, before solving for y, to pin down C. For ln|y| = x² + C with y(0) = 3: ln 3 = 0 + C, so C = ln 3, giving ln|y| = x² + ln 3, i.e. y = e^(x²)·e^(ln 3) = 3eˣ². Same answer. On the AP exam, finding C before fully solving for y is often less error-prone.

Domain of a particular solution

A particular solution lives on the largest interval containing x₀ on which the function is defined, differentiable, and satisfies the equation — and where it does not cross any point that breaks the algebra (such as y = 0 when you divided by y). For example, y = 3eˣ² is defined for all real x, so its domain is (−∞, ∞). But a solution like y = 1/(1−x) with y(0) = 1 is only valid on (−∞, 1), the interval containing x₀ = 0 before the function blows up at x = 1. State the domain as the interval through the initial point, stopping at any vertical asymptote or undefined point.


(c) Worked Examples

Example 1 — Verify a proposed solution (NO CALC)

Problem. Show that y = x² + (2/x) is a solution of the differential equation x·(dy/dx) + y = 3x² for x > 0.

Strategy. Differentiate the candidate, substitute both y and dy/dx into the left side, and check it simplifies to the right side.

Solution. With y = x² + 2x⁻¹, differentiate: dy/dx = 2x − 2x⁻². Substitute into the left side:

x·(dy/dx) + y = x(2x − 2x⁻²) + (x² + 2x⁻¹)
              = 2x² − 2x⁻¹ + x² + 2x⁻¹
              = 3x²

The left side equals 3x², the right side. ✓

Justification. Because substituting y = x² + 2/x and its derivative into x·(dy/dx) + y yields 3x² for all x > 0, the function satisfies the differential equation and is therefore a solution on (0, ∞).

Example 2 — Match a slope field to a differential equation (NO CALC)

Problem. A slope field has horizontal segments exactly along the line y = x, segments tilting upward below that line and downward above it. Which differential equation generated it?

(A) dy/dx = x + y (B) dy/dx = x − y (C) dy/dx = y − x (D) dy/dx = xy

Strategy. Use the zero-slope test first, then check the sign in one region.

Solution. Horizontal segments occur where dy/dx = 0. The field is horizontal along y = x, so we need dy/dx = 0 precisely when y = x. Test each: for (B), x − y = 0 ⟺ y = x. ✓ For (C), y − x = 0 ⟺ y = x also — so check signs. Below the line means x > y. For (B): x − y > 0, slope positive (up-tilt). ✓ matches. For (C): y − x < 0, slope negative — wrong. (A) is zero on y = −x, and (D) is zero on the axes — neither matches.

Answer: (B) dy/dx = x − y.

Justification. The differential equation must have dy/dx = 0 exactly on y = x (forcing (B) or (C)), and must give positive slope where x > y (below the line). Only dy/dx = x − y satisfies both.

Example 3 — Solve a separable equation with an initial condition (NO CALC)

Problem. Solve dy/dx = x/y with y(0) = 2. Give the explicit particular solution and its domain.

Strategy. Separate (y with dy, x with dx), integrate, apply the initial condition, solve for y.

Solution. Separate: y dy = x dx. Integrate both sides:

∫ y dy = ∫ x dx
y²/2 = x²/2 + C

Apply y(0) = 2: (2)²/2 = 0 + C, so C = 2. Then y²/2 = x²/2 + 2, i.e. y² = x² + 4. Solve for y. Since y(0) = 2 > 0, take the positive root:

y = √(x² + 4)

Domain. x² + 4 > 0 for all real x, so the domain is (−∞, ∞).

Verify. dy/dx = (1/2)(x² + 4)^(−1/2)·(2x) = x/√(x² + 4) = x/y. ✓ And y(0) = √4 = 2. ✓

Example 4 — Exponential-type separable, dy/dx = ky preview (NO CALC)

Problem. Solve dy/dx = 6x²y with y(0) = 1. Then note how this relates to the form dy/dx = ky.

Strategy. Separate variables, integrate, exponentiate, apply the initial condition.

Solution. Separate: (1/y) dy = 6x² dx. Integrate:

ln|y| = 2x³ + C

Exponentiate: y = A e^(2x³) (with A = ±e^C). Apply y(0) = 1: 1 = A e⁰ = A, so A = 1. Thus

y = e^(2x³)

Verify. dy/dx = e^(2x³)·(6x²) = 6x² e^(2x³) = 6x²y. ✓ And y(0) = e⁰ = 1. ✓

Connection to dy/dx = ky. When the rate of change of y is proportional to y with a constant kdy/dx = ky — the same separation gives ln|y| = kx + C and y = y₀ eᵏˣ, exponential growth/decay. Here the "proportionality" multiplier 6x² is not constant, so the exponent picks up its antiderivative 2x³ instead of kx. Lesson 34 develops the constant-k case (dy/dt = ky) in full as the exponential model.


(d) Common Mistakes

Forgetting + C before applying the initial condition. Students integrate ∫(1/y)dy = ∫2x dx to get ln|y| = x² and skip + C. With no constant, there is nothing for the initial condition to adjust, and the particular solution comes out wrong. Fix: write + C the instant you integrate, then substitute the initial condition to solve for it. On the AP rubric, the constant of integration is a required, separately-scored step.

Not separating completely. A common error is trying to integrate dy/dx = 2xy as if it were ∫ 2xy dx with y treated as a constant. You cannot integrate the right side while it still contains the unknown y. Fix: the equation is solvable only because it factors as g(x)·h(y); you must get every y onto the left with dy and every x onto the right with dx before integrating. If you cannot fully separate, the method does not apply.

Sign/algebra errors solving for y. After y² = x² + 4, students write y = ±√(x² + 4) and stop, or pick the wrong root. Fix: the initial condition chooses the branch. Since y(0) = 2 > 0, keep the positive root. Also, √(x² + 4) ≠ x + 2 — you cannot distribute a square root over a sum. Keep it as √(x² + 4).

Mismatching a slope field. Students eyeball a field and guess without testing. Fix: always start with the zero-slope set (set dy/dx = 0), then test the sign of dy/dx at one point in a region. If two equations share the same zero set (like x − y and y − x), the sign test breaks the tie. Also remember: slope depending only on x ⇒ columns of parallel segments; only on y ⇒ rows of parallel segments.

Dropping the absolute value / mishandling e^C. From ln|y| = x² + C, students write y = eˣ² + C (adding the constant) instead of y = e^C·eˣ² (multiplying). Fix: exponentiating a sum gives a product: e^(x²+C) = e^C·eˣ². Rename ±e^C as a single constant A, then apply the initial condition.

(e) Practice Problems

Question 1NO CALC
Which function is a solution of dy/dx = 2y?
Question 2NO CALC
The general solution of dy/dx = 4x³ is:
Question 3NO CALC
For the differential equation dy/dx = y, which describes its slope field?
Question 4NO CALC
A slope field shows horizontal segments only along the two coordinate axes (x = 0 and y = 0). Which differential equation could generate it?
Question 5NO CALC
Separating dy/dx = x/y correctly gives:
Question 6NO CALC
The particular solution of dy/dx = y with y(0) = 5 is:
Question 7NO CALC
If ln|y| = x² + C and y(0) = 7, then C =
Question 8NO CALC
Solving dy/dx = e^(−y) with y(0) = 0 gives y =
Question 9CALC
A slope-field visualization for dy/dx = x − y shows a solution curve through (0, −2). Near x = 0, the solution is:
Question 10NO CALC
The particular solution of dy/dx = x/y with y(0) = 2 is y = √(x² + 4). Its domain is:
Question 11CALC
For dy/dx = cos x / y with y(0) = 2, the particular solution satisfies y² =

12 (short answer). [NO CALC] Solve dy/dx = 6x²y with y(0) = 1. Give the explicit solution and verify it by substitution.

13 (short answer, justification). [NO CALC] A student claims y = eˣ² + C is the general solution of dy/dx = 2xy. Identify the algebra error and give the correct general solution. Justify why your function works.

14 (short answer, slope-field matching, justification). [NO CALC] A slope field has horizontal segments only along the x-axis (y = 0) and the slopes get steeper as |x| grows. Determine whether the differential equation is dy/dx = xy or dy/dx = x + y, and justify using the zero-slope set.

15 (short answer, justification/interpretation). [NO CALC] Solve dy/dx = −y/x with y(1) = 2 for x > 0. State the domain of the particular solution and explain why x = 0 cannot be in it.


(f) AP Exam Focus

This is a non-calculator free-response question (AP Section II, Part B style). Budget about 15 minutes. Show all separation and integration steps, label your constant, and use precise justification language.

FRQ. Consider the differential equation

`

dy/dx = 3x² / (2y)

`

Let y = f(x) be the particular solution with f(0) = 1.

(a) On the axes provided, a slope field for the differential equation is drawn at the twelve indicated points. At the points (0, 1), (1, 1), and (2, 1), find dy/dx and describe the relative steepness of the segments there. (3 points)

(b) Write an equation for the line tangent to the solution curve y = f(x) at the point (0, 1), and use it to approximate f(0.2). (2 points)

(c) Find the particular solution y = f(x) to the differential equation with the initial condition f(0) = 1, and state its domain. (4 points)

(d) Use the particular solution from part (c) to find the exact value of f(2). (1 point)

Total: 10 points

Model Solution

(a) Evaluate dy/dx = 3x²/(2y) at each point:

At (0, 1):  dy/dx = 3(0)²/(2·1) = 0
At (1, 1):  dy/dx = 3(1)²/(2·1) = 3/2
At (2, 1):  dy/dx = 3(2)²/(2·1) = 12/2 = 6

At (0, 1) the segment is horizontal (slope 0). At (1, 1) it has a moderate positive slope of 3/2. At (2, 1) it is much steeper (slope 6). The segments grow steeper as x increases (for a fixed y > 0), since dy/dx is proportional to .

(b) The tangent line at (0, 1) uses slope dy/dx|₍₀,₁₎ = 0 from part (a):

y − 1 = 0·(x − 0)   ⟹   y = 1

Linear (tangent-line) approximation: f(0.2) ≈ 1 + 0·(0.2) = 1.

(c) The equation is separable. Separate variables (y with dy, x with dx):

2y dy = 3x² dx

Integrate both sides:

∫ 2y dy = ∫ 3x² dx
y² = x³ + C

Apply the initial condition f(0) = 1: (1)² = (0)³ + C, so C = 1. Then y² = x³ + 1. Since f(0) = 1 > 0, take the positive square root:

y = √(x³ + 1)

Domain. We need x³ + 1 ≥ 0, i.e. x ≥ −1; and for the equation dy/dx = 3x²/(2y) to be valid we need y ≠ 0, i.e. x³ + 1 > 0, so x > −1. The interval containing x₀ = 0 is therefore (−1, ∞).

(d) Using f(x) = √(x³ + 1):

f(2) = √(2³ + 1) = √(8 + 1) = √9 = 3

Scoring Commentary — where students lose points


🔑 Answer Key

Multiple Choice

1. (A) y = e^(2x). Check: dy/dx = 2e^(2x) = 2y. ✓ (D) y = 2eˣ gives dy/dx = 2eˣ = y ≠ 2y. (C) y = x² gives dy/dx = 2x ≠ 2x². (B) y = 2x gives dy/dx = 2 ≠ 4x. Only an exponential with the matching exponent works.

2. (C) y = x⁴ + C. Antidifferentiate 4x³: ∫4x³ dx = x⁴ + C. Verify: d/dx[x⁴ + C] = 4x³. ✓ (A) differentiated instead. (D) dropped + C. (B) failed to divide by the new exponent.

3. (D) All segments in the same horizontal row are parallel. Since dy/dx = y depends only on y, the slope is constant along each horizontal line (fixed y). (B) describes a field depending only on x. (A) is false — segments are horizontal along the entire line y = 0, not just the origin. (C) false — slope equals y, not 1.

4. (B) dy/dx = xy. Setting xy = 0 gives x = 0 or y = 0 — exactly the two axes. Check: (A) is zero on y = −x (a line), (D) on y = x, (C) only at the origin. Only xy is zero on both whole axes.

5. (A) y dy = x dx. Multiply dy/dx = x/y by y dx: y dy = x dx. (C) and (B) misplace a variable. (D) is separable — it can be separated as in (A) — so the claim "cannot separate further" is false.

6. (D) y = 5eˣ. Separate (1/y)dy = dxln|y| = x + Cy = Aeˣ; y(0) = 5 gives A = 5. Verify: dy/dx = 5eˣ = y. ✓ (C) added instead of multiplying the constant. (B) put the constant in the exponent. (A) is not exponential.

7. (B) C = ln 7. Substitute x = 0, y = 7: ln|7| = 0² + C, so C = ln 7. (A) ignores the initial value. (D) forgot the logarithm. (C) exponentiated the wrong quantity.

8. (C) y = ln(x + 1). Separate: eʸ dy = dxeʸ = x + C; y(0) = 0 gives e⁰ = 0 + C, so C = 1, eʸ = x + 1, y = ln(x + 1). Verify: dy/dx = 1/(x+1) and e^(−y) = e^(−ln(x+1)) = 1/(x+1). ✓ (B) and (A) do not satisfy the equation. (D) has the wrong sign.

9. (D) increasing, since dy/dx = 0 − (−2) = 2 > 0. At (0, −2), dy/dx = x − y = 0 − (−2) = 2, which is positive, so the solution is increasing there. (A) is self-contradictory/garbled. (C) false — (0, −2) is not on y = x. (B) wrong sign.

10. (A) all real numbers. y = √(x² + 4); since x² + 4 ≥ 4 > 0 for every real x, the function is defined and differentiable everywhere, and y > 0 throughout (so dividing by y is always valid). (D), (B), (C) wrongly restrict an everywhere-defined function.

11. (B) y² = 2 sin x + 4. Separate: y dy = cos x dxy²/2 = sin x + C. Apply y(0) = 2: 4/2 = 0 + C, so C = 2; then y²/2 = sin x + 2, i.e. y² = 2 sin x + 4. Verify: differentiating y²/2 = sin x + 2 gives y·y' = cos x, so y' = cos x/y. ✓ (D) forgot to multiply through by 2. (C) integrated cos x to cos x. (A) dropped the constant.

Short Answer

12. Separate: (1/y) dy = 6x² dx. Integrate: ln|y| = 2x³ + C. Exponentiate: y = A e^(2x³). Apply y(0) = 1: 1 = A, so

Answer: y = e^(2x³).

Verify: dy/dx = e^(2x³)·6x² = 6x² e^(2x³) = 6x²y. ✓ And y(0) = e⁰ = 1. ✓

13. Error: exponentiating ln|y| = x² + C gives y = e^(x² + C) = e^C·eˣ², a product, not the sum eˣ² + C. You cannot turn a sum in the exponent into a sum of terms. Correct general solution: y = A eˣ² (with A = ±e^C a single constant). Justification: d/dx[A eˣ²] = A eˣ²·(2x) = 2x·(A eˣ²) = 2xy, so the function satisfies dy/dx = 2xy for every constant A; that is the general solution. (The student's eˣ² + C gives dy/dx = 2x eˣ² ≠ 2x(eˣ² + C) unless C = 0.)

14. Set dy/dx = 0. For dy/dx = xy, the zero set is x = 0 or y = 0 (both axes) — that includes horizontal segments off the x-axis (along x = 0), which the described field does not have. For dy/dx = x + y, the zero set is the line y = −x — also not "only the x-axis." Neither is "only y = 0" exactly, but among the two choices we test which fits "horizontal only along y = 0 with slopes steepening as |x| grows." Re-reading: along the x-axis (y = 0), xy = 0 ✓ gives horizontal segments; and for fixed y ≠ 0, |xy| grows with |x| ✓ (steeper). For x + y, segments are horizontal along the whole line y = −x, not the x-axis. Conclusion: the differential equation is dy/dx = xy, justified because its zero-slope set includes the x-axis and the slope magnitude |xy| increases with |x|, matching the steepening described. (Note: dy/dx = xy is also horizontal along the y-axis; the item's phrase "along the x-axis" is the discriminating feature versus x + y, whose horizontal set is the line y = −x.)

15. Separate dy/dx = −y/x: (1/y) dy = −(1/x) dx. Integrate: ln|y| = −ln|x| + C. Exponentiate: |y| = e^C·|x|⁻¹, so y = A/x. Apply y(1) = 2: 2 = A/1, so A = 2.

Answer: y = 2/x, on the domain (0, ∞).

Verify: dy/dx = −2/x² and −y/x = −(2/x)/x = −2/x². ✓ And y(1) = 2. ✓ Why x = 0 is excluded: the differential equation divides by x (the right side is −y/x), so x = 0 is undefined in the equation itself; moreover the solution y = 2/x has a vertical asymptote at x = 0. The initial point x₀ = 1 lies in (0, ∞), the largest interval through it on which y = 2/x is defined and differentiable, so the domain is (0, ∞).

FRQ Rubric (10 points)

| Part | Points | Earned for |

|---|---|---|

| (a) | 3 | dy/dx = 0 at (0,1) (1); dy/dx = 3/2 at (1,1) (1); dy/dx = 6 at (2,1) with steepness comparison (1) |

| (b) | 2 | Tangent line y = 1 using slope 0 from (a) (1); approximation f(0.2) ≈ 1 (1) |

| (c) | 4 | Separates 2y dy = 3x² dx (1); integrates to y² = x³ + C (1); applies f(0)=1C=1 and y = +√(x³+1) (1); domain (−1, ∞) (1) |

| (d) | 1 | f(2) = √9 = 3 (1) |

Most common point losses: (1) arithmetic on the slope at (2,1) — it is 6, not 12; (2) forgetting + C in (c), which forfeits both the constant and initial-condition credit; (3) reporting ±√(x³+1) without choosing the positive branch from f(0) = 1 > 0; (4) giving the domain as all reals instead of stopping at x = −1.

CalcIQ · Lesson 33 of 35 · Unit 7: Differential Equations · Slope Fields & Separable Differential Equations

This lesson is independent study material for AP Calculus AB exam preparation and is not endorsed by or affiliated with the College Board. "AP" and "Advanced Placement" are registered trademarks of the College Board.

Accuracy review: Every particular solution in this lesson was verified by substituting it back into its differential equation symbolically (sympy), confirming both that dy/dx matches the right-hand side after substituting y and that the initial condition is satisfied — Core y = 3eˣ² for dy/dx = 2xy, Example 3 y = √(x²+4) for dy/dx = x/y, Example 4 y = e^(2x³) for dy/dx = 6x²y, the FRQ y = √(x³+1) for dy/dx = 3x²/(2y), and every MCQ/short-answer solution. AB-scope confirmed: Euler's method appears only as a clearly-labeled "Beyond AB" aside and is excluded from all graded content. Reviewed by Isaac (retired actuary).

← Lesson 32
Lesson 34 →
Score: 0/0 correct