Differential Equations: cram pack

Formula sheets, the key method steps for every topic and 8 practice problems, with full solutions at the back.

New problemsBack to the course

In the print window, choose “Save as PDF” to keep a copy on your device.

1Formulas and methods

Differential equations

Exponential growth/decay
dy/dt = ky → y = y0ekt
Half-life
k = ln 2 / t½
Newton's law of cooling
T(t) = Ta + (T0 − Ta)e−kt
Integrating factor
y′ + p(x)y = q(x): μ = e∫p dx, (μy)′ = μq
Mixing tank
dm/dt = r·c − (r/V)·m

Integrals

Power rule
∫xⁿ dx = xⁿ⁺¹/(n + 1) + C
Definite integral
∫ab f dx = F(b) − F(a)
Common integrals
∫eˣ dx = eˣ, ∫1/x dx = ln|x|, ∫sin x dx = −cos x
Area between curves
∫ab (f − g) dx

Method

  1. Rewrite the integrand as a sum of simple terms where possible.
  2. Apply the power rule: ∫xⁿ dx = xⁿ⁺¹/(n + 1), and standard integrals for ex, 1/x, sin and cos.
  3. Use substitution when you see a function and its derivative together.
  4. For a definite integral, evaluate F(b) − F(a).

Derivatives

Power rule
(xⁿ)′ = n·xⁿ⁻¹
Product rule
(uv)′ = u′v + uv′
Quotient rule
(u/v)′ = (u′v − uv′)/v²
Chain rule
f(g(x))′ = f′(g(x))·g′(x)
Common derivatives
(eˣ)′ = eˣ, (ln x)′ = 1/x, (sin x)′ = cos x, (cos x)′ = −sin x

Method

  1. Identify the structure: sum, product, quotient or composition.
  2. Apply the power rule to each power of x.
  3. Use the product, quotient or chain rule where needed.
  4. Simplify, and evaluate at the point if asked.

Numerical methods

Bisection
c = (a + b)/2, width after n steps (b − a)/2ⁿ
Newton–Raphson
xn+1 = xₙ − f(xₙ)/f′(xₙ)
Linear interpolation
y = y₁ + (y₂ − y₁)(x − x₁)/(x₂ − x₁)
Trapezoid rule
T = (h/2)[f₀ + 2f₁ + … + 2fn−1 + fₙ], h = (b − a)/n
Simpson’s rule (n even)
S = (h/3)[f₀ + 4f₁ + 2f₂ + … + 4fn−1 + fₙ]
Trapezoid error bound
|E| ≤ (b − a)h²M/12, M = max|f″|
Euler
yn+1 = yₙ + h·f(tₙ, yₙ)
Heun
yn+1 = yₙ + (h/2)(k₁ + k₂), k₂ = f(tₙ + h, yₙ + hk₁)
RK4
yn+1 = yₙ + (h/6)(k₁ + 2k₂ + 2k₃ + k₄)

Method

  1. For a root: check the sign change for bisection, or compute f and f′ for Newton, and keep six or more digits in a table of iterates.
  2. For a table value: interpolate linearly between the two neighbouring points.
  3. For an integral: find h = (b − a)/n, list f at every node, apply the weights (1, 2, …, 2, 1 for trapezoid; 1, 4, 2, …, 4, 1 for Simpson with even n) and multiply by h/2 or h/3.
  4. For an ODE: step from t₀ with yₙ₊₁ = yₙ + h·f(tₙ, yₙ) (Euler) or the averaged slope (Heun), one row per step, until you reach the requested t.

2Practice problems

1.Differential equationsMedium
tyy(0) = 5y(1.5) = ?

Solve y″ + 7y′ + 12y = 0 with y(0) = 5 and y′(0) = -4. Find y(1.5).

y″ + 7y′ + 12y = 0y(0) = 5y′(0) = -4
y(1.5) =
2.Differential equationsHard
ty1.5y(1.5) = ?

Solve y′ + 3y = 5e−0.5t with y(0) = 3. Find y(1.5).

