Second-Order Linear Equations

Study Sheet

Second-Order Linear Equations

Characteristic roots: oscillate, decay, or both

Constant Coefficients

Tip
The characteristic equation

For y′′+by′+cy=0y'' + by' + cy = 0, try y=erxy = e^{rx}: r2+br+c=0r^2 + br + c = 0. Distinct real roots give Aer1x+Ber2xAe^{r_1x} + Be^{r_2x}; a double root rr gives (A+Bx)erx(A + Bx)e^{rx} (the extra xx, exactly as in repeated-root recurrences); complex roots α±βi\alpha \pm \beta i give decaying oscillations eαx(Acos⁡βx+Bsin⁡βx)e^{\alpha x}(A\cos\beta x + B\sin\beta x).

Why exponentials: with constant coefficients, y′′y'', by′by' and cycy must cancel one another for every xx, which is only possible if they are the same kind of function. The exponential erxe^{rx} is the function whose derivatives are multiples of itself, so substituting it reduces the differential equation to an algebraic one for rr. The three cases are the three ways a real quadratic can have roots, and each supplies two independent solutions — exactly what a second-order equation needs (the proofs below give the details).

Concept
Damping in one glance
xy1234−0.50.5b = 1b = 4b = 6
y′′+by′+4y=0y'' + by' + 4y = 0 from y(0)=1y(0) = 1, y′(0)=0y'(0) = 0: underdamped b=1b = 1, critical b=4b = 4, overdamped b=6b = 6 (dashed).

For y′′+by′+ω2y=0y'' + by' + \omega^2y = 0, the discriminant b2−4ω2b^2 - 4\omega^2 sorts the physics: negative = underdamped (oscillates while decaying), zero = critically damped (fastest settle, no overshoot), positive = overdamped. Pure y′′+ω2y=0y'' + \omega^2y = 0 oscillates forever with period 2πω\tfrac{2\pi}{\omega}. For ω=2\omega = 2 the regimes are separated by b=4b = 4.

Why the discriminant decides: the roots are r=−b±b2−4ω22r = \dfrac{-b \pm\sqrt{b^2 - 4\omega^2}}{2}. When b2<4ω2b^2 < 4\omega^2 they are complex, and the imaginary part produces oscillation. When b2>4ω2b^2 > 4\omega^2 both roots are real and negative, so the solution is a sum of two decaying exponentials and crosses zero at most once. At b=2ωb = 2\omega the two roots merge. The figure starts y′′+by′+4y=0y'' + by' + 4y = 0 at y(0)=1y(0) = 1, y′(0)=0y'(0) = 0: b=1b = 1 overshoots and rings, b=4b = 4 returns fastest without crossing, b=6b = 6 creeps back.

Example
Reading off a solution

y′′−3y′+2y=0y'' - 3y' + 2y = 0: roots 1,21, 2, so y=Aex+Be2xy = Ae^x + Be^{2x}; the initial data y(0)=3y(0)=3, y′(0)=5y'(0)=5 pin A=1A = 1, B=2B = 2 via a tiny linear system — second-order ODEs always hand you two conditions for the two constants.

How the data pin the constants: differentiate first, y′=Aex+2Be2xy' = Ae^x + 2Be^{2x}, then set x=0x = 0. The conditions become A+B=3A + B = 3 and A+2B=5A + 2B = 5; subtracting gives B=2B = 2, then A=1A = 1, so y=ex+2e2xy = e^x + 2e^{2x}. Two conditions for two constants, always a 2×22 \times 2 linear system.

Side note
Significance: everything that vibrates

Car suspensions (critically damped on purpose), earthquake-resistant buildings, guitar strings, and RLC radio tuners all obey second-order linear equations. The discriminant taxonomy — underdamped, critical, overdamped — is a design menu: engineers choose bb to put a system in the regime they want.

Try it
Try it: read the physics from the roots

Without finding any constants, describe every solution of y′′+4y′+13y=0y'' + 4y' + 13y = 0: does it oscillate, at what angular frequency, and how fast does it decay?

Show the answer

