Unit 7: Differential Equations

Differential equations as rules of change (and how to check solutions)

A differential equation is an equation that relates an unknown function to one or more of its derivatives. In AP Calculus BC, you almost always see first-order differential equations, where the highest derivative is the first derivative. This connects naturally to earlier ideas like related rates: when variables aren’t constant, you often model how one quantity changes with respect to another using a derivative.

A typical first-order differential equation looks like this:

\frac{dy}{dt}=f(t,y)

This is different from an ordinary “solve for y” algebra problem. You are not given y(t) directly—you are given information about how y changes, and your job is to recover a function that matches that change.

Why calculus cares: differential equations model change

Many real situations are naturally described by rates.

  • A population changes at a rate depending on the current population.
  • A tank’s volume changes at a rate depending on inflow and outflow.
  • A quantity decays at a rate proportional to how much is present.

Calculus is the language of change, so differential equations are how you turn “change descriptions” into actual functions.

Solutions, general solutions, and particular solutions

A solution to a differential equation is a function that makes the equation true for all relevant inputs.

For example, if

\frac{dy}{dt}=3y

then

y(t)=Ce^{3t}

is a family of solutions (for any constant C). You can verify by differentiating:

\frac{d}{dt}(Ce^{3t})=3Ce^{3t}=3y

That family is the general solution because it contains infinitely many functions.

To pick out one specific function, you need an initial condition, such as y(0)=5. A differential equation together with an initial condition is an initial value problem (IVP).

With y(0)=5:

5=Ce^{0}

so C=5 and the particular solution is

y(t)=5e^{3t}

Implicit solutions are still solutions

Not every solution is easily written in the form “y= explicit formula.” Often you end up with an implicit solution, such as

\ln|y|=3t+C

That is still a valid solution because it correctly describes the relationship between y and t.

Checking a proposed solution

A very common skill is: given a differential equation and a candidate function, decide whether it is a solution.

Method: compute the derivative from the candidate, then substitute into the differential equation and see if both sides match.

Example 1: verify a solution

Claim: y(t)=2e^{-t} solves

\frac{dy}{dt}=-y

Differentiate:

\frac{dy}{dt}=-2e^{-t}

Compute -y:

-y=-2e^{-t}

They match, so it is a solution.

Example 2: use an initial condition

Solve the IVP:

\frac{dy}{dt}=-y

y(0)=6

From the general solution y=Ce^{-t}, plug in t=0:

6=Ce^{0}

So C=6 and

y(t)=6e^{-t}

Common meaning of notation in this unit

In AP problems, the independent variable might be x or t. The dependent variable might be y, P (population), or Q (quantity). The derivative might be written several ways.

MeaningCommon notations
derivative of y with respect to x\frac{dy}{dx}, y'
derivative of y with respect to t\frac{dy}{dt}
differential equation in “rate form”\frac{dy}{dt}=f(t,y)
Exam Focus
  • Typical question patterns:
    • “Show that y=\dots is a solution to \frac{dy}{dx}=\dots.”
    • “Find the particular solution given y(t_0)=y_0.”
    • “Interpret \frac{dy}{dt}=f(t,y) in context (what do variables and the rate mean?).”
  • Common mistakes:
    • Treating the differential equation like an algebraic equation and trying to “solve for y” without using calculus.
    • Forgetting the constant of integration (or losing it when manipulating logarithms).
    • Plugging the initial condition into the differential equation instead of into the solved solution form.

Slope fields (direction fields) and qualitative behavior

A slope field (also called a direction field) is a visual way to understand solutions to a first-order differential equation without solving it algebraically.

Suppose you have

\frac{dy}{dx}=f(x,y)

At any point (x,y), the differential equation tells you the slope of the solution curve passing through that point: the slope is f(x,y). A slope field is made by drawing a small line segment at many points, each with slope f(x,y).

Constructing a slope field

To construct a slope field, you repeatedly plug in the coordinates of a point (its x-value, its y-value, or both) into the right-hand side of the differential equation and draw a short segment with that slope.

For example, for

\frac{dy}{dx}=x

the slope only depends on x, so along any vertical line (same x), all segments have the same slope. In particular, at x=-1 the slope is -1, so every point with x=-1 gets a segment with slope -1.

Sketching a solution curve on a slope field

The AP exam may ask you to sketch a solution curve through a given initial point. You do this by “flowing” with the short slope segments: the solution curve should be tangent to the field everywhere.

Because this is drawn by hand, it does not have to be perfect. The key is that your curve should not cross the tiny segments abruptly or head in a direction that contradicts the indicated slope.

Why slope fields matter

Slope fields are useful because not every differential equation is easy to solve with algebraic methods. Even when you can solve, a slope field helps you understand behavior such as increasing vs decreasing, leveling off, approaching an equilibrium, and sensitivity to initial conditions.

How to read patterns in a slope field

When you look at a slope field, focus on:

  • where slopes are positive (solution curves rise) vs negative (solution curves fall),
  • where slopes are near zero (solution curves flatten),
  • whether slopes depend mainly on x, mainly on y, or on both.

