Differential Equations

Study Sheet

Differential Equations

Everything you need for AP Calculus BC, Topic 9

Verifying Solutions & Modeling

Concept
What a differential equation is

A differential equation (DE) is an equation involving an unknown function and its derivatives, such as dydx=2y\dfrac{dy}{dx}=2y or dPdt=kP\dfrac{dP}{dt}=kP. A solution is a function y=f(x)y=f(x) that makes the equation true when substituted in. The general solution contains an arbitrary constant CC (a whole family of curves); a particular solution is pinned down by an initial condition like y(0)=3y(0)=3.

A differential equation relates a function to its derivatives; solving it means finding the function. Separable equations are solved by integrating each side; slope fields show the solutions without solving; exponential growth and decay, Newton's cooling, and logistic growth are the standard models. An initial condition selects one solution from the family.

To verify a proposed solution, differentiate it and substitute both yy and its derivative into the DE; check that the two sides are identical.

Example
Verifying a solution

Show y=3e2xy=3e^{2x} solves dydx=2y\dfrac{dy}{dx}=2y with y(0)=3y(0)=3.

dydx=3⋅2e2x=6e2x,2y=2⋅3e2x=6e2x.\frac{dy}{dx}=3\cdot 2e^{2x}=6e^{2x},\qquad 2y=2\cdot 3e^{2x}=6e^{2x}.

The two sides agree, and y(0)=3e0=3y(0)=3e^{0}=3. ✓\checkmark

Side note
Where it goes wrong

Losing the constant of integration and then being unable to fit the initial condition, or applying the condition before solving for yy when CC appears inside a log or exponential.

Modeling. Translate “rate of change” language directly into a derivative. “The rate of change of PP is proportional to PP” becomes dPdt=kP\dfrac{dP}{dt}=kP. “The temperature changes at a rate proportional to the difference from the room temperature 70∘70^\circ” becomes dTdt=−k(T−70)\dfrac{dT}{dt}=-k(T-70).

Tip

Tip: The order of a DE is the highest derivative it contains. The number of arbitrary constants in the general solution equals the order (first order ⇒\Rightarrow one constant CC).

Try it
Quick check

Verify that y=e2xy=e^{2x} is a solution of dydx=2y\dfrac{dy}{dx}=2y.

Work it on paper before revealing the answer.

Show the answer

Answer: y′=2e2xy'=2e^{2x} and 2y=2e2x2y=2e^{2x}; equal, so it is a solution.

Slope Fields

Concept
Reading a slope field

A first-order DE dydx=F(x,y)\dfrac{dy}{dx}=F(x,y) gives the slope of the solution curve at every point. A slope field draws a short segment with that slope at a grid of points. To sketch a solution through a given point, start there and “flow” along the segments, always keeping the curve tangent to the nearby marks.

A differential equation does not name a curve; it names a slope at every point. Drawing those slopes as short segments shows the whole family of solutions at once, and a solution through a given point is found by following the segments, never crossing them. That is also the geometric content of Euler's method.

Slope field for dydx=x\dfrac{dy}{dx}=x with the solution through (0,−1)(0,-1), namely y=12x2−1y=\tfrac12 x^2-1. Segments are horizontal along the yy-axis (where x=0x=0) and steepen as ∣x∣|x| grows.

Matching a slope field to a DE. Check special features:

  • Where are the segments horizontal? Set F(x,y)=0F(x,y)=0.
  • Does the slope depend on xx only, yy only, or both? (If segments in a row look identical, the slope depends on xx only.)
  • Is the slope positive or negative in each region?

Slope field for dydx=y\dfrac{dy}{dx}=y with the solution y=exy=e^{x} through (0,1)(0,1). Now segments are horizontal along the xx-axis (where y=0y=0) and depend only on yy.

Tip

Tip: Equilibrium (constant) solutions appear as horizontal rows of flat segments. For dydx=y\dfrac{dy}{dx}=y the line y=0y=0 is an equilibrium.

Try it
Quick check

For dydx=x−y\dfrac{dy}{dx}=x-y, find the slope at (2,1)(2,1) and describe where the segments are horizontal.

Show the answer

