AP Calculus BC

Chapter 9: Differential Equations

AP Calculus BC  |  Unit 4: BC Topics

Learning Objectives

9.1 Slope Fields

A differential equation is an equation involving a function and its derivatives, such as $\dfrac{dy}{dx} = f(x, y)$. Rather than finding an explicit solution immediately, we can visualize the family of solutions using a slope field.

Slope Field

A slope field (or direction field) for $\dfrac{dy}{dx} = f(x, y)$ is drawn by computing the slope $f(x_0, y_0)$ at a grid of points $(x_0, y_0)$ and drawing a short line segment with that slope at each point.

Each solution curve $y(x)$ is tangent to the slope field at every point it passes through — the slope field encodes all solutions simultaneously.

Example 9.1 — Reading a Slope Field

Consider $\dfrac{dy}{dx} = y$. At any point $(x, y)$, the slope equals $y$.

The solution curves are $y = Ce^x$ for various constants $C$. A particular solution through $(0, 1)$ gives $C = 1$, so $y = e^x$.

AP Exam Tip: On the AP exam, slope field questions typically ask you to: (1) match a slope field to a DE, (2) sketch a solution curve through a given point, or (3) determine which slope field matches a given DE. Key strategy: check special lines — what happens along $y=0$? Along $x=0$? Along $y=x$? These "zero-slope" or "unit-slope" lines narrow down the answer quickly.

Slope field for $dy/dx = y$ — the solution curves are exponentials $y = Ce^x$. Notice how the slopes get steeper as $|y|$ increases.

Figure 9.1 — Slope Field for $\dfrac{dy}{dx} = y$ with solution curves

9.2 Separable Differential Equations

A differential equation is separable if it can be written as $\dfrac{dy}{dx} = g(x) \cdot h(y)$ — functions of $x$ and $y$ fully separated. We solve by moving all $y$ terms to one side and $x$ terms to the other, then integrating.

Separation of Variables

  1. Rewrite as $\dfrac{dy}{h(y)} = g(x)\,dx$.
  2. Integrate both sides: $\displaystyle\int \dfrac{dy}{h(y)} = \int g(x)\,dx$.
  3. Solve for $y$ (if possible). Include the constant $C$ on one side.
  4. Apply initial conditions to determine $C$.

Example 9.2 — Exponential Growth: $\dfrac{dy}{dx} = ky$

This is the most important separable DE. Separate: $\dfrac{dy}{y} = k\,dx$

Integrate: $\ln|y| = kx + C_1$

Solve: $|y| = e^{kx+C_1} = e^{C_1}e^{kx}$, so $y = Ce^{kx}$ where $C = \pm e^{C_1}$.

With initial condition $y(0) = y_0$: $y = y_0 e^{kx}$.

If $k > 0$: exponential growth. If $k < 0$: exponential decay (e.g., radioactive decay).

Example 9.3 — General Separable DE

Solve $\dfrac{dy}{dx} = \dfrac{x}{y}$ with $y(0) = 3$.

Separate: $y\,dy = x\,dx$

Integrate: $\dfrac{y^2}{2} = \dfrac{x^2}{2} + C$, so $y^2 = x^2 + K$ where $K = 2C$.

Apply IC: $9 = 0 + K \Rightarrow K = 9$. Solution: $y = \sqrt{x^2 + 9}$ (positive branch since $y(0)=3>0$).

TRY IT

Solve $\dfrac{dy}{dx} = -2xy$ with $y(0) = 5$.

Show Answer
Separate: $\dfrac{dy}{y} = -2x\,dx$
Integrate: $\ln|y| = -x^2 + C$
Solve: $y = Ce^{-x^2}$
IC: $5 = Ce^0 = C$
Answer: $y = 5e^{-x^2}$ (a Gaussian bell curve)

9.3 Euler's Method

When a DE can't be solved analytically, Euler's method approximates the solution numerically by stepping along tangent lines from an initial point.

Euler's Method

Given $\dfrac{dy}{dx} = f(x,y)$ with initial condition $y(x_0) = y_0$ and step size $h$:

$$x_{n+1} = x_n + h \qquad y_{n+1} = y_n + h \cdot f(x_n, y_n)$$

Each step uses the current slope to predict the next $y$ value. Smaller $h$ gives more accuracy but requires more steps.

Example 9.4 — Euler's Method on $\dfrac{dy}{dx} = x + y$

Use $y(0) = 1$, step size $h = 0.5$. Approximate $y(1)$.

$n$$x_n$$y_n$$f(x_n, y_n) = x_n + y_n$$y_{n+1} = y_n + 0.5f$
00111.5
10.51.522.5
21.02.5

Euler approximation: $y(1) \approx 2.5$. (Actual solution is $y = 2e^x - x - 1$; exact value $y(1) = 2e - 2 \approx 3.436$. Error is large here because $h=0.5$ is big.)