The characteristic equation r2+4r+13=0r^2 + 4r + 13 = 0 has r=−4±16−522=−2±3ir = \dfrac{-4 \pm\sqrt{16 - 52}}{2} = -2 \pm 3i. Complex roots, so the motion is underdamped: every solution is e−2x(Acos⁡3x+Bsin⁡3x)e^{-2x}(A\cos 3x + B\sin 3x), an oscillation of angular frequency 33 (period 2π3≈2.09\tfrac{2\pi}{3} \approx 2.09) inside the envelope e−2xe^{-2x}. The envelope halves every ln⁡22≈0.35\tfrac{\ln 2}{2} \approx 0.35 time units. Initial data change only AA and BB; the frequency and the decay rate are fixed by the roots.

The Spring–Mass System

Tip
From Newton's law to the equation

A mass mm on a spring of stiffness kk, with a damper whose force is proportional to velocity (coefficient cc), obeys

mx′′+cx′+kx=0,mx'' + cx' + kx = 0,

where x(t)x(t) is the displacement from equilibrium. Dividing by mm gives x′′+cm x′+ω02x=0x'' + \tfrac cm\,x' + \omega_0^2x = 0 with natural frequency ω0=k/m\omega_0 = \sqrt{k/m}. The motion is underdamped, critically damped or overdamped as c2−4mkc^2 - 4mk is negative, zero or positive.

Each term is a force. The spring pulls back in proportion to the stretch (−kx-kx, Hooke's law), the damper resists in proportion to the speed (−cx′-cx'), and Newton's second law sets their sum equal to mx′′mx''; moving everything to one side gives the equation. The characteristic roots are −c±c2−4mk2m\dfrac{-c \pm\sqrt{c^2 - 4mk}}{2m}, so the sign of c2−4mkc^2 - 4mk decides between complex roots (oscillation) and real ones (none). Critical damping c=2mkc = 2\sqrt{mk} is the smallest damping that prevents oscillation.

Example
Worked: critically damped

A 11 kg mass on a spring with k=9k = 9 N/m and damping c=6c = 6 N·s/m is pulled to x(0)=1x(0) = 1 m and released from rest. Find x(t)x(t).

Step 1 — the equation is x′′+6x′+9x=0x'' + 6x' + 9x = 0, and c2−4mk=36−36=0c^2 - 4mk = 36 - 36 = 0: critical damping.

Step 2 — the characteristic equation r2+6r+9=(r+3)2=0r^2 + 6r + 9 = (r + 3)^2 = 0 has the double root r=−3r = -3, so x=(A+Bt)e−3tx = (A + Bt)e^{-3t}.

Step 3 — the data: x(0)=A=1x(0) = A = 1. Differentiating, x′=Be−3t−3(A+Bt)e−3tx' = Be^{-3t} - 3(A + Bt)e^{-3t}, so x′(0)=B−3A=0x'(0) = B - 3A = 0 and B=3B = 3.

Step 4 — x(t)=(1+3t)e−3tx(t) = (1 + 3t)e^{-3t}, which stays positive for all t>0t > 0: the mass returns without overshooting.

Step 5 — verify: x′=−9te−3tx' = -9te^{-3t} and x′′=(−9+27t)e−3tx'' = (-9 + 27t)e^{-3t}, so x′′+6x′+9x=e−3t[(−9+27t)−54t+(9+27t)]=0x'' + 6x' + 9x = e^{-3t}\left[(-9 + 27t) - 54t + (9 + 27t)\right] = 0 ✓.

Example
Worked: overdamped, and slower
tx1230.5c = 6c = 10
Released from x=1x = 1: critical damping c=6c = 6 (solid) against overdamping c=10c = 10 (dashed); dots at t=2t = 2.

Replace the damper by a stronger one, c=10c = 10, with the same mass, spring and start.

Step 1 — x′′+10x′+9x=0x'' + 10x' + 9x = 0, and c2−4mk=100−36>0c^2 - 4mk = 100 - 36 > 0: overdamped.

