Second-order linear ODEs with constant coefficients
Every second-order linear ODE with constant coefficients — the equation behind damped springs, RLC circuits and countless engineering models — reduces to a single algebraic step. Guess a solution of the form , substitute, and the differential equation collapses into a quadratic in : the auxiliary equation. Whatever the physical system, once you know the roots of that quadratic you can write down the full family of solutions by pattern-matching to one of three cases. This article builds that pattern-matching machine from scratch. We derive why is the right guess, work through the three root cases (real distinct, real repeated, complex conjugate), and show why a repeated root needs an extra factor of — a subtlety that trips up most students. A fully worked initial value problem ties the algebra to a concrete numerical answer, and a set of traps and quiz questions checks that the pattern has actually stuck.
Substituting into turns the ODE into the algebraic auxiliary equation , and the nature of its two roots — real distinct, real repeated, or complex conjugate — fixes the exact form of the general solution.
The core idea
A second-order linear homogeneous ODE with constant coefficients has the form
where: are fixed real constants () and is the unknown function. "Homogeneous" just means the right-hand side is zero; "linear" means , , appear only to the first power and are not multiplied together. Because the derivative of is a constant multiple of itself (), trying turns every derivative into a power of times . Substituting and cancelling the common factor (which is never zero) leaves the auxiliary equation (also called the characteristic equation):
where: is the unknown exponent we are solving for. This is an ordinary quadratic, solvable by factoring or the quadratic formula . The discriminant sorts every second-order case into exactly three families:
Case 1 — real, distinct roots (): two different exponents , giving .
Case 2 — real, repeated root (): one exponent used twice, giving — note the extra factor of on the second term.
Case 3 — complex conjugate roots (): roots , giving , obtained from Euler's formula by combining the two complex exponentials into real sine and cosine terms. In every case , the complementary function, is the general solution of the homogeneous equation, carrying exactly two arbitrary constants () because the ODE is second order. These constants are pinned down by two extra conditions — typically initial values and , or boundary values at two points.
Derivation
The goal is to show, starting only from the substitution and ordinary algebra, exactly why a second-order homogeneous linear ODE with constant coefficients and a real-distinct-root auxiliary equation has general solution , and to confirm this solution genuinely satisfies the original ODE for any choice of the two constants.
Step 1. Substitute the trial solution. Let in . Since and , the equation becomes , or . Because is never zero for any real or , the bracket must vanish: , the auxiliary equation.
Step 2. Solve for the two roots. When , the quadratic formula gives two distinct real roots and . Each root separately makes and individual solutions of the ODE, by Step 1 run in reverse.
Step 3. Combine by linearity. Because the ODE is linear and homogeneous, any linear combination of solutions is also a solution: if and both satisfy the equation, so does for any constants — substitute and the equation splits into two copies of Step 1, each individually zero. So solves the ODE.
Step 4. Confirm this is the general solution, not just a solution. Two functions and are linearly independent whenever (their Wronskian is never zero). A second-order linear ODE has exactly a two-dimensional solution space, so two independent solutions span it completely — every solution of the ODE is some combination , and the two arbitrary constants are exactly what is needed to match two initial or boundary conditions.
Worked example
Solve the initial value problem with , .
Step 1. Write the auxiliary equation: .
Step 2. Factor: . These are real and distinct, so Case 1 applies and the general solution is .
Step 3. Apply : .
Step 4. Differentiate and apply . Since , we get .
Step 5. Solve the pair of equations. From Step 3, . Substituting into Step 4: , and then .
Step 6. Write the particular solution and check it. . Check: ✓; , so ✓. Substituting back into the ODE, ✓.
The particular solution is .
Common traps
- Forgetting the extra factor of for a repeated root — writing instead of silently collapses two constants into one.
- Mixing up and from complex roots : multiplies the exponential envelope , multiplies inside and .
- Losing a sign under the square root when , writing a real-root form for what is actually a complex-root case.
- Applying initial conditions to before differentiating, or dropping the product rule when differentiating terms.
Ask the tutor: Want to work through a higher-order auxiliary equation with mixed root types, or get your complementary function checked step by step?
Why does the guess y = e^(mx) work for every constant-coefficient linear ODE?
Because differentiating just multiplies it by each time, so every derivative in the ODE becomes a power of times the same factor. Substituting turns a differential equation into a plain polynomial equation in , since cancels out (it is never zero). This trick works for any order and any constant coefficients — the auxiliary equation is always the same polynomial with replaced by .
Why does a repeated root need an extra factor of x instead of just doubling the constant?
A single root used twice, as in , is really just — one function, one effective constant, not enough to match the two conditions a second-order ODE requires. Direct substitution shows also solves the ODE exactly when is a repeated root, and it is linearly independent of (their Wronskian is nonzero). So the correct pair is and , giving .
How do I know which of the three root cases applies without fully solving the quadratic?
Compute the discriminant first. If it is positive, expect two real distinct roots (Case 1); if it is exactly zero, expect one repeated real root (Case 2); if it is negative, expect a complex conjugate pair (Case 3). Checking the sign of the discriminant before grinding through the quadratic formula saves time and avoids the "lost sign under the square root" trap that silently turns a complex case into a wrong real-root answer.