AP Calculus AB and BC

Differential Equations Cheat Sheet for AP Calculus

AP Calculus differential equations come down to five skills: read a slope field, approximate with Euler's method (BC), solve by separating variables, use y = Ce^(kt) for exponential change, and for the logistic model (BC) read the carrying capacity and the fastest growth at half of it straight from the equation.

Writing and checking differential equations

WordingDifferential equation
The rate of change of yy is proportional to yydydt=ky\frac{dy}{dt} = ky
The rate of change of yy is proportional to the difference between yy and a constant AAdydt=k(y−A)\frac{dy}{dt} = k(y - A)
The rate of change of yy is inversely proportional to yydydt=ky\frac{dy}{dt} = \frac{k}{y}
The rate of change of yy is proportional to the product of yy and L−yL - ydydt=ky(L−y)\frac{dy}{dt} = ky(L - y)
A quantity enters at one rate and leaves at anotherdydt=(rate in)−(rate out)\frac{dy}{dt} = (\text{rate in}) - (\text{rate out})
  • A general solution contains an arbitrary constant CC and describes a family of curves. A particular solution uses an initial condition to fix CC.
  • To verify a proposed solution (Topic 7.2), compute its derivative and substitute into both sides of the differential equation. The two sides must agree for every xx in the domain. Then check the initial condition if there is one.

Slope fields

A slope field draws a short segment with slope dydx\frac{dy}{dx} at each grid point. A solution curve is tangent to the segments it passes through (Topics 7.3 and 7.4).

Feature of the equationWhat the slope field shows
dydx\frac{dy}{dx} depends only on xxSegments are identical along each vertical line. Solution curves are vertical shifts of one another.
dydx\frac{dy}{dx} depends only on yySegments are identical along each horizontal line.
dydx=0\frac{dy}{dx} = 0 at a pointA horizontal segment at that point.
dydx=0\frac{dy}{dx} = 0 at every point of a line y=cy = cy=cy = c is a constant (equilibrium) solution.
dydx>0\frac{dy}{dx} > 0 in a regionSegments rise from left to right there, so solutions increase.
dydx\frac{dy}{dx} is undefined, as when a denominator is 00No slope is defined at those points.
  • To match an equation to a slope field, find where the slopes are zero, then test the sign of the slope in each quadrant, then check a point with a large slope.
  • Concavity of a solution comes from the second derivative, found by differentiating the equation implicitly. For dydx=x+y\frac{dy}{dx} = x + y: d2ydx2=1+dydx=1+x+y\frac{d^2y}{dx^2} = 1 + \frac{dy}{dx} = 1 + x + y.

Sketching practice is in slope fields and Euler's method.

Euler's method (BC)

Euler's method (Topic 7.5) approximates a solution of dydx=F(x,y)\frac{dy}{dx} = F(x, y) through (x0,y0)(x_0, y_0) by following tangent lines in steps of size Δx\Delta x:

xn+1=xn+Δxyn+1=yn+F(xn,yn)⋅Δxx_{n+1} = x_n + \Delta x \qquad y_{n+1} = y_n + F(x_n, y_n) \cdot \Delta x
ColumnHow to fill it
xnx_nStart at x0x_0 and add Δx\Delta x each row.
yny_nStart at y0y_0. Each new value is the previous yy plus the previous row's change.
Slope F(xn,yn)F(x_n, y_n)Substitute the current row's xnx_n and yny_n into the differential equation.
Change in yySlope times Δx\Delta x.
  • The slope in each step uses the current approximate point, not the exact solution.
  • Δx\Delta x is negative when stepping to the left.
  • A single step follows a tangent line. With Δx>0\Delta x > 0, it underestimates when the solution curve is concave up between the two xx-values and overestimates when it is concave down.
  • Smaller steps generally give a better approximation.

Separation of variables

  1. Rewrite dydx=g(x)⋅h(y)\frac{dy}{dx} = g(x) \cdot h(y) with every yy on one side and every xx on the other: 1h(y) dy=g(x) dx\frac{1}{h(y)}\,dy = g(x)\,dx.
  2. Integrate both sides. Write +C+ C on one side at this step.
  3. If there is an initial condition, substitute it now to find CC.
  4. Solve for yy if the problem asks for yy as a function of xx. Choose the sign or branch that matches the initial condition.