AP Exam Tip: Euler's method problems on the AP exam usually use 2–4 steps with a given step size and ask you to fill in a table or state whether the approximation is an overestimate or underestimate. If $f$ is increasing (concave up), Euler underestimates. If $f$ is decreasing (concave down), Euler overestimates.

Euler's method with $dy/dx = x+y$, $y(0)=1$. Adjust the step size $h$ to see how accuracy improves as steps get smaller.

Figure 9.2 — Euler's Method vs. Exact Solution for $dy/dx = x + y$

9.4 Logistic Growth

Exponential growth $\dfrac{dP}{dt} = kP$ is unrealistic for populations — resources limit growth. The logistic model adds a carrying capacity $M$:

Logistic Differential Equation

$$\frac{dP}{dt} = kP\left(1 - \frac{P}{M}\right) \quad \text{or equivalently} \quad \frac{dP}{dt} = kP(M-P)/M$$

where $M$ is the carrying capacity (maximum sustainable population) and $k > 0$.

Behavior:

Solution: $P(t) = \dfrac{M}{1 + Ae^{-kt}}$ where $A = \dfrac{M - P_0}{P_0}$.

Maximum growth rate occurs at $P = M/2$ (inflection point of $P(t)$).

Example 9.5 — Fish Population Logistic Model

A lake can support 1000 fish ($M = 1000$). Currently $P_0 = 100$, and $k = 0.2$. Find $P(t)$ and when the population reaches 500.

$A = \dfrac{1000-100}{100} = 9$, so $P(t) = \dfrac{1000}{1 + 9e^{-0.2t}}$

Set $P = 500$: $500 = \dfrac{1000}{1+9e^{-0.2t}} \Rightarrow 1 + 9e^{-0.2t} = 2 \Rightarrow e^{-0.2t} = \dfrac{1}{9}$

$t = \dfrac{\ln 9}{0.2} = 5\ln 9 \approx 10.99$ years.

Note: $P = 500 = M/2$ is where growth is fastest — this is the inflection point.

TRY IT

For $\dfrac{dP}{dt} = 0.3P\!\left(1 - \dfrac{P}{500}\right)$ with $P(0) = 50$: What is the carrying capacity? At what population is the growth rate maximum?

Show Answer
Carrying capacity: $M = 500$.
Maximum growth rate at $P = M/2 = 250$.
At $P=250$: $\dfrac{dP}{dt} = 0.3(250)(1-250/500) = 0.3(250)(0.5) = 37.5$ per unit time.

Logistic growth: population $P(t)$ approaches carrying capacity $M$ as an S-curve. Adjust $k$ and $M$ with the sliders to see how they affect the growth.

Figure 9.3 — Logistic Growth Model: S-curve approaching carrying capacity $M$

Practice Problems

1

For the slope field of $\dfrac{dy}{dx} = x - y$, what is the slope at $(2, 1)$? At $(0, 0)$? Sketch a solution curve through $(0, 1)$.

Show Solution
At $(2,1)$: slope $= 2-1 = 1$.
At $(0,0)$: slope $= 0-0 = 0$.
The DE $y'-y=x$ has solution $y = Ce^x - x - 1$. Through $(0,1)$: $1 = C - 0 - 1 \Rightarrow C = 2$, so $y = 2e^x - x - 1$. The curve rises steeply for $x > 0$.
2

Solve the initial value problem $\dfrac{dy}{dx} = \dfrac{2x}{y}$, $y(1) = 4$.

Show Solution
Separate: $y\,dy = 2x\,dx$
Integrate: $\dfrac{y^2}{2} = x^2 + C$
IC at $(1,4)$: $8 = 1 + C \Rightarrow C = 7$
$y^2 = 2x^2 + 14$, so $y = \sqrt{2x^2+14}$ (positive since $y(1)=4>0$)
3

A sample of radioactive material decays at rate $\dfrac{dA}{dt} = -0.05A$. If initially $A(0) = 200$ grams, find $A(t)$ and the half-life.

Show Solution
Solution: $A(t) = 200e^{-0.05t}$
Half-life: set $100 = 200e^{-0.05t}$
$e^{-0.05t} = 0.5 \Rightarrow t = \dfrac{\ln 2}{0.05} = 20\ln 2 \approx 13.86$ years
4

Use Euler's method with $h = 0.25$ to approximate $y(0.5)$ for $\dfrac{dy}{dx} = x^2 + y$, $y(0) = 1$.

Show Solution
Step 1: $x_0=0$, $y_0=1$, $f=0+1=1$
$y_1 = 1 + 0.25(1) = 1.25$
Step 2: $x_1=0.25$, $y_1=1.25$, $f=0.0625+1.25=1.3125$
$y_2 = 1.25 + 0.25(1.3125) = 1.578$
Approximation: $y(0.5) \approx 1.578$
5