y′ + 3y = 5e−0.5ty(0) = 3
y(1.5) =
3.IntegralsMedium
xy03

Evaluate I = ∫03 e−0.5x dx.

f(x) = e−0.5x[0, 3]
I =
4.IntegralsHard
xy1.5y = x²eˣ

Evaluate I = ∫₀1.5 x²·eˣ dx.

∫₀1.5 x²eˣ dx
I =
5.DerivativesMedium
xyx = 1

Let f(x) = x·sin(x), with x in radians. Find f′(1).

f(x) = x·sin(x)x = 1 rad
f′(1) =
6.DerivativesHard
xy

Let f(x) = x3 − 3x2 − 9x. Find the x-coordinate x of the local minimum.

f(x) = x3 − 3x2 − 9x
x =
7.Numerical methodsMedium

The trapezoid rule is used for ∫01 eˣ dx. The error is at most (b − a)³·M/(12n²) with M = max|f″| on [0, 1]. Find the smallest number of strips n that guarantees an error below 1 × 10⁻⁵.

f(x) = eˣ[a, b] = [0, 1]ε = 1 × 10⁻⁵
n =
8.Numerical methodsHard
00.511.52012ty(0, 2)

Solve y′ = −2ty, y(0) = 2 with Euler's method and step h = 0.5 up to t = 2. The exact solution is y = y₀e−t². Find the global error |E| = |y(2) − y4|.

y′ = −2tyy(0) = 2h = 0.5
|E| =

3Solutions

1.Differential equations

Answer: y(1.5) = 0.1505

Second-order linear equations: for y″ + b·y′ + c·y = 0 try y = ert: this gives the characteristic equation r² + b·r + c = 0. Two real roots r₁ ≠ r₂ give y = A·er₁t + B·er₂t (overdamped); a double root r gives y = (A + Bt)·ert (critically damped); complex roots −α ± jω give y = e−αt(A cos ωt + B sin ωt) (underdamped, oscillating). The initial values y(0) and y′(0) fix A and B. Written as y″ + 2ζωny′ + ωn²y = 0, ωn is the natural frequency and ζ the damping ratio: ζ < 1 oscillates. With a constant input, y″ + by′ + cy = c·K, the solution is the steady value K plus the free response.

Characteristic roots

(r + 3)(r + 4) = 0 → r = −3, −4

Constants from the initial values

A + B = 5, −3A − 4B = -4
A = 16, B = −11

Evaluate

y(1.5) = 16·e−4.5 + (−11)·e−6 = 0.1505

Answer

y(1.5) = 0.1505
2.Differential equations

Answer: y(1.5) = 0.9558

First-order differential equations: dy/dt = k·y has the solution y = y₀·ekt (growth for k > 0, decay for k < 0); a half-life T gives k = ln 2/T. Newton's law of cooling, dT/dt = −k·(T − Tₐ), gives T(t) = Tₐ + (T₀ − Tₐ)·e−kt. A linear equation y′ + p(x)·y = q(x) is solved with the integrating factor μ = e∫p dx: (μy)′ = μq, so μy = ∫μq dx + C.

Integrating factor

μ = e3t
(e3ty)′ = 5e2.5t

General solution

y = 5/2.5·e−0.5t + C·e−3t = 2·e−0.5t + C·e−3t

Initial condition

3 = 2 + C → C = 1

Evaluate

y(1.5) = 2·0.4724 + 1·0.01111 = 0.9558

Answer

y(1.5) = 0.9558
3.Integrals

Answer: I = 1.554

Definite integrals: ∫ₐᵇ f(x) dx is the signed area between the graph and the x-axis from a to b. Find an antiderivative F (with F′ = f) and evaluate F(b) − F(a). Power rule: ∫xⁿ dx = xⁿ⁺¹/(n + 1). The area between two curves is ∫(upper − lower) dx.

Antiderivative

F(x) = e−0.5x/(−0.5)

Evaluate at the limits

I = (e−1.5 − 1)/(−0.5) = (0.2231 − 1)/(−0.5) = 1.554

Answer

I = 1.554
4.Integrals