If \frac{dy}{dx} depends only on x, then the slope is the same along vertical lines (same x).

If \frac{dy}{dx} depends only on y, then the slope is the same along horizontal lines (same y).

Isoclines (lines of constant slope)

An isocline is a curve where the slope value is constant.

For example, if

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

then “slope equals 0” means

x-y=0

so the isocline for slope 0 is

y=x

Along that line, the segments are horizontal.

Equilibrium (constant) solutions

An equilibrium solution is a constant solution y=c such that

\frac{dy}{dx}=0

whenever y=c.

In many AP contexts, the differential equation is autonomous:

\frac{dy}{dt}=g(y)

Equilibria occur where g(y)=0. If you start exactly at an equilibrium value, you stay there.

Stability idea (qualitative)

Even without formal stability theory, you can reason:

  • if solutions nearby move toward the equilibrium, it’s stable (attracting),
  • if solutions nearby move away, it’s unstable (repelling).

You infer this from the sign of \frac{dy}{dt} just above and just below the equilibrium level.

Example 1: reading behavior from an autonomous DE

Consider

\frac{dy}{dt}=y(2-y)

Equilibria occur when

y(2-y)=0

So y=0 and y=2 are equilibrium solutions.

Analyze the sign:

  • If 0
  • If y>2, then \frac{dy}{dt}

So solutions between 0 and 2 rise toward 2, and solutions above 2 fall toward 2, suggesting y=2 is stable. Near y=0, small positive y increases away from 0, so y=0 is unstable.

Example 2: matching a slope field to a differential equation

If a slope field shows that slopes are identical along horizontal lines, then \frac{dy}{dx} likely depends only on y. If it shows identical slopes along vertical lines, it likely depends only on x. This pattern recognition is often enough to eliminate wrong answer choices on multiple-choice questions.

Exam Focus
  • Typical question patterns:
    • “Sketch the solution curve through (x_0,y_0) on the given slope field.”
    • “Identify equilibrium solutions and describe long-term behavior.”
    • “Which differential equation could produce this slope field?”
  • Common mistakes:
    • Drawing a solution curve that crosses slope segments instead of following their direction.
    • Missing that equilibria occur where slope is zero (horizontal segments across a line or curve).
    • Confusing dependence on x vs dependence on y when interpreting repeated patterns.
    • Drawing a solution curve with sudden, unnatural direction changes instead of smoothly following the local tangent directions.

Euler’s method (numerical solution of an IVP)

Many differential equations cannot be solved neatly with algebra. Even when they can, numerical methods are essential in applications. Euler’s method is the main numerical method in AP Calculus BC.

Suppose you have an IVP:

\frac{dy}{dx}=f(x,y)

y(x_0)=y_0

Euler’s method approximates the solution by stepping forward in small increments of x, using the differential equation to estimate how much y changes.

The key idea: “tangent line stepping”

At the point (x_n,y_n), the differential equation gives the slope:

m=f(x_n,y_n)

For a small step h in x, a tangent line approximation gives:

\Delta y\approx mh

So the update rules are:

x_{n+1}=x_n+h

y_{n+1}=y_n+hf(x_n,y_n)

Why step size matters

Euler’s method is not exact; it accumulates error.

  • Smaller h usually gives better accuracy.
  • Larger h can drift significantly away from the true solution.

On AP problems, you’re usually told what step size to use, and you must follow it carefully.

Organizing work: tables

Most Euler’s method work is easiest in a table with columns for x_n, y_n, and f(x_n,y_n).

Example 1: one-step Euler approximation

Approximate y(0.2) for

\frac{dy}{dx}=x+y

y(0)=1

using step size h=0.2.

Start: x_0=0, y_0=1.

Compute slope:

f(x_0,y_0)=0+1=1

Update:

y_1=y_0+hf(x_0,y_0)=1+0.2(1)=1.2

So y(0.2)\approx 1.2.

Example 2: multiple steps

Approximate y(0.4) for the same IVP with h=0.2.

We have (x_1,y_1)=(0.2,1.2).

Compute the next slope:

f(x_1,y_1)=0.2+1.2=1.4

Update:

y_2=y_1+0.2(1.4)=1.2+0.28=1.48

So y(0.4)\approx 1.48.

Interpreting Euler’s method graphically

If you plot the points Euler generates and connect them with line segments, you get a piecewise linear approximation to the true solution curve. This also connects to slope fields: at each step, Euler uses the slope at the left endpoint (x_n,y_n).

Typical AP-style details that matter

  • Rounding: If instructed to round to three decimals each step, do so consistently.
  • Step direction: You can step forward (positive h) or backward (negative h).
  • Units in context: Interpret y_n as the approximate quantity after n steps.
Exam Focus
  • Typical question patterns:
    • “Use Euler’s method with step size h to approximate y(x) at a given value.”
    • “Use a slope field plus Euler steps to compare approximations.”
    • “Compare two Euler approximations (different step sizes) and reason which is more accurate.”
  • Common mistakes:
    • Using f(x_{n+1},y_{n+1}) instead of f(x_n,y_n).
    • Forgetting to update x each step, especially when the problem is written in terms of t.
    • Arithmetic drift: one small arithmetic error early ruins all later values.