Step 2 — r2+10r+9=(r+1)(r+9)=0r^2 + 10r + 9 = (r + 1)(r + 9) = 0, so x=Ae−t+Be−9tx = Ae^{-t} + Be^{-9t}.

Step 3 — the data: A+B=1A + B = 1 and x′(0)=−A−9B=0x'(0) = -A - 9B = 0, so B=−18B = -\tfrac18 and A=98A = \tfrac98: x=98e−t−18e−9tx = \tfrac98e^{-t} - \tfrac18e^{-9t}.

Step 4 — compare with critical damping at t=2t = 2: (1+6)e−6≈0.017(1 + 6)e^{-6} \approx 0.017 m, against 98e−2−18e−18≈0.152\tfrac98e^{-2} - \tfrac18e^{-18} \approx 0.152 m. More damping made the return slower, because the slow root −1-1 dominates and the mass creeps back. Critical damping is the fastest return without oscillation, which is why door closers and car suspensions are tuned near it.

Side note
Where it goes wrong: forgetting the envelope in x′(0)

For x′′+2x′+5x=0x'' + 2x' + 5x = 0 with x(0)=1x(0) = 1, x′(0)=3x'(0) = 3: the roots are −1±2i-1 \pm 2i, so x=e−t(Acos⁡2t+Bsin⁡2t)x = e^{-t}(A\cos 2t + B\sin 2t) and A=1A = 1. Differentiating only the bracket gives x′(0)=2B=3x'(0) = 2B = 3 and B=32B = \tfrac32 — wrong. The product rule gives x′=−e−t(Acos⁡2t+Bsin⁡2t)+e−t(−2Asin⁡2t+2Bcos⁡2t)x' = -e^{-t}(A\cos 2t + B\sin 2t) + e^{-t}(-2A\sin 2t + 2B\cos 2t), so x′(0)=−A+2B=3x'(0) = -A + 2B = 3 and B=2B = 2. The wrong choice B=32B = \tfrac32 starts with velocity −1+3=2-1 + 3 = 2, not 33.

Reminder — The differentiation rules:  (xn)′=nxn−1,(fg)′=f′g+fg′,(fg)′=f′g−fg′g2,(f(g(x)))′=f′(g(x))g′(x)(x^{n})'=nx^{n-1},\quad (fg)'=f'g+fg',\quad \left(\tfrac{f}{g}\right)'=\frac{f'g-fg'}{g^{2}},\quad \big(f(g(x))\big)'=f'(g(x))g'(x)
Try it
Try it: a spring tuned to critical

A 11 kg mass hangs on a spring with k=16k = 16 N/m and a damper with c=8c = 8 N·s/m. It starts at equilibrium, x(0)=0x(0) = 0, with velocity x′(0)=2x'(0) = 2 m/s. Find x(t)x(t) and the largest displacement.

Show the answer

c2−4mk=64−64=0c^2 - 4mk = 64 - 64 = 0: critically damped. r2+8r+16=(r+4)2r^2 + 8r + 16 = (r + 4)^2, so x=(A+Bt)e−4tx = (A + Bt)e^{-4t}. x(0)=A=0x(0) = A = 0, so x=Bte−4tx = Bte^{-4t} and x′(0)=B=2x'(0) = B = 2: x(t)=2te−4tx(t) = 2te^{-4t}. The largest displacement is where x′=2e−4t(1−4t)=0x' = 2e^{-4t}(1 - 4t) = 0, at t=14t = \tfrac14 s, and it equals 2⋅14 e−1=12e≈0.1842\cdot\tfrac14\,e^{-1} = \tfrac{1}{2e} \approx 0.184 m. After that the mass returns toward 00 without crossing it.

Amplitude, Phase and the Decaying Envelope

Tip
Writing A cos + B sin as one wave

Any Acos⁡ωt+Bsin⁡ωtA\cos\omega t + B\sin\omega t equals Rcos⁡(ωt−φ)R\cos(\omega t - \varphi), where R=A2+B2R = \sqrt{A^2 + B^2}, cos⁡φ=AR\cos\varphi = \tfrac AR and sin⁡φ=BR\sin\varphi = \tfrac BR. An underdamped solution therefore reads

