JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Constant-Coefficient Equations

The friendliest of all linear ODEs: when the coefficients are just numbers, one guess turns the whole calculus problem into ordinary algebra. Solve the characteristic equation, read off real, repeated, or complex roots — and meet the Cauchy-Euler equation, which plays the same trick in disguise.

Why a number for a coefficient changes everything

The previous guide built the general theory of a linear ODE: the equation a_n(x) y^{(n)} + ... + a_1(x) y' + a_0(x) y = g(x), the linear differential operator L that packages the whole left-hand side, and the promise that the solutions of the homogeneous equation L[y] = 0 form a fundamental set — n independent building blocks whose combinations give every solution. That theory is general but abstract; it tells you the *shape* of the answer without handing you the answer. This guide is where it suddenly becomes concrete, for the single most important special case in all of applied mathematics: when the coefficients a_k are plain constants, not functions of x.

Why does that one restriction help so much? Because of a property of the exponential you have known since Volume I: the derivative of e^{r x} is r e^{r x}, the same function scaled by r. Differentiate it again and you get r^2 e^{r x}; again, r^3 e^{r x}. The exponential is the one function that survives differentiation unchanged in shape — each derivative just multiplies it by another factor of r. So if you feed y = e^{r x} into a constant-coefficient operator, every term comes out as (some power of r) times e^{r x}, the e^{r x} factors out, and what is left is pure algebra in r. The calculus evaporates. That is the whole idea, and the rest of this guide is just following it carefully.

The characteristic equation: calculus becomes a polynomial

Take the workhorse second-order homogeneous equation a y'' + b y' + c y = 0. Guess y = e^{r x}. Then y' = r e^{r x} and y'' = r^2 e^{r x}, so substituting gives a r^2 e^{r x} + b r e^{r x} + c e^{r x} = 0. Every term carries the common factor e^{r x}, which is never zero, so you may cancel it. What remains is a r^2 + b r + c = 0 — an ordinary quadratic in the number r. This is the characteristic equation (or auxiliary equation), and it is the heart of the method: a differential equation in y has been traded for a polynomial equation in r, the polynomial whose coefficients are exactly the coefficients of the ODE.

You can read the recipe straight off the equation without re-deriving it each time: replace y'' by r^2, y' by r, and y by 1 (which is r^0), and set the result to zero. A third-order equation y''' - 6 y'' + 11 y' - 6 y = 0 has characteristic equation r^3 - 6 r^2 + 11 r - 6 = 0. The order of the ODE becomes the degree of the polynomial, so an n-th order equation gives a degree-n polynomial with — counting multiplicity and complex roots — exactly n roots. Each root r hands you one exponential solution e^{r x}, and the master theorem from the last guide promises that n independent such pieces assemble the complete general solution.

a y'' + b y' + c y = 0          the constant-coefficient ODE
        |   guess y = e^{r x},  y' = r e^{r x},  y'' = r^2 e^{r x}
        v
(a r^2 + b r + c) e^{r x} = 0    every term carries e^{r x}
        |   divide by e^{r x}  (never zero)
        v
   a r^2 + b r + c = 0            the CHARACTERISTIC EQUATION

   rule of thumb:  y''  ->  r^2 ,   y'  ->  r ,   y  ->  1
The substitution y = e^{r x} cancels the exponential and leaves a plain polynomial in r — the calculus problem has become an algebra problem.

Cases 1 and 2 — real roots, distinct then repeated

The cleanest case is when the characteristic polynomial has real roots that are all different. Suppose y'' - 5 y' + 6 y = 0; the characteristic equation r^2 - 5 r + 6 = 0 factors as (r - 2)(r - 3) = 0, giving r = 2 and r = 3. Each root contributes its own exponential, and the general solution is their combination y = C_1 e^{2x} + C_2 e^{3x}, with two arbitrary constants — exactly the freedom a second-order equation carries. Are e^{2x} and e^{3x} genuinely independent, and not the same solution in disguise? The Wronskian from the last guide settles it: det([e^{2x}, e^{3x}; 2 e^{2x}, 3 e^{3x}]) = e^{5x} is never zero, so the two are linearly independent and form a fundamental set. In general, distinct real roots r_1, ..., r_k give the independent solutions e^{r_1 x}, ..., e^{r_k x}, added with their own constants.

Now a difficulty. Suppose the characteristic equation has a double root: y'' - 4 y' + 4 y = 0 gives r^2 - 4 r + 4 = (r - 2)^2 = 0, so r = 2 twice. The recipe offers only e^{2x} — and then offers e^{2x} again. But a second-order equation needs *two* independent solutions, and e^{2x} together with another copy of e^{2x} is just one solution counted twice; it cannot span the full solution space. You are short one building block, and you must find it.

The missing solution is x e^{2x} — the same exponential multiplied by x. You can see why it must appear by a limiting picture: with two nearly equal roots r and r + epsilon you have the pair e^{r x} and e^{(r + epsilon) x}, and the combination (e^{(r + epsilon) x} - e^{r x}) / epsilon is a perfectly good second solution. As epsilon shrinks to zero that difference quotient is exactly the derivative of e^{r x} with respect to r, which is x e^{r x}. The factor of x is the fossil left behind when two roots collide. So the general solution for a double root r is y = (C_1 + C_2 x) e^{r x}; for our example, y = (C_1 + C_2 x) e^{2x}.

