Mathematics for Physics · Chapter 26

Differential Equations

Physics equations are almost always differential equations — relations between a function and its derivatives. Knowing how to solve them is knowing how to solve physics.

PrerequisitesCalculus essentials (Ch. 25) · Vectors (Ch. 24) · Simple harmonic motion (Ch. 8) provides physical motivation
Learning Goals
  • Solve first-order linear ODEs using the integrating factor method.
  • Solve second-order ODEs with constant coefficients by finding roots of the characteristic equation.
  • Classify damped oscillators as underdamped, overdamped, or critically damped from their parameters.
  • Find the steady-state amplitude of a driven oscillator and identify the resonance condition.
  • Use separation of variables to solve first-order separable ODEs and apply initial conditions.

26.1 What Is a Differential Equation?

A differential equation (DE) is an equation involving an unknown function and one or more of its derivatives. The order is the highest derivative that appears. An ordinary DE (ODE) has one independent variable; apartial DE (PDE) has multiple.

Every fundamental law of physics is a differential equation. Newton's second law: m d²x/dt² = F(x,t). Faraday's law: ∂B/∂t = −∇×E. Schrödinger's equation: iℏ ∂ψ/∂t = Ĥψ. Solving these equations — finding the function x(t) or ψ(x,t) consistent with initial conditions — is the central technical task of theoretical physics.

26.2 First-Order Linear ODEs

Definition 26.1 — First-Order Linear ODE
Standard form: dy/dx+P(x)y=Q(x)dy/dx + P(x)y = Q(x). The general solution uses an integrating factor μ(x)=e∫P dx\mu(x) = e^{\int P\,dx}:d/dx[μ(x)y]=μ(x)Q(x)→y=(1/μ)∫μQdx+C/μd/dx[\mu(x) y] = \mu(x) Q(x) \quad \to \quad y = (1/\mu) \int \mu Q dx + C/\mu

The most important first-order ODE in physics is exponential growth/decay: dy/dt = ky. Its solution is y = y₀ eᵏᵗ. For k < 0 (decay): radioactive decay (N=N0e−t/τN = N_0 e^{-t/\tau}), capacitor discharge (q=q0e−t/RCq = q_0 e^{-t/RC}), Newton's law of cooling (ΔT=ΔT0e−kt\Delta T = \Delta T_0 e^{-kt}).

Example 26.1 — RC Circuit — Capacitor Charging

A capacitor (capacitance C) charges through a resistor R from a battery of EMFεEMF \varepsilon. The loop equation gives ε=IR+q/C\varepsilon = IR + q/C, with I=dq/dtI = dq/dt. Solve for q(t).

Rewrite:dq/dt+q/(RC)=ε/Rdq/dt + q/(RC) = \varepsilon/R   (first-order linear ODE)
Integrating factor:μ=et/RC\mu = e^{t/RC}
Multiply through:ddt[q et/RC]=εR et/RC\frac{d}{dt}\left[q\, e^{t/RC}\right] = \frac{\varepsilon}{R}\, e^{t/RC}
Integrate:q et/RC=Cε et/RC+A  →  q(t)=Cε+A e−t/RCq\, e^{t/RC} = C\varepsilon\, e^{t/RC} + A \;\to\; q(t) = C\varepsilon + A\, e^{-t/RC}
Initial condition:q(0)=0  →  A=−Cε  →  q(t)=Cε(1−e−t/RC)q(0) = 0 \;\to\; A = -C\varepsilon \;\to\; q(t) = C\varepsilon\left(1 - e^{-t/RC}\right)
Result:q(t)=Cε(1−e−t/τ)q(t) = C\varepsilon(1 - e^{-t/\tau}) where τ=RC\tau = RC is the time constant. ✓

26.3 Second-Order Linear ODEs with Constant Coefficients

The equation m ẍ + b ẋ + kx = F(t) governs every oscillating system in physics: springs, LC circuits, pendulums, sound resonators. The general approach: try the ansatz x=ertx = e^{rt}, substitute, and solve the characteristic equation.