e−αt(Acos⁡ωt+Bsin⁡ωt)=Re−αtcos⁡(ωt−φ):e^{-\alpha t}(A\cos\omega t + B\sin\omega t) = Re^{-\alpha t}\cos(\omega t - \varphi):

a cosine of fixed frequency squeezed between the envelopes ±Re−αt\pm Re^{-\alpha t}.

Expand the right side with the angle-difference formula: Rcos⁡(ωt−φ)=Rcos⁡φcos⁡ωt+Rsin⁡φsin⁡ωtR\cos(\omega t - \varphi) = R\cos\varphi\cos\omega t + R\sin\varphi\sin\omega t. Matching coefficients requires Rcos⁡φ=AR\cos\varphi = A and Rsin⁡φ=BR\sin\varphi = B, so (R,φ)(R, \varphi) are the polar coordinates of the point (A,B)(A, B). That is why the amplitude is A2+B2\sqrt{A^2 + B^2}, and why φ\varphi must lie in the quadrant of (A,B)(A, B) rather than be read off arctan⁡BA\arctan\tfrac BA blindly.

Example
Worked: one wave from two

Write y=3cos⁡2t+4sin⁡2ty = 3\cos 2t + 4\sin 2t as Rcos⁡(2t−φ)R\cos(2t - \varphi), and find its first maximum for t≥0t \ge 0.

Step 1 — R=32+42=5R = \sqrt{3^2 + 4^2} = 5.

Step 2 — (A,B)=(3,4)(A, B) = (3, 4) lies in the first quadrant, so φ=arctan⁡43≈0.927\varphi = \arctan\tfrac43 \approx 0.927.

Step 3 — y=5cos⁡(2t−0.927)y = 5\cos(2t - 0.927).

Step 4 — the first maximum is where 2t−φ=02t - \varphi = 0, at t=φ2≈0.464t = \tfrac\varphi2 \approx 0.464, with value 55.

Step 5 — check at t=0t = 0: 5cos⁡φ=5⋅35=35\cos\varphi = 5\cdot\tfrac35 = 3, matching 3cos⁡0+4sin⁡0=33\cos 0 + 4\sin 0 = 3 ✓.

Example
Worked: an underdamped IVP with its envelope
ty123
y=5e−tcos⁡(3t−φ)y = 5e^{-t}\cos(3t - \varphi) starts at 33 and stays between the dashed envelopes ±5e−t\pm 5e^{-t}.

Solve y′′+2y′+10y=0y'' + 2y' + 10y = 0, y(0)=3y(0) = 3, y′(0)=9y'(0) = 9, and write the answer with its envelope.

Step 1 — r2+2r+10=0r^2 + 2r + 10 = 0 gives r=−1±3ir = -1 \pm 3i, so y=e−t(Acos⁡3t+Bsin⁡3t)y = e^{-t}(A\cos 3t + B\sin 3t).

Step 2 — the data: y(0)=A=3y(0) = A = 3, and by the product rule y′(0)=−A+3B=9y'(0) = -A + 3B = 9, so B=4B = 4.

Step 3 — 3cos⁡3t+4sin⁡3t=5cos⁡(3t−φ)3\cos 3t + 4\sin 3t = 5\cos(3t - \varphi) with φ=arctan⁡43≈0.927\varphi = \arctan\tfrac43 \approx 0.927.

Step 4 — so y=5e−tcos⁡(3t−φ)y = 5e^{-t}\cos(3t - \varphi): an oscillation with quasi-period 2π3≈2.09\tfrac{2\pi}{3} \approx 2.09 between the envelopes ±5e−t\pm5e^{-t}.

Step 5 — one quasi-period multiplies the envelope by e−2π/3≈0.123e^{-2\pi/3} \approx 0.123, so each maximum is about 12%12\% of the one before.

Step 6 — verify: e−tcos⁡3te^{-t}\cos 3t and e−tsin⁡3te^{-t}\sin 3t both solve the equation because −1±3i-1 \pm 3i are the roots, and y(0)=3y(0) = 3, y′(0)=−3+12=9y'(0) = -3 + 12 = 9 ✓.

