In short

A second-order homogeneous linear ODE with constant coefficients has the form ay'' + by' + cy = 0. Replace y with e^{mx}, and the entire differential equation collapses to a quadratic in m — the characteristic equation. Its roots (distinct real, repeated, or complex) determine the general solution completely.

A spring hangs from a hook. You pull it down a few centimetres and let go. It oscillates — up, down, up, down — and you want a formula that tells you the spring's position at any time t.

Physics says the acceleration of the spring is proportional to how far it is from its rest position, but in the opposite direction. If y(t) is the displacement, then

y'' = -ky

for some positive constant k. Rearranged: y'' + ky = 0. That is a differential equation — an equation where the unknown is not a number but a function, and it involves the function's own derivatives. It is second order because the highest derivative is y''. It is homogeneous because the right-hand side is zero. And the coefficients (1 in front of y'', 0 in front of y', and k in front of y) are constants — they do not depend on x or t.

Every equation of this type can be solved by a single trick: guess that the answer is an exponential, and see what happens. That guess turns the calculus problem into an algebra problem — specifically, a quadratic equation, which you already know how to solve.

The general form

The most general version of what you are solving is

ay'' + by' + cy = 0

where a, b, c are real constants and a \neq 0. The equation is linear because y and its derivatives appear only to the first power (no y^2, no y \cdot y'). It is homogeneous because the right side is 0 — there is no external forcing term.

Before finding solutions, there is one structural fact worth knowing: if y_1 and y_2 are both solutions, then so is c_1 y_1 + c_2 y_2 for any constants c_1, c_2. This is the principle of superposition, and it works precisely because the equation is linear and homogeneous. Check it: if you plug c_1 y_1 + c_2 y_2 into the left side, each derivative distributes across the sum, and the constants pull out. You get c_1(ay_1'' + by_1' + cy_1) + c_2(ay_2'' + by_2' + cy_2) = c_1 \cdot 0 + c_2 \cdot 0 = 0.

This means finding two independent solutions is enough — every other solution is some combination of them. The expression y = c_1 y_1 + c_2 y_2 is called the general solution. The two arbitrary constants c_1 and c_2 are pinned down when you are given initial conditions (like y(0) = 3 and y'(0) = -1).

The exponential guess

Here is the key idea. Guess that the solution has the form y = e^{mx} for some constant m that you need to find. Why this guess? Because the exponential function has a remarkable property: every derivative of e^{mx} is a constant multiple of e^{mx} itself. Specifically,

y = e^{mx}, \quad y' = me^{mx}, \quad y'' = m^2 e^{mx}

Now substitute into ay'' + by' + cy = 0:

a \cdot m^2 e^{mx} + b \cdot m \cdot e^{mx} + c \cdot e^{mx} = 0

Factor out e^{mx}:

e^{mx}(am^2 + bm + c) = 0

Since e^{mx} is never zero (no matter what m or x is), the only way this equation holds is if

am^2 + bm + c = 0

That is a quadratic equation in m. It is called the characteristic equation (or auxiliary equation) of the differential equation.

Characteristic equation

Given the ODE ay'' + by' + cy = 0, the characteristic equation is

am^2 + bm + c = 0

obtained by replacing y'' with m^2, y' with m, and y with 1 (equivalently, by substituting y = e^{mx} and dividing through by e^{mx}). Its roots determine the form of the general solution.

The quadratic am^2 + bm + c = 0 has discriminant D = b^2 - 4ac, and there are exactly three cases — the same three you met when studying quadratics. Each one produces a different form of solution.

Case 1: Two distinct real roots

When D > 0, the characteristic equation has two distinct real roots m_1 and m_2. Each gives a solution: y_1 = e^{m_1 x} and y_2 = e^{m_2 x}. These two functions are independent (one is not a constant multiple of the other, because m_1 \neq m_2). So the general solution is

y = c_1 e^{m_1 x} + c_2 e^{m_2 x}

This is the simplest case, and it covers most of the examples you meet first.

Example 1: Distinct real roots — y'' − 5y' + 6y = 0

Step 1. Write the characteristic equation by replacing y'' \to m^2, y' \to m, y \to 1:

m^2 - 5m + 6 = 0

Why: the coefficients of the ODE transfer directly to the characteristic equation.

Step 2. Factor the quadratic.

m^2 - 5m + 6 = (m - 2)(m - 3) = 0

Why: you need two numbers that multiply to 6 and add to -5. Those are -2 and -3.

Step 3. Read off the roots: m_1 = 2, m_2 = 3.

Why: each root gives one exponential solution.

Step 4. Write the general solution:

y = c_1 e^{2x} + c_2 e^{3x}

Why: superposition — any linear combination of the two independent solutions is also a solution.

Step 5. Verify. Take the e^{2x} part: y_1 = e^{2x}, y_1' = 2e^{2x}, y_1'' = 4e^{2x}. Plug in: 4e^{2x} - 5(2e^{2x}) + 6e^{2x} = (4 - 10 + 6)e^{2x} = 0. Correct.

Why: always verify — it is the fastest way to catch sign errors.

Result: y = c_1 e^{2x} + c_2 e^{3x}.

The dashed curves are the two basis solutions $e^{2x}$ and $e^{3x}$. The solid red curve is one particular combination $2e^{2x} - e^{3x}$ — it too satisfies the ODE. Every solution is a blend of the two exponentials.

The two dashed curves are the building blocks. Every solution of y'' - 5y' + 6y = 0 is obtained by mixing these two exponentials in some proportion — the constants c_1 and c_2 control the blend.

Case 2: Repeated real root

When D = 0, the characteristic equation has a single repeated root m_1 = m_2 = -b/(2a). You get one solution y_1 = e^{m_1 x}, but now you need a second, independent solution to fill the general solution.

The natural guess — try e^{m_1 x} again — obviously gives the same function. So try something slightly different: y_2 = x e^{m_1 x}. Multiply the exponential by x. Does this work?

Check it. Let m = m_1 be the repeated root, so am^2 + bm + c = 0 and also 2am + b = 0 (since m is a double root, the derivative of the characteristic polynomial also vanishes at m). Now compute:

y_2 = xe^{mx}
y_2' = e^{mx} + mxe^{mx} = (1 + mx)e^{mx}
y_2'' = me^{mx} + m(1 + mx)e^{mx} = (2m + m^2 x)e^{mx}

Plug into ay_2'' + by_2' + cy_2:

a(2m + m^2 x)e^{mx} + b(1 + mx)e^{mx} + c \cdot x e^{mx}
= e^{mx}\big[(am^2 + bm + c)x + (2am + b)\big]

The first bracket is zero because m is a root of the characteristic equation. The second bracket is zero because m is a repeated root. So y_2 = xe^{mx} is indeed a solution.

The general solution in the repeated-root case is

y = (c_1 + c_2 x)e^{mx}

The factor (c_1 + c_2 x) is a straight line multiplied by the exponential — a linear polynomial times an exponential.

Example 2: Repeated root — y'' − 4y' + 4y = 0

Step 1. Write the characteristic equation:

m^2 - 4m + 4 = 0

Why: same rule — coefficients of y'', y', y become coefficients of m^2, m, 1.

Step 2. Factor:

m^2 - 4m + 4 = (m - 2)^2 = 0

Why: the discriminant is 16 - 16 = 0, confirming a repeated root.

Step 3. The repeated root is m = 2.

Why: both factors give the same value.

Step 4. Write the general solution using the repeated-root template:

y = (c_1 + c_2 x)e^{2x}

Why: e^{2x} alone is one solution; xe^{2x} is the second, independent solution.

Step 5. Verify the second solution y_2 = xe^{2x}. Compute y_2' = e^{2x} + 2xe^{2x} = (1+2x)e^{2x} and y_2'' = 2e^{2x} + 2(1+2x)e^{2x} = (4+4x)e^{2x}. Plug in: (4+4x)e^{2x} - 4(1+2x)e^{2x} + 4xe^{2x} = (4+4x-4-8x+4x)e^{2x} = 0. Correct.

Why: the algebra confirms the structural argument — both the characteristic polynomial and its derivative vanish at m = 2.

Result: y = (c_1 + c_2 x)e^{2x}.

The dashed curves are the two basis solutions $e^{2x}$ and $xe^{2x}$. The solid red curve is one particular combination $(1-x)e^{2x}$ — notice how it dips below zero near $x = 1$ before the exponential growth takes over. The extra factor of $x$ in $xe^{2x}$ is what makes the two solutions genuinely different.

Compare this with Example 1. There the two exponentials grew at different rates (e^{2x} vs e^{3x}), producing two clearly distinct curves. Here both solutions are built from e^{2x}, but the factor of x in the second one changes its character — xe^{2x} starts at zero and initially grows more slowly, then catches up and eventually dominates because x \to \infty.

Case 3: Complex conjugate roots

When D < 0, the characteristic equation has no real roots. Its roots are a complex conjugate pair:

m = \alpha \pm i\beta

where \alpha = -b/(2a) and \beta = \sqrt{4ac - b^2}/(2a).

If you formally write the solution as e^{(\alpha + i\beta)x} and e^{(\alpha - i\beta)x}, these are complex-valued functions. To get real solutions (since the original equation has real coefficients and you want a real-valued function), use Euler's formula:

e^{i\theta} = \cos\theta + i\sin\theta

Then

e^{(\alpha + i\beta)x} = e^{\alpha x}(\cos\beta x + i\sin\beta x)

Taking the real and imaginary parts separately, the two real, independent solutions are

y_1 = e^{\alpha x}\cos\beta x, \qquad y_2 = e^{\alpha x}\sin\beta x

The general solution is

y = e^{\alpha x}(c_1 \cos\beta x + c_2 \sin\beta x)

This is an oscillation (\cos and \sin) multiplied by an exponential envelope (e^{\alpha x}). If \alpha < 0, the oscillations decay — like a spring slowing down due to friction. If \alpha = 0, the oscillations continue forever with constant amplitude — a spring with no friction. If \alpha > 0, the oscillations grow without bound.

Three cases of complex roots: decaying, pure, and growing oscillationThree side-by-side sketches showing oscillatory solutions. Left: alpha less than zero gives decaying oscillation inside a shrinking exponential envelope. Centre: alpha equals zero gives pure oscillation at constant amplitude. Right: alpha greater than zero gives growing oscillation inside an expanding exponential envelope. α < 0 decaying α = 0 pure oscillation α > 0 growing
Complex roots $\alpha \pm i\beta$ produce oscillatory solutions. The real part $\alpha$ controls the envelope: $\alpha < 0$ damps the oscillation, $\alpha = 0$ keeps it constant, and $\alpha > 0$ amplifies it. The imaginary part $\beta$ controls the frequency of oscillation.

The spring equation y'' + ky = 0 has characteristic equation m^2 + k = 0, giving m = \pm i\sqrt{k}. Here \alpha = 0 and \beta = \sqrt{k}, so the solution is y = c_1 \cos(\sqrt{k}\,x) + c_2 \sin(\sqrt{k}\,x) — pure oscillation with no decay. That is exactly the motion of an ideal spring with no friction.

Summary of the three cases

Discriminant D = b^2 - 4ac Roots General solution
D > 0 m_1, m_2 distinct real c_1 e^{m_1 x} + c_2 e^{m_2 x}
D = 0 m repeated (c_1 + c_2 x)e^{mx}
D < 0 \alpha \pm i\beta complex e^{\alpha x}(c_1 \cos\beta x + c_2 \sin\beta x)

Three cases, three forms, one quadratic. The entire technique reduces a differential equation to the kind of algebra you learned in class 10.

Applying initial conditions

The general solution contains two arbitrary constants. To pin them down, you need two pieces of information — usually the initial conditions y(x_0) = y_0 and y'(x_0) = y_0'.

Take the spring equation y'' + 4y = 0. The characteristic equation is m^2 + 4 = 0, so m = \pm 2i. Here \alpha = 0, \beta = 2, and the general solution is

y = c_1 \cos 2x + c_2 \sin 2x

Suppose y(0) = 3 and y'(0) = -2. Plugging in x = 0:

y(0) = c_1 \cos 0 + c_2 \sin 0 = c_1 = 3

For y': y' = -2c_1 \sin 2x + 2c_2 \cos 2x, so

y'(0) = -2c_1 \sin 0 + 2c_2 \cos 0 = 2c_2 = -2 \implies c_2 = -1

The particular solution satisfying these initial conditions is y = 3\cos 2x - \sin 2x.

The particular solution $y = 3\cos 2x - \sin 2x$ of $y'' + 4y = 0$ with $y(0) = 3$ and $y'(0) = -2$. The oscillation has period $\pi$ and amplitude $\sqrt{10} \approx 3.16$.

Common confusions

Going deeper

If you came here to learn the characteristic equation method and use it, you have everything you need — you can stop here. What follows is for readers who want to understand why the method works at a deeper level, and what happens when coefficients are not constant.

Why the exponential guess is not really a guess

The substitution y = e^{mx} might look like inspired guessing. It is not. Here is the deeper reason it works.

The operator D = d/dx turns differentiation into algebra. Write Dy = y' and D^2 y = y''. Then the ODE ay'' + by' + cy = 0 becomes

(aD^2 + bD + c)y = 0

The expression aD^2 + bD + c is a polynomial in the operator D. The exponential e^{mx} is an eigenfunction of D — meaning D(e^{mx}) = me^{mx}. The operator just multiplies it by a constant. So applying the polynomial p(D) = aD^2 + bD + c to e^{mx} gives p(m) \cdot e^{mx}. Setting this to zero forces p(m) = 0 — the characteristic equation. The exponential guess is really saying: look for eigenfunctions of the differentiation operator.

When coefficients are not constant

The method of this article — replace derivatives with powers of m — works only when a, b, c are constants. If the coefficients depend on x — for example, x^2 y'' + xy' - y = 0 — the exponential substitution does not simplify things. Such equations (called Cauchy-Euler or Euler-Cauchy equations) require a different substitution: y = x^r. The characteristic equation that results is still a quadratic, but in r rather than m, and the solution involves powers of x instead of exponentials.

The Wronskian test for independence

How do you know that e^{m_1 x} and e^{m_2 x} are truly independent? The formal test uses the Wronskian determinant:

W = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = y_1 y_2' - y_2 y_1'

For y_1 = e^{m_1 x} and y_2 = e^{m_2 x}:

W = m_2 e^{(m_1+m_2)x} - m_1 e^{(m_1+m_2)x} = (m_2 - m_1)e^{(m_1+m_2)x}

Since m_1 \neq m_2 and e^{(m_1+m_2)x} \neq 0, the Wronskian is never zero — confirming the solutions are linearly independent. If they were not independent, the general solution c_1 y_1 + c_2 y_2 would really have only one free constant, not two, and could not account for all possible initial conditions.

The spring with friction

The equation y'' + 2\gamma y' + \omega_0^2 y = 0 models a spring with friction (damping coefficient \gamma, natural frequency \omega_0). The characteristic equation is m^2 + 2\gamma m + \omega_0^2 = 0, with discriminant D = 4\gamma^2 - 4\omega_0^2 = 4(\gamma^2 - \omega_0^2).

These three cases — the same three from the table — describe essentially all of classical vibration theory.

Where this leads next

You now know how to solve any second-order linear ODE with constant coefficients, as long as the right-hand side is zero. When the right-hand side is not zero — when there is an external forcing term — the equation is called non-homogeneous, and you need one more technique.