Definition 26.2 — Characteristic Equation
For ay'' + by' + cy=0cy = 0, substitute y=erty = e^{rt}:ar2+br+c=0ar^{2} + br + c = 0     (characteristic equation)Roots r1,r2r_{1}, r_{2} determine the solution type:Real distinct (b2b^{2} >4ac):y=C1er1t+C2e(r2t4ac): y = C_{1} e^{r_{1}t} + C_{2} e^(r_{2}t)  (overdamped)Complex (b2b^{2} <4ac):r=α±iω→y=eαt(C1cos⁡ωt+C2sin⁡ωt4ac): r = \alpha \pm i\omega \to y = e^{\alpha t}(C_{1} \cos \omega t + C_{2} \sin \omega t)  (underdamped)Repeated (b2=4ac):y=(C1+C2t)e(rtb^{2} = 4ac): y = (C_{1} + C_{2}t) e^(rt)  (critically damped)
Example 26.2 — Simple Harmonic Oscillator

Solve mx¨+kx=0m \ddot{x} + kx = 0 with initial conditions x(0)=A,x˙(0)=0x(0) = A, \dot{x}(0) = 0.

Characteristic equation:mr2+k=0→r2=−k/m→r=±ik/m=±iω0mr^{2} + k = 0 \to r^{2} = -k/m \to r = \pm i\sqrt{k/m} = \pm i\omega_{0}
General solution:x(t)=C1cos⁡(ω0t)+C2sin⁡(ω0t),ω0=k/mx(t) = C_{1} \cos(\omega_{0}t) + C_{2} \sin(\omega_{0}t), \qquad \omega_{0} = \sqrt{k/m}
Apply x(0)=Ax(0) = A:C1=AC_{1} = A
Apply ẋ(0) = 0:ẋ = −Aω0sin⁡(ω0t)+C2ω0cos⁡(ω0t)-A\omega_{0} \sin(\omega_{0}t) + C_{2}\omega_{0} \cos(\omega_{0}t). Att=0:C2ω0=0→C2=0At t=0: C_{2}\omega_{0} = 0 \to C_{2} = 0
Result:x(t)=Acos⁡(ω0t)—x(t) = A \cos(\omega_{0}t) — pure cosine, as expected for release from rest. ✓
Example 26.3 — Damped Oscillator

Solve mx¨+bx˙+kx=0m\ddot{x} + b\dot{x} + kx = 0 for the underdamped case (b2b^{2} < 4mk).

Characteristic equation:mr2+br+k=0→r=[−b±b2−4mk]/2mmr^{2} + br + k = 0 \to r = [-b \pm \sqrt{b^{2}-4mk}] / 2m
Underdamped:b2b^{2} < 4mk→b2−4mk4mk \to \sqrt{b^{2}-4mk} is imaginary →r=−γ±iωd\to r = -\gamma \pm i\omega_{d}
Define:γ=b/(2m)\gamma = b/(2m) (decay rate),   ωd=k/m−γ2=ω02−γ2\omega_{d} = \sqrt{k/m - \gamma^{2}} = \sqrt{\omega_{0}^{2} - \gamma^{2}} (damped frequency)
Solution:x(t)=e−γt(C1cos⁡ωdt+C2sin⁡ωdt)=Ae−γtcos⁡(ωdt+ϕ)x(t) = e^{-\gamma t} (C_{1} \cos \omega_{d} t + C_{2} \sin \omega_{d} t) = A e^{-\gamma t} \cos(\omega_{d} t + \phi)
Physics:An exponentially decaying envelope × oscillation. Amplitude halves every t1/2=ln⁡2/γt_{1}/_{2} = \ln2/\gamma.

26.4 Particular Solutions and Resonance

For a driven oscillator mẍ + bẋ + kx = F₀ cos(ωt), the particular solution(steady-state response) has the form xp=Xcos⁡(ωt−δ)x_p = X\cos(\omega t - \delta), where the amplitude is:

X=F0(k−mω2)2+(bω)2X = \frac{F_0}{\sqrt{(k - m\omega^2)^2 + (b\omega)^2}}(26.1)

This is maximum when the driving frequency ω equals the natural frequency ω₀ = √(k/m) — this is resonance. At resonance (weak damping), the amplitude grows enormously: Xres=F0/(bω0)X_{\text{res}} = F_0/(b\omega_0). The quality factor Q = mω₀/b measures the sharpness of resonance — high Q means narrow, tall peak; low Q means broad, flat response.