Side note
Where it goes wrong: the phase in the wrong quadrant

Write y=−cos⁡t+sin⁡ty = -\cos t + \sin t as Rcos⁡(t−φ)R\cos(t - \varphi). R=2R = \sqrt2, and arctan⁡BA=arctan⁡(−1)=−π4\arctan\tfrac BA = \arctan(-1) = -\tfrac\pi4. But 2cos⁡(t+π4)\sqrt2\cos\left(t + \tfrac\pi4\right) equals +1+1 at t=0t = 0, while y(0)=−1y(0) = -1. The point (A,B)=(−1,1)(A, B) = (-1, 1) is in the second quadrant, so φ=3π4\varphi = \tfrac{3\pi}{4} and y=2cos⁡(t−3π4)y = \sqrt2\cos\left(t - \tfrac{3\pi}{4}\right), which gives 2cos⁡(−3π4)=−1\sqrt2\cos\left(-\tfrac{3\pi}{4}\right) = -1 at t=0t = 0 ✓.

Try it
Try it: amplitude, phase, first zero

Write y=e−2t(cos⁡t+3sin⁡t)y = e^{-2t}\left(\cos t + \sqrt3\sin t\right) as Re−2tcos⁡(t−φ)Re^{-2t}\cos(t - \varphi), and find the first t>0t > 0 at which y=0y = 0.

Show the answer

R=1+3=2R = \sqrt{1 + 3} = 2. The point (1,3)(1, \sqrt3) is in the first quadrant with cos⁡φ=12\cos\varphi = \tfrac12 and sin⁡φ=32\sin\varphi = \tfrac{\sqrt3}{2}, so φ=π3\varphi = \tfrac\pi3 and y=2e−2tcos⁡(t−π3)y = 2e^{-2t}\cos\left(t - \tfrac\pi3\right). The envelope 2e−2t2e^{-2t} never vanishes, so y=0y = 0 exactly when cos⁡(t−π3)=0\cos\left(t - \tfrac\pi3\right) = 0. The first such t>0t > 0 has t−π3=π2t - \tfrac\pi3 = \tfrac\pi2, i.e. t=5π6≈2.62t = \tfrac{5\pi}{6} \approx 2.62.

Proofs & Why It Matters

Tip
Proof: why e^rx and the characteristic equation

Substitute y=erxy = e^{rx} into y′′+by′+cy=0y'' + by' + cy = 0: erx(r2+br+c)=0e^{rx}(r^2 + br + c) = 0, and since erx≠0e^{rx} \ne 0, the exponent must satisfy r2+br+c=0r^2 + br + c = 0.