Separable differential equations (solving by separating variables)

The most important algebraic solving technique in this unit is separation of variables. A differential equation is separable if you can rewrite it so that all y terms are on one side and all x (or t) terms are on the other.

A common separable form is:

\frac{dy}{dx}=g(x)h(y)

When the equation is separable, you can often “solve for the original function” by taking antiderivatives of both sides after separating. This is the core idea behind many AP differential equation problems.

A helpful checklist: SIPPY

A memory trick for separable/IVP problems is SIPPY:

  • S: Separate (get dy and dx on different sides)
  • I: Integrate (take antiderivatives)
  • P: Plus C (include the constant of integration)
  • P: Plug in your initial condition
  • Y: Y equals (solve for y explicitly if the problem asks)

Why separation works

The derivative \frac{dy}{dx} describes how small changes relate. When the equation factors into an x-part and a y-part, you can separate the relationship so that integrating both sides accumulates total change.

The standard process (with meaning)

  1. Start with

\frac{dy}{dx}=g(x)h(y)

  1. Rewrite as

\frac{1}{h(y)}\frac{dy}{dx}=g(x)

  1. Treat the notation as indicating multiplication by dx:

\frac{1}{h(y)}dy=g(x)dx

  1. Integrate both sides:

\int \frac{1}{h(y)}dy=\int g(x)dx

  1. Add a constant (one constant is enough):

\int \frac{1}{h(y)}dy=\int g(x)dx+C

  1. Use the initial condition to solve for C.

After integrating, you might have an implicit equation in x and y. That is fine unless the problem explicitly asks you to solve for y.

Example 1: basic separable DE

Solve:

\frac{dy}{dx}=xy

Separate:

\frac{1}{y}dy=xdx

Integrate:

\int \frac{1}{y}dy=\int xdx

So

\ln|y|=\frac{x^2}{2}+C

Exponentiate and absorb constants:

y=Ce^{\frac{x^2}{2}}

Example 2: separable IVP with an implicit step

Solve:

\frac{dy}{dx}=\frac{x}{1+y^2}

y(0)=1

Separate:

(1+y^2)dy=xdx

Integrate:

\int (1+y^2)dy=\int xdx

So

y+\frac{y^3}{3}=\frac{x^2}{2}+C

Use y(0)=1:

1+\frac{1}{3}=C

So

C=\frac{4}{3}

A perfectly acceptable particular solution is the implicit form:

y+\frac{y^3}{3}=\frac{x^2}{2}+\frac{4}{3}

Example 3: SIPPY in action (separate, integrate, plus C, plug in, solve for y)

Solve the IVP:

\frac{dy}{dx}=\frac{4x}{y}

y(0)=5

Separate:

y\,dy=4x\,dx

Integrate:

\int y\,dy=\int 4x\,dx

So

\frac{y^2}{2}=2x^2+C

Plug in x=0 and y=5:

\frac{25}{2}=C

Thus

\frac{y^2}{2}=2x^2+\frac{25}{2}

Multiply by 2:

y^2=4x^2+25

Solve for y and use the initial condition to choose the correct branch. Since y(0)=5 is positive, the particular solution is

y=\sqrt{4x^2+25}

Constant solutions can be lost if you divide by a variable

If you divide by a variable expression (like y), you might accidentally discard the case where that expression is zero.

Example: with

\frac{dy}{dx}=xy

dividing by y assumes y\neq 0, but y=0 is also a solution. In this particular example, the family y=Ce^{\frac{x^2}{2}} still includes y=0 when C=0, but it’s a good habit to quickly check for constant solutions.

When separation is not possible

If you cannot algebraically isolate all y terms with dy and all x terms with dx, separation won’t work. In this unit, you are not expected to use more advanced methods (like integrating factors).

Exam Focus
  • Typical question patterns:
    • “Solve the differential equation by separation of variables and apply the initial condition.”
    • “Find an implicit solution and use it to compute y at a specific x.”
    • “Determine whether a differential equation is separable and explain.”
  • Common mistakes:
    • Forgetting the constant of integration or mishandling it when combining logs and exponentials.
    • Separating incorrectly (especially with expressions like 1+y^2 in denominators).
    • Solving for C using the wrong point (mixing up x_0 and y_0).

Exponential growth and decay as differential equations

A key modeling idea is: the rate is proportional to the amount present. In differential equation form:

\frac{dQ}{dt}=kQ

Here Q(t) is the quantity at time t, and k is a constant.

  • If k>0, you get growth.
  • If k

Why this model is everywhere

This model appears whenever each “unit” of the quantity contributes equally to change, such as population growth with unlimited resources (simplified), radioactive decay, and continuously compounded interest.

Solving the model (separation)

Separate and integrate:

\frac{1}{Q}dQ=kdt

\ln|Q|=kt+C

So

Q=Ce^{kt}

If Q(0)=Q_0, then

Q(t)=Q_0e^{kt}

Doubling time and half-life

If k>0, the **doubling time** T satisfies Q(T)=2Q_0:

T=\frac{\ln 2}{k}

If k