Case 3 — complex roots and the birth of oscillation

The third case is where physics walks in. Suppose y'' + 2 y' + 5 y = 0; the characteristic equation r^2 + 2 r + 5 = 0 has discriminant 4 - 20 < 0, so the roots are complex: r = -1 + 2i and r = -1 - 2i, a conjugate pair alpha plus-or-minus i beta with alpha = -1 and beta = 2. Formally the solutions are still e^{r x}, but now the exponent is a complex number, and a solution e^{(-1 + 2i) x} is not something you can plot directly. We want real-valued solutions for a real-world problem, and the bridge that delivers them is one identity.

That identity is Euler's formula, e^{i theta} = cos(theta) + i sin(theta) — the deep link between the complex exponential and the trigonometric functions. Apply it: e^{(alpha + i beta) x} = e^{alpha x}(cos(beta x) + i sin(beta x)). The real and imaginary parts are each, separately, a real solution of the original real equation, and they are independent. So the conjugate pair of complex roots quietly hands you two real building blocks, e^{alpha x} cos(beta x) and e^{alpha x} sin(beta x), and the general solution is y = e^{alpha x}(C_1 cos(beta x) + C_2 sin(beta x)). For our example, y = e^{-x}(C_1 cos(2x) + C_2 sin(2x)).

Read that solution physically and the whole subject lights up. The sine and cosine are an oscillation at angular frequency beta; the factor e^{alpha x} is an envelope that shrinks the swings when alpha < 0 and grows them when alpha > 0. This is precisely a damped harmonic oscillator — a mass on a spring with friction, a pendulum losing energy, a struck bell fading to silence. The real part of the root sets the decay, the imaginary part sets the pitch. When the roots are purely imaginary (alpha = 0) the envelope is flat and you get undamped oscillation, pure cos and sin — the next guides build resonance and beats right on top of this picture.

The Cauchy-Euler equation: the same trick in disguise

There is one equation with *variable* coefficients that still bends to almost the same method, and it is worth meeting now because it appears constantly — in Laplace's equation in polar and spherical coordinates, in problems with a natural scale. It is the Cauchy-Euler equation, a x^2 y'' + b x y' + c y = 0, recognizable by a signature pattern: each derivative is multiplied by the matching power of x — x^2 with y'', x^1 with y', x^0 with y. That pairing is exactly what makes the trick work, because x^k times the k-th derivative of a power of x lands you back on a power of the same degree.

So instead of guessing an exponential, you guess a power: y = x^m. Then x y' = m x^m and x^2 y'' = m(m-1) x^m, and substituting and cancelling the common x^m leaves a m(m-1) + b m + c = 0 — again a polynomial, this time the indicial equation in m. The three cases echo the constant-coefficient ones exactly: distinct real roots m_1, m_2 give x^{m_1} and x^{m_2}; a repeated root m gives x^m and (ln x) x^m, where ln x plays the role that x played before; and a complex pair alpha plus-or-minus i beta gives x^alpha cos(beta ln x) and x^alpha sin(beta ln x). The logarithm is no accident — the substitution x = e^t turns the Cauchy-Euler equation into a constant-coefficient equation in t, and ln x is just t coming home.

  1. Identify the form. Confirm the equation is constant-coefficient (a y'' + b y' + c y = 0) or Cauchy-Euler (a x^2 y'' + b x y' + c y = 0); the matching x-powers are the tell for the latter.
  2. Make the right guess. For constant coefficients try y = e^{r x}; for Cauchy-Euler try y = x^m. Substitute, cancel the common factor, and read off the polynomial — the characteristic equation in r, or the indicial equation in m.
  3. Sort the roots into the three cases. Real and distinct: combine the bare pieces. Repeated to multiplicity m: multiply by 1, x, ..., x^{m-1} (constant case) or 1, ln x, ..., (ln x)^{m-1} (Euler case). Complex alpha plus-or-minus i beta: form the real envelope-times-oscillation pair via Euler's formula.
  4. Assemble and pin down. Add the independent pieces with one arbitrary constant each to get the general solution, then impose any initial or boundary conditions to fix the constants.

What you have, and what comes next

Step back and notice how complete this is. For *any* homogeneous linear ODE with constant coefficients, of any order, you now have a finished procedure: write the characteristic polynomial, find its roots, and translate each root into its building block by the three-case dictionary. There is no guessing left, no integration to do — only root-finding. That is a remarkable thing to be able to say about a differential equation, and it is exactly why constant-coefficient equations are the bedrock on which the rest of this rung is built.

Two honest caveats keep this in perspective. First, all of this solves only the homogeneous equation L[y] = 0; when a driving term g(x) is present — a force pushing the oscillator, a voltage source in the circuit — you still need a particular solution to add on, which is the job of the method of undetermined coefficients and variation of parameters in the guides ahead. Second, the whole edifice rests on root-finding, and beyond degree four there is in general no formula for the roots, so high-order equations send you to numerical root-finders; the *method* stays exact, but the arithmetic may not. With those provisos, you have mastered the cleanest corner of differential equations — and you are ready to push the oscillator and watch resonance appear.