Answer: slope 11; horizontal along the line y=xy=x. F(2,1)=2−1=1F(2,1)=2-1=1. The slope is 00 exactly where x−y=0x-y=0.

Separable Differential Equations & IVPs

Concept
The separation method

A DE is separable if it can be written dydx=g(x) h(y)\dfrac{dy}{dx}=g(x)\,h(y). Separate the variables so each side involves only one letter, then integrate:

1h(y) dy=g(x) dx⟹∫1h(y) dy=∫g(x) dx.\frac{1}{h(y)}\,dy=g(x)\,dx \quad\Longrightarrow\quad \int\frac{1}{h(y)}\,dy=\int g(x)\,dx.

Add a single constant +C+C, then apply the initial condition to solve for CC (an initial-value problem, IVP).

Separating works because 1g(y)dydx=f(x)\dfrac{1}{g(y)}\dfrac{dy}{dx}=f(x) is, by the chain rule, the derivative of G(y(x))G(y(x)) where G′=1gG'=\dfrac1g. Integrating both sides with respect to xx gives G(y)=F(x)+CG(y)=F(x)+C. Writing dyg(y)=f(x) dx\dfrac{dy}{g(y)}=f(x)\,dx is shorthand for that argument.

Example
A full separable IVP

Solve dydx=xy\dfrac{dy}{dx}=xy with y(0)=3y(0)=3.

1y dy=x dx  ⟹  ∫1y dy=∫x dx  ⟹  ln⁡∣y∣=x22+C.\frac{1}{y}\,dy = x\,dx \;\Longrightarrow\; \int\frac{1}{y}\,dy=\int x\,dx \;\Longrightarrow\; \ln|y|=\frac{x^2}{2}+C.

Exponentiate: y=Aex2/2y=Ae^{x^2/2} where A=±eCA=\pm e^{C}. Apply y(0)=3y(0)=3: 3=Ae0=A3=Ae^{0}=A. Therefore

 y=3ex2/2 .\boxed{\,y=3e^{x^2/2}\,}.

Check: y′=3ex2/2⋅x=x⋅yy'=3e^{x^2/2}\cdot x = x\cdot y. ✓\checkmark

Tip

Tip: Apply the initial condition as early as reasonable, and keep exact forms (ln⁡\ln, ee, fractions). Fold ±eC\pm e^{C} into a single constant AA once integration is done.

Try it
Quick check

Solve dydx=2xy\dfrac{dy}{dx}=\dfrac{2x}{y} with y(0)=2y(0)=2.

Show the answer

Answer: y=2x2+4y=\sqrt{2x^2+4}. Separate: y dy=2x dxy\,dy=2x\,dx, so 12y2=x2+C\tfrac12y^2=x^2+C. At (0,2)(0,2): 2=C2=C. Then y2=2x2+4y^2=2x^2+4, and the positive root matches y(0)=2y(0)=2.

Exponential Growth & Decay

Concept
The growth/decay law

The single most important DE in the course is

dydt=ky⟹y=y0 ekt,\frac{dy}{dt}=ky \quad\Longrightarrow\quad y=y_0\,e^{kt},

where y0=y(0)y_0=y(0) is the initial amount. k>0k>0 gives growth; k<0k<0 gives decay.

Example
Half-life ⇒\Rightarrow find kk

A radioactive sample has a half-life of 55 years. Find kk, then the fraction left after 1212 years.

12y0=y0e5k  ⟹  e5k=12  ⟹  k=ln⁡125=−ln⁡25≈−0.1386.\tfrac12 y_0 = y_0 e^{5k}\;\Longrightarrow\; e^{5k}=\tfrac12 \;\Longrightarrow\; k=\frac{\ln\frac12}{5}=-\frac{\ln 2}{5}\approx-0.1386.

After 1212 yr: y(12)y0=e12k=e−12ln⁡2/5=2−12/5≈0.189\dfrac{y(12)}{y_0}=e^{12k}=e^{-12\ln2/5}=2^{-12/5}\approx 0.189, about 18.9%18.9\%.

Example
Newton's Law of Cooling

dTdt=−k(T−Ts)\dfrac{dT}{dt}=-k(T-T_s) (with surroundings TsT_s) is separable. Let u=T−Tsu=T-T_s, so dudt=−ku\dfrac{du}{dt}=-ku and u=u0e−ktu=u_0 e^{-kt}. Therefore