Resonance is why bridges can be destroyed by rhythmic marching (Angers Bridge, 1850), why wine glasses shatter at their resonant frequency, and why MRI machines work (nuclear magnetic resonance). The mathematics is identical in all cases.

26.5 Separation of Variables

Many first-order ODEs can be solved by separating the variables:

Definition 26.3 — Separation of Variables
Ifdy/dx=f(x)g(y)If dy/dx = f(x)g(y), rewrite as dy/g(y)=f(x)dxdy/g(y) = f(x)dx, then integrate both sides:∫dy/g(y)=∫f(x)dx+C\int dy/g(y) = \int f(x) dx + CThis directly yields y as a function of x (or implicitly). Works whenever the equation is separable — the right-hand side factors into a function of x times a function of y.
Example 26.4 — Radioactive Decay

Carbon-14 decays with half-life t1/2=5730t_{1}/_{2} = 5730 years. A bone sample contains 30% of the original C-14. Find its age.

ODE:dN/dt=−λNdN/dt = -\lambda N, where λ=ln⁡2/t1/2=ln⁡2/5730yr−1\lambda = \ln2/t_{1}/_{2} = \ln2/5730 yr^{-1}
Separate:dN/N=−λdt→∫dN/N=−λ∫dt→ln⁡N=−λtdN/N = -\lambda dt \to \int dN/N = -\lambda\int dt \to \ln N = -\lambda t + const
Solution:N(t)=N0 e−λtN(t) = N_0\, e^{-\lambda t}
Apply N/N0=0.30N/N_{0} = 0.30:0.30=e−λt→−λt=ln⁡(0.30)=−1.2040.30 = e^{-\lambda t} \to -\lambda t = \ln(0.30) = -1.204
Age:t=1.204/λ=1.204×5730/ln⁡2=1.204×8267t = 1.204/\lambda = 1.204 \times 5730/\ln2 = 1.204 \times 8267 = 9,950 years
Definition 26.4 — Common Traps
  • General solutions need constants: initial or boundary conditions choose the physical solution.
  • Homogeneous and particular parts both matter: driven systems need the forced response.
  • Stability comes from eigenvalues: signs and real parts determine growth or decay.
  • Separation is not always valid: only separable equations allow variables to be split cleanly.
Exercises — 26.1–26.5 Differential Equations
1.
A sample retains 30% of its original C-14 (half-life 5730 years). Find its age.
years
Straightforward
2.
A mass–spring system has k=400N/mk = 400 N/m and m=10kgm = 10 kg. Find the angular frequency ω0\omega_{0}.
rad/s
Straightforward
3.
Att=RCAt t = RC (one time constant), what fraction of the maximum charge has a capacitor accumulated?
Intermediate
4.A spring-mass system has m=1kg,k=4N/mm=1 kg, k=4 N/m. Classify and solve for x(t) for: (a)b=0.5,(b)b=4,(c)b=10N⋅s/ma) b=0.5, (b) b=4, (c) b=10 N\cdot s/m.
Intermediate
5.Derive the steady-state amplitude X(ω)X(\omega) for a driven oscillator mx¨+bx˙+kx=F0cos⁡(ωt)m\ddot{x}+b\dot{x}+kx = F_{0}\cos(\omega t). At what frequency is X maximum? Define the quality factor Q and explain its physical meaning.
Challenging
Key Takeaways
  • A differential equation relates a function to its derivatives; every physics law is a DE.
  • Exponential growth/decay (dy/dt=ky→y=y0ektdy/dt = ky \to y = y_{0}eᵏᵗ) governs radioactive decay, RC circuits, cooling.
  • Characteristic equation (ar2+br+c=0ar^{2}+br+c=0) classifies oscillators: underdamped (complex roots), overdamped (real distinct), critical (repeated).
  • Simple harmonic oscillator: x(t)=Acos⁡(ω0t+ϕ),ω0=k/mx(t) = A \cos(\omega_{0}t+\phi), \omega_{0} = \sqrt{k/m}.
  • Damped oscillator: x(t)=Ae−γtcos⁡(ωdt+ϕ)—x(t) = Ae^{-\gamma t}\cos(\omega_{d} t+\phi) — exponentially decaying amplitude.
  • Resonance at ω≈ω0\omega \approx \omega_{0}: amplitude diverges as damping → 0. Quality factor Q=ω0/ΔωQ = \omega_{0}/\Delta\omega.