Two independent solutions of a second-order linear equation span all solutions (the solution space is 22-dimensional: a solution is pinned by y(0),y′(0)y(0), y'(0)), so distinct roots finish the problem. ■\blacksquare

Tip
Proof: the double root needs xe^rx

If rr is a double root, then λ2+bλ+c=(λ−r)2\lambda^2 + b\lambda + c = (\lambda - r)^2, and comparing coefficients gives b=−2rb = -2r and c=r2c = r^2. Try y=xerxy = xe^{rx}: y′=(1+rx)erxy' = (1 + rx)e^{rx} and y′′=(2r+r2x)erxy'' = (2r + r^2x)e^{rx}.

Substitute: erx[(2r+r2x)+b(1+rx)+cx]=erx[(2r+b)+x(r2+br+c)]=0e^{rx}\left[(2r + r^2x) + b(1 + rx) + cx\right] = e^{rx}\left[(2r + b) + x(r^2 + br + c)\right] = 0 — both brackets vanish precisely because rr is a double root. ■\blacksquare

Tip
Proof: complex roots give cosine and sine (Euler)

Euler's formula eiβx=cos⁡βx+isin⁡βxe^{i\beta x} = \cos\beta x + i\sin\beta x (visible by comparing the three power series) turns the complex solutions e(α±iβ)xe^{(\alpha\pm i\beta)x} into eαx(cos⁡βx±isin⁡βx)e^{\alpha x}(\cos\beta x \pm i\sin\beta x).

Real linear combinations — half the sum, and the difference over 2i2i — extract eαxcos⁡βxe^{\alpha x}\cos\beta x and eαxsin⁡βxe^{\alpha x}\sin\beta x, two real independent solutions. Decay times oscillation, straight from algebra. ■\blacksquare

Going Deeper: Explanations & Worked Problems

Concept
Why two constants, and how initial data pins them

A second-order equation reaches back two derivatives, so a solution is not determined until you specify both a starting value y(0)y(0) and a starting slope y′(0)y'(0) — think of a mass on a spring: where it starts and how fast it is moving are independent facts.

Correspondingly the general solution carries exactly two free constants, and the solution space of the homogeneous equation is two-dimensional: find two independent solutions and every solution is a combination of them. The characteristic equation delivers those two: distinct real roots give two exponentials; a double root gives erxe^{rx} and xerxxe^{rx}; complex roots give a cosine and a sine dressed in an exponential envelope. Applying initial data always ends the same way — a small linear system in the two constants, one equation from y(0)y(0), one from y′(0)y'(0).

Example
Worked: a full IVP, characteristic roots to final value

Solve y′′−3y′+2y=0y'' - 3y' + 2y = 0, y(0)=3y(0) = 3, y′(0)=5y'(0) = 5, and evaluate at x=ln⁡2x = \ln 2.

Step 1 — characteristic equation: r2−3r+2=(r−1)(r−2)=0r^2 - 3r + 2 = (r-1)(r-2) = 0: roots 1,21, 2.

Step 2 — general solution: y=Aex+Be2xy = Ae^{x} + Be^{2x}.

Step 3 — apply the data: y(0)=A+B=3y(0) = A + B = 3; since y′=Aex+2Be2xy' = Ae^x + 2Be^{2x}, y′(0)=A+2B=5y'(0) = A + 2B = 5.

Step 4 — solve the little system: subtracting, B=2B = 2, then A=1A = 1: y=ex+2e2xy = e^x + 2e^{2x}.

Step 5 — evaluate: eln⁡2=2e^{\ln2} = 2 and e2ln⁡2=(eln⁡2)2=4e^{2\ln2} = (e^{\ln2})^2 = 4, so y(ln⁡2)=2+2⋅4=10y(\ln 2) = 2 + 2\cdot4 = 10.

Step 6 — verify the ODE once: y′′=ex+8e2xy'' = e^x + 8e^{2x}, 3y′=3ex+12e2x3y' = 3e^x + 12e^{2x}, 2y=2ex+4e2x2y = 2e^x + 4e^{2x}; then y′′−3y′+2y=(1−3+2)ex+(8−12+4)e2x=0y'' - 3y' + 2y = (1 - 3 + 2)e^x + (8 - 12 + 4)e^{2x} = 0 ✓.

Example
Worked: complex roots, read as physics

Solve y′′+2y′+5y=0y'' + 2y' + 5y = 0, y(0)=1y(0) = 1, y′(0)=−1y'(0) = -1.

Step 1 — characteristic: r2+2r+5=0r^2 + 2r + 5 = 0 gives r=−2±4−202=−1±2ir = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = -1 \pm 2i.

Step 2 — real solution form (α=−1\alpha = -1, β=2\beta = 2): y=e−x(Acos⁡2x+Bsin⁡2x)y = e^{-x}(A\cos 2x + B\sin 2x).

Step 3 — data: y(0)=A=1y(0) = A = 1; the product rule gives y′(0)=−A+2B=−1y'(0) = -A + 2B = -1, so B=0B = 0: y=e−xcos⁡2xy = e^{-x}\cos 2x.

Step 4 — read it: an oscillation of angular frequency 22 (period π\pi) inside a decaying envelope e−xe^{-x} — underdamped motion, crossing zero every π2\tfrac\pi2, each swing about e−π≈4%e^{-\pi} \approx 4\% the height of the one two crossings before. The root's real part is the decay rate; its imaginary part is the frequency: the algebra is the physics.