T(t)=Ts+(T0−Ts) e−kt.T(t)=T_s+(T_0-T_s)\,e^{-kt}.

A 200∘200^\circ cup in a 70∘70^\circ room: T(t)=70+130 e−ktT(t)=70+130\,e^{-kt}, cooling toward 70∘70^\circ as t→∞t\to\infty.

Tip

Tip: “Doubling time” and “half-life” both give kk via 2=ekTd2=e^{kT_d} or 12=ekTh\tfrac12=e^{kT_h}, so k=ln⁡2Tdk=\dfrac{\ln 2}{T_d} or k=−ln⁡2Thk=-\dfrac{\ln 2}{T_h}.

Try it
Quick check

A bacteria population doubles every 33 hours. How long does it take to triple?

Show the answer

Answer: about 4.754.75 hours. P=P0ektP=P_0e^{kt} with e3k=2e^{3k}=2, so k=ln⁡23k=\tfrac{\ln2}{3}. Tripling needs ekt=3e^{kt}=3: t=ln⁡3k=3ln⁡3ln⁡2≈4.755t=\dfrac{\ln3}{k}=\dfrac{3\ln3}{\ln2}\approx4.755.

Logistic Growth (BC)

Exponential growth assumes unlimited resources. The logistic model dPdt=kP(1−PM)\dfrac{dP}{dt}=kP\left(1-\dfrac{P}{M}\right) keeps the growth rate proportional to PP when PP is small but multiplies it by 1−PM1-\tfrac PM, a brake that approaches 00 as PP nears the carrying capacity MM.

Concept
The logistic model

When growth is limited by a carrying capacity MM, use

dPdt=kP ⁣(1−PM).\frac{dP}{dt}=kP\!\left(1-\frac{P}{M}\right).

When PP is small, 1−PM≈11-\frac{P}{M}\approx1, so growth is nearly exponential; as P→MP\to M the factor →0\to0 and growth stalls.

Example
The logistic facts to memorize

For dPdt=kP ⁣(1−PM)\dfrac{dP}{dt}=kP\!\left(1-\frac{P}{M}\right):

  • Equilibria: P=0P=0 and P=MP=M (where dPdt=0\frac{dP}{dt}=0).
  • Long-run: lim⁡t→∞P(t)=M\displaystyle\lim_{t\to\infty}P(t)=M for any P0P_0 with 0<P0<M0<P_0<M.
  • Fastest growth (inflection point of PP) occurs at P=M2P=\dfrac{M}{2}, where the rate equals kM4\dfrac{kM}{4}.
  • Solution: P(t)=M1+Ae−kt\displaystyle P(t)=\frac{M}{1+Ae^{-kt}}, with A=M−P0P0A=\dfrac{M-P_0}{P_0}.

Logistic slope field (M=4M=4) with the S-shaped solution through (0,1)(0,1). Segments are flat along P=0P=0 and P=MP=M; the curve is steepest as it crosses P=M/2P=M/2.

Tip

Tip: The graph of P(t)P(t) is concave up below M/2M/2 and concave down above it, so the maximum rate of change is exactly at the halfway population P=M/2P=M/2.

Try it
Quick check

For dPdt=0.3P(1−P500)\dfrac{dP}{dt}=0.3P\left(1-\dfrac{P}{500}\right), give the carrying capacity, the population at which growth is fastest, and that fastest rate.

Show the answer

Answer: 500500; 250250; 37.537.5 per unit time. The growth rate 0.3P(1−P500)0.3P(1-\tfrac P{500}) is a downward parabola in PP, largest halfway between its zeros 00 and 500500. At P=250P=250: 0.3⋅250⋅12=37.50.3\cdot250\cdot\tfrac12=37.5.

Euler's Method (BC)

Euler's method replaces the unknown solution curve with short tangent segments: from a known point, follow the slope the equation gives for one step of width hh, then re-aim.

Concept
Following the tangent line in steps

When a DE cannot be solved in closed form, approximate the solution numerically. Starting from (x0,y0)(x_0,y_0) with step size hh, repeatedly follow the tangent line:

xn+1=xn+h,yn+1=yn+h⋅F(xn,yn).x_{n+1}=x_n+h,\qquad y_{n+1}=y_n+h\cdot F(x_n,y_n).

Each step uses the slope FF at the current point to predict the next yy.

Example
A full Euler's method table

Approximate y(0.6)y(0.6) for dydx=x+y\dfrac{dy}{dx}=x+y, y(0)=1y(0)=1, using h=0.2h=0.2.

nxnynF=xn+ynyn+1=yn+h F00.01.0001.0001+0.2(1.000)=1.20010.21.2001.4001.2+0.2(1.400)=1.48020.41.4801.8801.48+0.2(1.880)=1.85630.61.856\begin{array}{c|c|c|c|c} n & x_n & y_n & F=x_n+y_n & y_{n+1}=y_n+h\,F\\\hline 0 & 0.0 & 1.000 & 1.000 & 1+0.2(1.000)=1.200\\ 1 & 0.2 & 1.200 & 1.400 & 1.2+0.2(1.400)=1.480\\ 2 & 0.4 & 1.480 & 1.880 & 1.48+0.2(1.880)=1.856\\ 3 & 0.6 & 1.856 & & \end{array}

So y(0.6)≈1.856y(0.6)\approx\boxed{1.856}. (The exact solution gives y(0.6)≈1.9436y(0.6)\approx1.9436; Euler underestimates here because the curve is concave up.)

Tip

Tip: If the solution is concave up, Euler's tangent lines lie below the curve, so the estimate is too small; if concave down, the estimate is too large. Smaller hh means smaller error.

Try it
Quick check

Use Euler's method with h=0.5h=0.5 and two steps to approximate y(1)y(1) for dydx=2x\dfrac{dy}{dx}=2x, y(0)=1y(0)=1. Compare with the exact value.

Show the answer

Answer: y(1)≈1.5y(1)\approx1.5; exact 22. Step 1: slope 2(0)=02(0)=0, so y(0.5)≈1y(0.5)\approx1. Step 2: slope 2(0.5)=12(0.5)=1, so y(1)≈1+0.5(1)=1.5y(1)\approx1+0.5(1)=1.5. The exact solution y=x2+1y=x^2+1 gives 22; the curve is concave up, so the tangent steps undershoot.

Going Deeper: Advanced Differential Equations

Concept
Mixing (tank) problems

Let y(t)y(t) be the amount of a substance in a tank. Then

dydt=(rate in)−(rate out),\frac{dy}{dt}=(\text{rate in})-(\text{rate out}),

where each rate is (concentration)×\times(flow). If the tank is well-mixed, the outflow concentration is yV\dfrac{y}{V} (current amount over current volume).

Example
A mixing problem worked out

A tank holds 100100 L with 55 kg of dissolved salt. Brine at 0.20.2 kg/L enters at 33 L/min; the mixture leaves at 33 L/min (volume stays 100100 L).

dydt=(0.2)(3)⏟in−y100(3)⏟out=0.6−0.03y=−0.03 (y−20).\frac{dy}{dt}=\underbrace{(0.2)(3)}_{\text{in}}-\underbrace{\frac{y}{100}(3)}_{\text{out}}=0.6-0.03y=-0.03\,(y-20).

This is separable with solution y=20+(5−20)e−0.03t=20−15e−0.03ty=20+(5-20)e^{-0.03t}=20-15e^{-0.03t}. As t→∞t\to\infty, y→20y\to20 kg (steady state, where inflow salt balances outflow).

Concept
Why the logistic curve is S-shaped (qualitative)

Differentiate dPdt=kP ⁣(1−PM)\dfrac{dP}{dt}=kP\!\left(1-\frac{P}{M}\right) with respect to tt to study d2Pdt2\dfrac{d^2P}{dt^2}. It is positive for 0<P<M20<P<\frac M2 (curve concave up, growth accelerating) and negative for M2<P<M\frac M2<P<M (concave down, growth decelerating). The sign change at P=M2P=\frac M2 is the inflection point — the moment of fastest growth — which is why the graph rises, bends, and levels off toward MM.

Concept
Euler's method error