A population grows logistically with $M = 2000$, $k = 0.1$, and $P(0) = 400$. Find $P(t)$ and the time when $P = 1000$.

Show Solution
$A = \dfrac{2000-400}{400} = 4$
$P(t) = \dfrac{2000}{1+4e^{-0.1t}}$
Set $P = 1000$: $1 + 4e^{-0.1t} = 2 \Rightarrow e^{-0.1t} = 0.25$
$t = \dfrac{\ln 4}{0.1} = 10\ln 4 \approx 13.86$ years
6

Identify the equilibrium solutions of $\dfrac{dy}{dx} = y^2(y-4)$ and classify each as stable or unstable.

Show Solution
Equilibria where $\dfrac{dy}{dx} = 0$: $y=0$ (double root) and $y=4$.
Analyze sign of $\dfrac{dy}{dx}$:
$y < 0$: $y^2 > 0$, $(y-4) < 0$ → $dy/dx < 0$ (decreasing)
$0 < y < 4$: $y^2 > 0$, $(y-4) < 0$ → $dy/dx < 0$ (decreasing)
$y > 4$: $y^2 > 0$, $(y-4) > 0$ → $dy/dx > 0$ (increasing)
$y=4$: solutions move away → unstable.
$y=0$: solutions approach from above but move away below → semi-stable.
7

Solve $\dfrac{dy}{dx} = \dfrac{y\cos x}{1+2y^2}$.

Show Solution
Separate: $\dfrac{1+2y^2}{y}\,dy = \cos x\,dx$
Rewrite left: $\left(\dfrac{1}{y} + 2y\right)dy = \cos x\,dx$
Integrate: $\ln|y| + y^2 = \sin x + C$
(This is an implicit solution — cannot be solved for $y$ explicitly.)
8

(AP Style) For $\dfrac{dP}{dt} = 0.4P\!\left(1-\dfrac{P}{800}\right)$: (a) What are the equilibrium solutions? (b) At what value of $P$ is $dP/dt$ greatest? (c) For what values of $P$ is the population increasing?

Show Solution
(a) Equilibria: $P=0$ (unstable) and $P=800$ (stable — carrying capacity).
(b) Max growth rate at $P = M/2 = 400$.
At $P=400$: $dP/dt = 0.4(400)(0.5) = 80$ per time unit.
(c) Population increasing when $dP/dt > 0$: when $0 < P < 800$.

📋 Chapter Summary

Core Concepts

Differential Equation

An equation relating a function $y$ with its derivatives. A solution is a function $y = f(x)$ satisfying the equation.

Separable Equations

$\dfrac{dy}{dx} = g(x)h(y)$ — separate variables: $\dfrac{dy}{h(y)} = g(x)\,dx$, then integrate both sides.

Slope Fields

A visual representation of $\frac{dy}{dx}$ at points $(x,y)$. Draw short segments with slope $f(x,y)$ at each point to sketch solution curves.

Logistic Growth

$\dfrac{dP}{dt} = kP\!\left(1-\dfrac{P}{M}\right)$ — population grows toward carrying capacity $M$. Solution has an S-shaped curve.

Key Formulas

Exponential Growth/Decay

$\dfrac{dy}{dt} = ky$ has solution $y = Ce^{kt}$. Growth if $k>0$, decay if $k<0$.

Euler's Method

$y_{n+1} = y_n + h \cdot f(x_n, y_n)$ — approximates solution using step size $h$ from initial condition $(x_0, y_0)$.

Half-Life Formula

$t_{1/2} = \dfrac{\ln 2}{k}$ — time for exponential decay to reduce $y$ to half its value.

Logistic Solution

$P(t) = \dfrac{M}{1 + Ae^{-kt}}$ where $A = \dfrac{M - P_0}{P_0}$ and $M$ is the carrying capacity.

Solving Separable DEs

  1. Separate — rewrite as $\dfrac{dy}{h(y)} = g(x)\,dx$
  2. Integrate both sides — $\int \dfrac{dy}{h(y)} = \int g(x)\,dx + C$
  3. Solve for $y$ — if possible, express $y$ explicitly
  4. Apply initial condition — substitute $(x_0, y_0)$ to find $C$

📘 Key Terms

Differential Equation An equation involving an unknown function and its derivatives. A solution is a function that satisfies the equation.
Separable DE A DE of the form $dy/dx = g(x)h(y)$ that can be solved by separating variables and integrating both sides.
Initial Value Problem A DE together with an initial condition $y(x_0) = y_0$ that specifies a unique particular solution.
Slope Field A diagram showing line segments with slope $dy/dx$ at each point — helps visualize solution curves without solving the DE.
Euler's Method A numerical method for approximating DE solutions by stepping along tangent lines with step size $h$.
Carrying Capacity The maximum population $M$ that an environment can sustain; the upper asymptote in logistic growth.
← Chapter 8: Applications of Integration Chapter 10: Parametric, Polar & Vectors ›