Answer: I = 3.602

Integration by parts: ∫u·dv = u·v − ∫v·du, from the product rule. Choose u as the factor that gets simpler when you differentiate it (a power of x, or ln x), and dv as the factor you can integrate (eˣ, sin x, cos x, or x when u = ln x). For a definite integral, evaluate u·v at both limits: ∫ₐᵇ u dv = [u·v]ₐᵇ − ∫ₐᵇ v du. A factor x² needs two rounds.

First round

∫x²eˣ dx = x²eˣ − ∫2x eˣ dx

Second round

∫2x eˣ dx = 2x eˣ − 2eˣ
∫x²eˣ dx = eˣ(x² − 2x + 2)

Limits

4.482·(1.25) − 1·2 = 3.602

Answer

I = 3.602
5.Derivatives

Answer: f′(1) = 1.382

Differentiation: the derivative f′(x) is the slope of the graph at x. Power rule: (xⁿ)′ = n·xⁿ⁻¹. Product rule: (uv)′ = u′v + uv′. Chain rule: (f(g(x)))′ = f′(g(x))·g′(x). Where f′(x) = 0 the graph has a horizontal tangent: a maximum, minimum or saddle point.

Product and chain rule

f′(x) = sin(x) + x·cos(x)

Substitute

f′(1) = 0.8415 + 1·0.5403 = 1.382

Answer

f′(1) = 1.382
6.Derivatives

Answer: x = 3

Differentiation: the derivative f′(x) is the slope of the graph at x. Power rule: (xⁿ)′ = n·xⁿ⁻¹. Product rule: (uv)′ = u′v + uv′. Chain rule: (f(g(x)))′ = f′(g(x))·g′(x). Where f′(x) = 0 the graph has a horizontal tangent: a maximum, minimum or saddle point.

Derivative

f′(x) = 3x2 − 6x − 9 = 3·(x2 − 2x − 3)

Solve f′(x) = 0

x = −1 or x = 3

Which one is which

f″(x) = 6x − 6: negative at a maximum, positive at a minimum.

f″(−1) = −12, f″(3) = 12
x = 3

Answer

x = 3
7.Numerical methods

Answer: n = 151

Numerical integration: split [a, b] into n strips of width h = (b − a)/n with nodes x₀ … xₙ. Trapezoid rule: T = (h/2)[f₀ + 2f₁ + 2f₂ + … + 2fn−1 + fₙ]. Simpson's rule (n even): S = (h/3)[f₀ + 4f₁ + 2f₂ + 4f₃ + … + 4fn−1 + fₙ]. The trapezoid error shrinks like h² (bound (b − a)h²·M/12 with M = max|f″|), Simpson's like h⁴, so Simpson is usually far more accurate for the same nodes.

Second derivative bound

M = e1 = 2.718

Solve for n

n² > 1·2.718/(12·1 × 10⁻⁵) = 22652
n > 150.5 → n = 151

Answer

n = 151
8.Numerical methods

Answer: |E| = 0.03663

Numerical solution of y′ = f(t, y): Euler's method steps along the slope at the start of each step: yn+1 = yₙ + h·f(tₙ, yₙ). Heun's method (improved Euler) averages the slope at the start and at an Euler prediction: k₁ = f(tₙ, yₙ), k₂ = f(tₙ + h, yₙ + h·k₁), yn+1 = yₙ + (h/2)(k₁ + k₂). The classical Runge–Kutta method (RK4) combines four slopes: yn+1 = yₙ + (h/6)(k₁ + 2k₂ + 2k₃ + k₄). The global error of Euler is proportional to h, Heun's to h², RK4's to h⁴.

ntₙyₙf(tₙ, yₙ)yₙ₊₁0020210.52−21211−2031.5000

Euler steps

y4 = 0

Exact value

y(2) = 0.0366313

Global error

|E| = |0.0366313 − 0| = 0.03663
00.511.52012ty

Graph

Answer

|E| = 0.03663

Halving h roughly halves the error of Euler's method.

ExamProblems · examproblems.com/courses/differential-equations