Euler's method is first order: the accumulated (global) error is roughly proportional to the step size hh. Halving hh roughly halves the error but doubles the number of steps. The local error each step comes from ignoring curvature (y′′y''), so more curvature means faster error growth. This is why the concavity of the true solution tells you the direction of the error.

Concept
Direction-field analysis of equilibria

An equilibrium solution satisfies F(x,y)=0F(x,y)=0 (a constant solution). Classify it from the sign of dydx\dfrac{dy}{dx} nearby:

  • Stable (a sink): solutions on both sides move toward it. For logistic growth, P=MP=M is stable.
  • Unstable (a source): nearby solutions move away. For logistic growth, P=0P=0 is unstable.

A phase line records these arrows and predicts long-term behavior without solving the DE.

Example
Reading a phase line
y = 1 (stable)y = 4 (unstable)dy/dt < 0> 0> 0
Arrows point toward y=1y=1 from both sides and away from y=4y=4.

For dydt=(y−1)(y−4)\dfrac{dy}{dt}=(y-1)(y-4), equilibria are y=1y=1 and y=4y=4. Testing signs: dydt>0\frac{dy}{dt}>0 for y<1y<1, <0<0 for 1<y<41<y<4, >0>0 for y>4y>4. So y=1y=1 is stable (arrows point in) and y=4y=4 is unstable (arrows point out). A solution starting at y(0)=2y(0)=2 decreases toward 11.

Concept
Second-order preview

Higher-order DEs involve y′′y''. For example, y′′=−ω2yy''=-\omega^2 y models simple harmonic motion, with general solution

y=Acos⁡(ωt)+Bsin⁡(ωt).y=A\cos(\omega t)+B\sin(\omega t).

Two arbitrary constants A,BA,B appear because the equation is second order; two conditions (e.g. y(0)y(0) and y′(0)y'(0)) pin down a particular solution. You will meet these systematically in a later course.

Tip

Big picture: Every method answers “how does yy change?” Verify by substituting; visualize with a slope field; solve exactly by separating; model growth with y0ekty_0e^{kt}, bounded growth with the logistic law; and when no formula exists, approximate with Euler's method — always checking concavity to know which way the estimate leans.

Try it
Quick check

Find and classify the equilibria of dydt=y(3−y)\dfrac{dy}{dt}=y(3-y).

Show the answer

Answer: y=0y=0 is unstable, y=3y=3 is stable. The right side is positive for 0<y<30<y<3 and negative outside [0,3][0,3], so solutions move away from 00 and toward 33.

Why It Works

Why y′=kyy' = ky forces y=Cekty = Ce^{kt}: if yy is any solution, ddt(ye−kt)=y′e−kt−kye−kt=(y′−ky)e−kt=0\tfrac{d}{dt}(ye^{-kt}) = y'e^{-kt} - kye^{-kt} = (y' - ky)e^{-kt} = 0, so ye−ktye^{-kt} is constant. No other solutions can exist. The logistic equation y′=ky(1−y/M)y' = ky(1 - y/M) slows the growth as yy nears the carrying capacity MM, which is why its solutions are S-shaped: nearly exponential at first, then leveling off.

Tip
Reading a proof

Do not read a proof the way you read a rule. Cover the last line, ask what the previous line forces, and only then uncover it. If a step feels like magic, that is the step to work by hand with a concrete number.

Formulas, Proofs & Tips

Tip
Separable differential equations
dydx=g(x)h(y) ⟹ ∫dyh(y)=∫g(x) dx\frac{dy}{dx}=g(x)h(y) \ \Longrightarrow\ \int\frac{dy}{h(y)}=\int g(x)\,dx

What it means. Get all the yy's on one side and all the xx's on the other, then integrate both sides.

Example. dydx=xy\tfrac{dy}{dx}=xy: ∫dyy=∫x dx⇒ln⁡∣y∣=x22+C\int\tfrac{dy}{y}=\int x\,dx\Rightarrow \ln|y|=\tfrac{x^2}{2}+C.

Why it works. Dividing by h(y)h(y) and multiplying by dxdx separates the variables; integrating both sides is valid because each side is the derivative of the same quantity with respect to xx (a chain-rule substitution in reverse).

Tip. Apply the initial condition to find CC before simplifying — it is usually much less algebra.