eleven9Silicon  ·  differential equations

Second-Order
Differential Equations

Real roots, complex roots, the characteristic equation — built from first principles with full geometric intuition.

What Are We Solving?

A second-order linear ODE with constant coefficients looks like:

$$a\,y'' + b\,y' + c\,y = 0$$

Let's break down every single symbol so nothing is mysterious:

SymbolMeaning
yThe unknown function we want to find — \(y = y(t)\), a function of time.
y′First derivative \(\frac{dy}{dt}\) — the rate of change of \(y\). Think: velocity.
y″Second derivative \(\frac{d^2y}{dt^2}\) — how fast the rate of change is changing. Think: acceleration.
a, b, cReal constants. They "weight" each term. They don't change with time.
= 0Homogeneous — no external forcing. The equation is self-contained.
Physical intuition
The equation says: some combination of how fast \(y\) is accelerating, how fast it is moving, and its current value must always sum to zero. This is the DNA of springs, electrical circuits (RLC), pendulums — anything with inertia and a restoring force.

A second-order ODE needs two initial conditions to pin down a unique solution — typically \(y(0)\) (initial position) and \(y'(0)\) (initial velocity). This is why the general solution will always have exactly two free constants.

Why Guess \(y = e^{rt}\)?

Before any formal machinery, ask a deeper question:

The Right Question
What kind of function, when you differentiate it and scale and add copies of itself, can possibly equal zero for all \(t\)?

For the equation \(a y'' + b y' + c y = 0\) to be satisfied everywhere, all three terms must live in the same family — so they can cancel each other. You need a function whose derivatives are just scaled copies of itself.

The only function with that property is the exponential:

$$\frac{d}{dt}\,e^{rt} = r\,e^{rt} \qquad \frac{d^2}{dt^2}\,e^{rt} = r^2\,e^{rt}$$

Each derivative gives back \(e^{rt}\), just scaled by a power of \(r\). This isn't a magical guess — it's the only structural choice that makes the cancellation possible. The ansatz (educated guess) \(y = e^{rt}\) is logically forced.

Write the guess: \(y = e^{rt}\), so \(y' = r e^{rt}\) and \(y'' = r^2 e^{rt}\).
Substitute into \(ay'' + by' + cy = 0\): \[a(r^2 e^{rt}) + b(r\,e^{rt}) + c(e^{rt}) = 0\]
Factor out \(e^{rt}\) — it is never zero, so divide both sides by it: \[e^{rt}\underbrace{(ar^2 + br + c)}_{\text{must be zero}} = 0\]

The Characteristic Equation

Dividing by \(e^{rt}\) converts our ODE into a plain quadratic in \(r\):

$$ar^2 + br + c = 0$$

This is the characteristic equation. The ODE — a calculus problem — has become an algebra problem. The roots \(r\) tell you the growth rates or oscillation frequencies baked into the system.

The quadratic formula gives the roots:

$$r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

The quantity \(\Delta = b^2 - 4ac\) is the discriminant. It's the fork in the road:

Case 1 — \(\Delta > 0\)

Two real distinct roots

Pure exponential behavior. No oscillation. The solution grows or decays monotonically (or a mix of both).

Case 2 — \(\Delta = 0\)

One repeated real root

The boundary case. The second independent solution picks up a factor of \(t\).

Case 3 — \(\Delta < 0\)

Complex conjugate roots

Oscillatory behavior. The imaginary part drives the wiggle; the real part controls decay or growth.

Real Distinct Roots (\(\Delta > 0\))

When \(\Delta > 0\), two distinct real roots \(r_1\) and \(r_2\) pop out of the quadratic formula. Each one gives a valid solution:

$$y_1 = e^{r_1 t}, \qquad y_2 = e^{r_2 t}$$

Why can you add them? — Superposition

The ODE is linear and homogeneous. That means if \(y_1\) satisfies the equation and \(y_2\) satisfies the equation, then so does any combination \(c_1 y_1 + c_2 y_2\). Let's verify this directly. Plug \(c_1 y_1 + c_2 y_2\) into the ODE:

$$a(c_1 y_1'' + c_2 y_2'') + b(c_1 y_1' + c_2 y_2') + c(c_1 y_1 + c_2 y_2)$$ $$= c_1\underbrace{(ay_1''+by_1'+cy_1)}_{=0} + c_2\underbrace{(ay_2''+by_2'+cy_2)}_{=0} = 0 \checkmark$$

Are they actually independent? — The Wronskian

Two solutions are linearly independent if one is not just a scalar multiple of the other. We check via the Wronskian determinant:

$$W(y_1, y_2) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = y_1 y_2' - y_2 y_1'$$

Plugging in:

$$W = e^{r_1 t}(r_2\,e^{r_2 t}) - e^{r_2 t}(r_1\,e^{r_1 t}) = (r_2 - r_1)\,e^{(r_1+r_2)t}$$

Since \(r_1 \neq r_2\), we have \(r_2 - r_1 \neq 0\), and \(e^{(r_1+r_2)t}\) is never zero. So \(W \neq 0\) everywhere — the solutions are linearly independent. ✓

General Solution — Real Distinct Roots
$$y = c_1\,e^{r_1 t} + c_2\,e^{r_2 t}$$

Two free constants \(c_1, c_2\) are determined by the initial conditions \(y(0)\) and \(y'(0)\).

What does the physics look like?

Each exponential either grows or decays depending on the sign of its root. If both roots are negative: both terms decay and the system settles. If one root is positive: the positive term eventually dominates and the solution blows up. This is an overdamped (or unstable) system.

Worked Example — Real Roots

Solve \(y'' - 5y' + 6y = 0\).

Write the characteristic equation: \(r^2 - 5r + 6 = 0\)
Factor: \((r-2)(r-3) = 0\), so \(r_1 = 2,\; r_2 = 3\). Both real, distinct. (\(\Delta = 25 - 24 = 1 > 0\) ✓)
Write the general solution: \[y = c_1\,e^{2t} + c_2\,e^{3t}\] Both roots positive → solution grows without bound. Unstable system.

Euler's Formula: Circles from Exponentials

When \(\Delta < 0\), the quadratic formula gives complex roots. To handle them, we need the most important identity in mathematics:

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

What does this mean? Let's go step by step. The exponential \(e^{i\theta}\) takes an imaginary number as input. Normally, \(e^x\) for real \(x\) just stretches or compresses along the real line. But when the input is imaginary, the exponential rotates in the complex plane.

At angle \(\theta\):

exponential
\(e^{i\theta}\)
oscillation in the plane
\(\cos\theta + i\sin\theta\)

Two immediately useful consequences:

$$\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2} \qquad \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}$$

These let us run the conversion in both directions. We'll need the forward direction next: turning a complex exponential into sines and cosines.

Complex Conjugate Roots (\(\Delta < 0\))

When \(\Delta = b^2 - 4ac < 0\), the square root produces an imaginary number. Define:

$$\alpha = \frac{-b}{2a} \quad \text{(real part)}, \qquad \beta = \frac{\sqrt{4ac - b^2}}{2a} \quad \text{(imaginary part, } \beta > 0\text{)}$$

So the two roots are \(r = \alpha \pm \beta i\). Let's name what these mean physically before we do anything else:

SymbolPhysical role
\(\alpha\)Decay/growth rate. If \(\alpha < 0\): solution decays to zero (damped). If \(\alpha > 0\): solution grows unboundedly. If \(\alpha = 0\): amplitude stays constant forever.
\(\beta\)Oscillation frequency. How many radians per unit time the solution wiggles. Higher \(\beta\) = faster wiggling.

Step 1 — Write the complex solutions

Each root gives a solution \(e^{(\alpha \pm \beta i)t}\). Using Euler's formula:

$$e^{(\alpha + \beta i)t} = e^{\alpha t}\cdot e^{i\beta t} = e^{\alpha t}\bigl(\cos\beta t + i\sin\beta t\bigr)$$ $$e^{(\alpha - \beta i)t} = e^{\alpha t}\cdot e^{-i\beta t} = e^{\alpha t}\bigl(\cos\beta t - i\sin\beta t\bigr)$$

Step 2 — Build real solutions by combining

Both complex exponentials are valid solutions, but they're complex-valued. We want real solutions. Use superposition: add them and subtract them:

$$\frac{u_1 + u_2}{2} = e^{\alpha t}\cos\beta t \qquad \text{(add and divide by 2)}$$ $$\frac{u_1 - u_2}{2i} = e^{\alpha t}\sin\beta t \qquad \text{(subtract and divide by } 2i\text{)}$$

These two new functions are:

So we have our two independent real solutions.

General Solution — Complex Roots
$$y = e^{\alpha t}\bigl(c_1\cos\beta t + c_2\sin\beta t\bigr)$$

where \(\alpha = \operatorname{Re}(r)\) and \(\beta = \operatorname{Im}(r)\). The exponential \(e^{\alpha t}\) is the envelope; the trig functions are the oscillation.

Geometric picture: a spiral

Think of this as two parts working together. The \(e^{\alpha t}\) is an envelope — an exponential shell that either squeezes the solution toward zero (if \(\alpha < 0\)) or stretches it outward (if \(\alpha > 0\)). Inside that envelope, \(c_1\cos\beta t + c_2\sin\beta t\) is pure oscillation, spinning at frequency \(\beta\). Together: a damped spiral in phase space.

\(\alpha < 0\)

Underdamped

Wiggles while decaying to zero. Classic RLC circuit, shock absorber. Envelope shrinks.

\(\alpha = 0\)

Undamped

Pure oscillation forever. No energy loss. Ideal spring in a vacuum. Amplitude constant.

\(\alpha > 0\)

Negatively damped

Oscillation grows unboundedly. Unstable system. Envelope expands.

Worked Example — Complex Roots

Solve \(y'' + 2y' + 5y = 0\).

Characteristic equation: \(r^2 + 2r + 5 = 0\)
Quadratic formula: \(r = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = \dfrac{-2 \pm \sqrt{-16}}{2} = -1 \pm 2i\)
Extract: \(\alpha = -1\), \(\beta = 2\). Since \(\alpha < 0\): damped oscillation.
General solution: \[y = e^{-t}(c_1\cos 2t + c_2\sin 2t)\] This wiggles at frequency 2 rad/s while the \(e^{-t}\) envelope drives the amplitude to zero.

The Full Map

Given \(ay'' + by' + cy = 0\), write \(ar^2 + br + c = 0\) and compute \(\Delta = b^2 - 4ac\):

Discriminant \(\Delta\) Roots General Solution Behavior
\(\Delta > 0\) \(r_1, r_2 \in \mathbb{R}\), distinct \(c_1 e^{r_1 t} + c_2 e^{r_2 t}\) Pure exponential
\(\Delta = 0\) \(r = -b/2a\) (repeated) \((c_1 + c_2 t)\,e^{rt}\) Exponential × polynomial
\(\Delta < 0\) \(r = \alpha \pm \beta i\) \(e^{\alpha t}(c_1\cos\beta t + c_2\sin\beta t)\) Oscillation with envelope
The One-Sentence Version
The characteristic equation \(ar^2 + br + c = 0\) is your ODE's fingerprint: its roots tell you whether the system exponentially charges or discharges (real roots), gently decays into oscillation (complex roots with negative real part), or resonates forever (purely imaginary roots).

Interactive Solver

Dial in the coefficients and initial conditions. The solver computes the roots, classifies the case, shows the closed-form solution with your exact constants, and plots \(y(t)\) — all in real time.

ay″ + by′ + cy = 0 — live solver
Complex roots
computing...