Linear Second-Order Equations with Constant Coefficients
The equation a·y″ + b·y′ + c·y = 0 is the mathematical model of vibration: a mass on a spring with damping, charge in an RLC circuit, a building swaying after a gust. It is solved completely by one idea, guess y = e^(rx). Substituting turns calculus into algebra, because derivatives of exponentials are multiples of themselves:
(a·r² + b·r + c)·e^(rx) = 0 ⟹ a·r² + b·r + c = 0
This characteristic equation is a quadratic, and its discriminant D = b² − 4ac sorts every such ODE into exactly three behaviors: two distinct real roots (pure exponential motion), one repeated root (the borderline case), or complex roots (oscillation). The general solution is always a two-parameter family, second order means two constants, pinned down by two initial conditions, position y(0) and velocity y′(0).
How to Use This Calculator
Enter the three coefficients. The calculator forms the characteristic equation, computes its discriminant and roots, identifies the case, and writes the general solution. Supply y(0) and y′(0) and it solves the 2×2 system for C₁ and C₂, printing the particular solution and plotting it, the graph is where the three cases become unmistakable: crossing decay curves, a single hump, or a decaying sine wave. The chips visit all three, plus the undamped oscillator whose amplitude never fades.
The Three Cases
D > 0, distinct real roots r₁, r₂: y = C₁e^(r₁x) + C₂e^(r₂x). Overdamped motion, the system oozes back to equilibrium without ever oscillating, like a door with a heavy closer.
D = 0, repeated root r: y = (C₁ + C₂x)e^(rx). Critically damped, the fastest possible return to equilibrium with no overshoot; the extra factor of x is the fingerprint of the degenerate case. Engineers tune for this: car shock absorbers and analog meter needles aim at critical damping.
D < 0, complex roots α ± βi: y = e^(αx)(C₁cos βx + C₂sin βx). Underdamped, genuine oscillation at frequency β inside an envelope e^(αx). Euler's formula e^(iθ) = cos θ + i sin θ is the bridge: complex exponentials are sinusoids, so imaginary roots mean real vibration.
Worked Example
y″ + 2y′ + 5y = 0 with y(0) = 1, y′(0) = 0. Characteristic equation r² + 2r + 5 = 0, discriminant 4 − 20 = −16: roots r = −1 ± 2i. General solution y = e^(−x)(C₁cos 2x + C₂sin 2x). The conditions give C₁ = 1 and (differentiating) −C₁ + 2C₂ = 0, so C₂ = ½:
y = e^(−x)(cos 2x + ½ sin 2x)
A mass released from rest one unit from equilibrium, ringing at frequency 2 while the e^(−x) envelope strangles the amplitude, each swing about 4.3% the size of the swing one period earlier (e^(−π) ≈ 0.043). The plot shows exactly this: a cosine-like wave squeezed into an exponential funnel.
Common Mistakes to Avoid
- Dropping the x in the repeated-root case. With D = 0, the two independent solutions are e^(rx) and x·e^(rx). Writing C₁e^(rx) + C₂e^(rx) collapses to one constant, no longer a general solution, and the initial conditions become unsolvable.
- Sign errors in the quadratic formula. r = (−b ± √D)/(2a): the leading −b is forgotten exactly often enough to matter, and it flips growth into decay. A stability sanity check helps: b > 0 and c > 0 (with a > 0) always means decay.
- Forgetting to differentiate before applying y′(0). The second condition applies to y′, which for the complex case brings both the envelope's α and the oscillation's β into play via the product rule, the step where most hand solutions go wrong.
- Reading β as the "frequency in hertz." β is angular frequency (radians per unit time); the period is 2π/β and ordinary frequency is β/2π. Off-by-2π errors in resonance calculations are a lab classic.
Real-World Applications
This equation is mechanical and electrical engineering's shared native tongue. Mass-spring-damper: m·y″ + c·y′ + k·y = 0 governs vehicle suspensions (tuned near critical damping), seismograph design, and the vibration isolation under precision instruments. RLC circuits: L·q″ + R·q′ + q/C = 0 is the same equation with charge as position, radio tuning is choosing β, and the mechanical-electrical analogy lets engineers move designs between domains verbatim.
Structural engineers model buildings and bridges as (systems of) these oscillators to compute natural frequencies and keep them away from earthquake and wind forcing, resonance being the catastrophic case the homogeneous solution warns about. Control theory reads stability directly off the characteristic roots (all real parts negative = stable), which scales from this page's quadratic to the eigenvalue analysis of the matrix world. Even pharmacology's two-compartment drug models and ecology's linearized predator-prey systems reduce, near equilibrium, to exactly these three cases, overdamped return, critical return, or damped oscillation.
Frequently Asked Questions
Why does y = e^(rx) work as the guess?
Because differentiation maps e^(rx) to r·e^(rx), exponentials are the eigenfunctions of d/dx. Any constant-coefficient linear combination of derivatives applied to e^(rx) just multiplies it by a polynomial in r, so solving the ODE reduces to finding that polynomial's roots.
Where do the sines and cosines come from if the guess was exponential?
From Euler's formula: e^((α+βi)x) = e^(αx)(cos βx + i·sin βx). The two complex-conjugate exponential solutions recombine into the real pair e^(αx)cos βx and e^(αx)sin βx, same solution space, real-valued basis.
What about nonhomogeneous equations, ay″ + by′ + cy = g(x)?
Solve the homogeneous part as here, then add any one particular solution found by undetermined coefficients or variation of parameters: y = y_h + y_p. The homogeneous solution is the transient (it dies out in damped systems); y_p is the steady-state response to the forcing, resonance is what happens when g oscillates at the natural frequency β.
Why exactly two constants?
Second order means two integrations' worth of freedom, geometrically, a solution is fixed by initial position and initial velocity, independently chosen. The solution space is a two-dimensional vector space, and C₁, C₂ are coordinates in the basis of the two independent solutions.
Can this method handle y″ − y = 0 or is b = 0 special?
Nothing special: r² − 1 = 0 gives r = ±1, so y = C₁eˣ + C₂e⁻ˣ (equivalently cosh and sinh). And b = 0 with c > 0 gives pure oscillation, the fourth chip, since the roots are purely imaginary, ±i√(c/a).
How would I solve this numerically instead?
Convert to a first-order system (y′ = v, v′ = −(b·v + c·y)/a) and integrate with RK4. That's the universal route for variable coefficients or nonlinearities, where the characteristic-equation shortcut no longer applies.