Differential equationSeparated formGeneral solution
dydx=ky\frac{dy}{dx} = ky1y dy=k dx\frac{1}{y}\,dy = k\,dxy=Cekxy = Ce^{kx}
dydx=k(y−A)\frac{dy}{dx} = k(y - A)1y−A dy=k dx\frac{1}{y - A}\,dy = k\,dxy=A+Cekxy = A + Ce^{kx}
dydx=xy\frac{dy}{dx} = xy1y dy=x dx\frac{1}{y}\,dy = x\,dxy=Cex2/2y = Ce^{x^2/2}
dydx=yx\frac{dy}{dx} = \frac{y}{x}1y dy=1x dx\frac{1}{y}\,dy = \frac{1}{x}\,dxy=Cxy = Cx
dydx=xy\frac{dy}{dx} = \frac{x}{y}y dy=x dxy\,dy = x\,dxy2−x2=Cy^2 - x^2 = C
dydx=−xy\frac{dy}{dx} = -\frac{x}{y}y dy=−x dxy\,dy = -x\,dxx2+y2=Cx^2 + y^2 = C
dydx=y2\frac{dy}{dx} = y^21y2 dy=dx\frac{1}{y^2}\,dy = dxy=−1x+Cy = -\frac{1}{x + C}, and also y=0y = 0
  • The constant belongs at the integration step. Adding CC after solving for yy gives a wrong family: y=ekx+Cy = e^{kx} + C does not solve dydx=ky\frac{dy}{dx} = ky.
  • ∫1y dy=ln⁡∣y∣\int \frac{1}{y}\,dy = \ln|y|. The initial condition decides whether yy is positive or negative on the solution.
  • Dividing by h(y)h(y) assumes h(y)≠0h(y) \neq 0. Constant solutions where h(y)=0h(y) = 0 must be checked separately.
  • A particular solution is defined on the largest interval containing the initial xx-value on which the solution is differentiable and satisfies the equation.

Worked solutions are in separable differential equations.

Exponential and logistic models

Exponential model (Topic 7.8)Formula
Differential equationdydt=ky\frac{dy}{dt} = ky
Solution with y(0)=y0y(0) = y_0y=y0ekty = y_0 e^{kt}
Growth or decayGrowth when k>0k > 0, decay when k<0k < 0
Doubling time (k>0k > 0)ln⁡2k\frac{\ln 2}{k}
Half-life (k<0k < 0)ln⁡2∣k∣\frac{\ln 2}{|k|}
Logistic model, BC (Topic 7.9)Formula or fact
Differential equationdPdt=kP(1−PL)\frac{dP}{dt} = kP\left(1 - \frac{P}{L}\right) with k>0k > 0 and L>0L > 0
Carrying capacitylim⁡t→∞P(t)=L\lim_{t \to \infty} P(t) = L for any P(0)>0P(0) > 0
Constant solutionsP=0P = 0 and P=LP = L
DirectionPP increases when 0<P<L0 < P < L and decreases when P>LP > L
Fastest growthAt P=L2P = \frac{L}{2}, where the rate is kL4\frac{kL}{4}
Inflection pointThe graph of PP has an inflection point where P=L2P = \frac{L}{2}, when 0<P(0)<L20 < P(0) < \frac{L}{2}
Solution with P(0)=P0P(0) = P_0P=L1+Ae−ktP = \frac{L}{1 + Ae^{-kt}} with A=L−P0P0A = \frac{L - P_0}{P_0}
Alternate formdPdt=cP(L−P)\frac{dP}{dt} = cP(L - P) is the same model with k=cLk = cL

Most logistic questions can be answered from the differential equation without solving it. Put the equation in the form above and read off LL. See exponential growth and decay and logistic growth.

Worked examples

Worked example

A particular solution by separation

Solve dydx=xy2\frac{dy}{dx} = xy^2 with y(0)=1y(0) = 1.

  1. Separate: 1y2 dy=x dx\frac{1}{y^2}\,dy = x\,dx.
  2. Integrate both sides: −1y=x22+C-\frac{1}{y} = \frac{x^2}{2} + C.
  3. Apply the initial condition x=0x = 0, y=1y = 1: −1=0+C-1 = 0 + C, so C=−1C = -1.
  4. Solve for yy: −1y=x22−1=x2−22-\frac{1}{y} = \frac{x^2}{2} - 1 = \frac{x^2 - 2}{2}, so y=22−x2y = \frac{2}{2 - x^2}.
  5. Check: dydx=4x(2−x2)2\frac{dy}{dx} = \frac{4x}{(2 - x^2)^2} and xy2=x⋅4(2−x2)2xy^2 = x \cdot \frac{4}{(2 - x^2)^2}, which agree. Also y(0)=1y(0) = 1.

y=22−x2y = \frac{2}{2 - x^2}, valid for −2<x<2-\sqrt{2} < x < \sqrt{2}, the interval around x=0x = 0 where the solution is defined.

Worked example

Euler's method with two steps

Let yy be the solution of dydx=x+y\frac{dy}{dx} = x + y with y(0)=1y(0) = 1. Use Euler's method with two steps of equal size to approximate y(1)y(1).

  1. Step size: Δx=1−02=0.5\Delta x = \frac{1 - 0}{2} = 0.5. Start at (0,1)(0, 1).
  2. First step: the slope at (0,1)(0, 1) is 0+1=10 + 1 = 1. New yy-value: 1+1⋅0.5=1.51 + 1 \cdot 0.5 = 1.5. The new point is (0.5,1.5)(0.5, 1.5).
  3. Second step: the slope at (0.5,1.5)(0.5, 1.5) is 0.5+1.5=20.5 + 1.5 = 2. New yy-value: 1.5+2⋅0.5=2.51.5 + 2 \cdot 0.5 = 2.5. The new point is (1,2.5)(1, 2.5).
  4. Compare: the exact solution is y=2ex−x−1y = 2e^x - x - 1, so y(1)=2e−2≈3.437y(1) = 2e - 2 \approx 3.437. The approximation is below the exact value.

y(1)≈2.5y(1) \approx 2.5

Worked example

Reading a logistic equation

A population satisfies dPdt=0.4P(1−P500)\frac{dP}{dt} = 0.4P\left(1 - \frac{P}{500}\right) with P(0)=100P(0) = 100. Find lim⁡t→∞P(t)\lim_{t \to \infty} P(t), the population at which it grows fastest, the growth rate at that moment, and the time when that happens.

  1. Match the form dPdt=kP(1−PL)\frac{dP}{dt} = kP\left(1 - \frac{P}{L}\right): k=0.4k = 0.4 and L=500L = 500.
  2. Carrying capacity: since P(0)=100>0P(0) = 100 > 0, lim⁡t→∞P(t)=500\lim_{t \to \infty} P(t) = 500.
  3. Fastest growth occurs at P=L2=250P = \frac{L}{2} = 250. The rate there is 0.4⋅250⋅(1−250500)=500.4 \cdot 250 \cdot \left(1 - \frac{250}{500}\right) = 50.
  4. Solution: A=500−100100=4A = \frac{500 - 100}{100} = 4, so P=5001+4e−0.4tP = \frac{500}{1 + 4e^{-0.4t}}.
  5. Set P=250P = 250: 1+4e−0.4t=21 + 4e^{-0.4t} = 2, so e−0.4t=14e^{-0.4t} = \frac{1}{4} and t=ln⁡40.4≈3.466t = \frac{\ln 4}{0.4} \approx 3.466.

The limit is 500500. Growth is fastest when P=250P = 250, at a rate of 5050 per unit time, which occurs at t=ln⁡40.4≈3.47t = \frac{\ln 4}{0.4} \approx 3.47.

Frequently asked questions

Where does the constant of integration go when separating variables?

Add it immediately after integrating, on one side of the equation, before solving for yy. If you wait until after exponentiating or taking a root, the constant ends up in the wrong place. For dydx=ky\frac{dy}{dx} = ky, integrating gives ln⁡∣y∣=kx+C\ln|y| = kx + C, which becomes y=Cekxy = Ce^{kx} with a new constant as a multiplier.

How do I find the carrying capacity of a logistic differential equation?

Set dPdt=0\frac{dP}{dt} = 0 and solve. A logistic equation has two constant solutions, P=0P = 0 and P=LP = L. The positive one, LL, is the carrying capacity. For dPdt=0.4P(1−P500)\frac{dP}{dt} = 0.4P\left(1 - \frac{P}{500}\right) the carrying capacity is 500500, and the population grows fastest at half of that, 250250.

Is Euler's method part of AP Calculus AB?

Euler's method is Topic 7.5, which is a BC only topic, as is the logistic model in Topic 7.9. Slope fields, separation of variables, and exponential models are on both AB and BC.