Differential Equations · From First Principles

Homogeneous
Linear ODEs

A complete guide built from the ground up — intuition first, then the machinery. Every step shown, every idea connected.

a₂(x) y″ + a₁(x) y′ + a₀(x) y = 0
Scroll
01 — Foundation

What does linear mean?

A differential equation is a rule connecting a function to its own rates of change. The unknown is not a number — it is an entire curve y(x). The equation tells you how the function's value, its slope, and its curvature must relate to each other at every point simultaneously.

An equation is linear when y and all its derivatives appear only to the first power, are never multiplied together, and are never fed into functions like sin or eʸ. The coefficients can depend freely on x — that is fine.

General nth-order linear ODE
aₙ(x)y⁽ⁿ⁾ + aₙ₋₁(x)y⁽ⁿ⁻¹⁾ + ··· + a₁(x)y′ + a₀(x)y = g(x)
The Superposition Principle

Linearity gives you a superpower: if y₁ and y₂ are both solutions to a homogeneous linear ODE, then c₁y₁ + c₂y₂ is also a solution for any constants c₁, c₂. You can add and scale solutions freely. This is the structural backbone of everything that follows.

Interactive — Linearity Classifier

Click any equation to see why it is or is not linear.

02 — The Key Split

Why g(x) = 0 means no external driving

Think of the left side as a machine — the operator L — that processes the function y through its own internal rule. The right side g(x) is entirely separate: it does not involve y at all. It is a prescribed function sitting there, pushed in from outside.

The equation Ly = g(x) says: the system's internal dynamics, acting on y, must match this external input at every moment. When g(x) = 0, the external prescription vanishes. The equation becomes Ly = 0, meaning the system is in balance with itself — no outside agent is present. This is the natural response.

Homogeneous

Ly = 0

No external term. The system evolves entirely under its own internal rules. g(x) = 0 is not just zero on the right — it means no external function exists in the equation at all.

Nonhomogeneous

Ly = g(x)

An external function is present, driving the system. Without g(x) the equation could never produce this output on its own. The solution gains a forced component on top of the natural one.

Animated — Free vs Forced Spring
Free — homogeneous
my″ + by′ + ky = 0
Forced — nonhomogeneous
my″ + by′ + ky = A cos(ωt)
1.20
03 — The Big Picture

Solution space as a vector space

A second-order ODE involves y″, which means two integrations are needed to recover y. Each introduces one free constant. The general solution must therefore contain exactly two arbitrary constants — you need two independent building blocks.

This is not a coincidence. The set of all solutions to a homogeneous linear ODE forms a vector space — the same structure as the null space {x : Ax = 0} in matrix algebra. Just as a null space needs a basis, the solution space needs linearly independent solutions.

Linear Algebra

Ax = 0

Matrix operator on a vector. Solutions form the null space, spanned by n basis vectors.

Same Structure

Ly = 0

Differential operator on a function. Solutions form a function space, spanned by n independent solutions.

Payoff

y = c₁y₁ + c₂y₂

The general solution is any linear combination of the basis functions — identical pattern to vectors.

Why this matters

This is not an analogy — it is the same mathematics. Functions are vectors in an infinite-dimensional space. Differential operators are linear maps. The entire theory of linear ODEs is linear algebra with functions instead of arrows.

04 — Testing Independence

The Wronskian

Two functions are linearly independent if one is not just a constant multiple of the other. If they are dependent you effectively have one direction in the solution space, not two — and you cannot span the full general solution.

The Wronskian is defined as the determinant of a matrix built from the two candidate solutions and their derivatives:

W(y₁, y₂) = det
y₁
y₂
y₁′
y₂′
= y₁y₂′ − y₂y₁′
Row 1
The functions themselves — evaluated at x
Row 2
Their first derivatives — also at x
det ≠ 0
Functions are linearly independent

The geometric intuition: in 2D linear algebra, the determinant of two column vectors measures the area of the parallelogram they span. If that area is zero, the vectors point in the same direction — they are dependent. The Wronskian is the exact same test applied to functions — treat each function as a "direction" in solution space. If W ≠ 0 at any point on the interval, the functions are independent and form a valid basis.

Interactive — Wronskian Calculator

Select a pair of functions to compute the Wronskian step by step.

05 — The Key Trick

Why try y = erx?

For constant-coefficient equations, we need a function that survives differentiation intact — one where taking the derivative just multiplies by a constant without changing the shape. Exponentials are the only such class:

y = eʳˣ → y′ = r·eʳˣ → y″ = r²·eʳˣ

Every derivative is still eʳˣ, just scaled by a power of r. When you substitute into ay″ + by′ + cy = 0, every term shares the factor eʳˣ:

a(r²eʳˣ) + b(reʳˣ) + c(eʳˣ) = eʳˣ(ar² + br + c) = 0

Since eʳˣ is never zero, divide it out. The entire differential equation collapses to a quadratic in r — the characteristic equation. Calculus becomes algebra.

Animated — The Derivative Cascade

Watch what happens when you differentiate eʳˣ repeatedly. Drag the slider to change r.

1.0
06 — Three Outcomes

The three root cases

Once you solve ar² + br + c = 0, the discriminant b² − 4ac tells you what kind of roots you have. Each type produces a fundamentally different solution shape — and a different physical behavior.

When b² − 4ac > 0, the two roots r₁ ≠ r₂ are both real. Each gives an independent exponential solution:

y = c₁eʳ¹ˣ + c₂eʳ²ˣ

The physical behavior is pure exponential growth or decay (or a combination), depending on the signs of the roots. No oscillation.

Interactive — Distinct Real Roots

Solve y″ + by′ + cy = 0. Drag sliders to change b and c and see the solution shape update in real time.

-5.0
6.0
Roots

When b² − 4ac = 0, there is one repeated root r. A single eʳˣ gives only one solution — a scaled copy of itself is dependent. The second independent solution is xeʳˣ.

y = c₁eʳˣ + c₂xeʳˣ = eʳˣ(c₁ + c₂x)

You can verify xeʳˣ is a solution: substitute it back in and every term cancels. The x factor provides the independence without changing the fundamental exponential character.

Interactive — Repeated Root
-1.0
1.0
1.0
Solution

When b² − 4ac < 0, the roots are a complex conjugate pair α ± βi. Euler's formula converts the complex exponentials to real-valued solutions:

y = eᵅˣ(c₁ cos βx + c₂ sin βx)

The eᵅˣ factor is the envelope — it controls growth (α > 0), decay (α < 0), or stays at 1 (α = 0). The cos and sin provide the oscillation at frequency β.

Interactive — Complex Roots (Oscillation)
-0.30
2.0
y = eᵅˣ cos βx y = eᵅˣ sin βx envelope ±eᵅˣ
07 — Pinning Down a Solution

Initial Value Problems

The general solution contains two free constants c₁ and c₂. Initial conditions pin down which specific solution matches the physical situation. You need exactly two: one for y and one for y′, both evaluated at a starting point x₀.

The workflow: find the general solution → differentiate it → evaluate both at x₀ → solve the 2×2 linear system for c₁ and c₂.

Interactive — IVP Solver

Enter the equation y″ + by′ + cy = 0 and initial conditions. Every step is shown.

08 — The Complete Map

Everything connected

Every concept in this guide is one part of a single coherent machine. The theory explains the why; the characteristic equation method delivers the how.

Concept What it answers Key test
Linear ODE Can solutions be freely added and scaled? y, y′ appear to first power only, not multiplied
Homogeneous (g = 0) Is there any external driving present? Right-hand side is identically zero
n independent solutions How many basis functions does the solution space need? Equals the order of the ODE
Wronskian Are two candidate solutions truly independent? W = y₁y₂′ − y₂y₁′ ≠ 0
Characteristic equation What r makes eʳˣ a solution? ar² + br + c = 0
Three root cases What shape does the solution take? Sign of discriminant b² − 4ac
Initial conditions Which specific solution matches this physical state? Solve 2×2 system for c₁, c₂
The Unifying Thread

Linearity gives superposition. Homogeneity means no forcing. The solution space is a vector space requiring n basis functions. The Wronskian tests independence of candidates. The characteristic equation finds those candidates efficiently for constant coefficients. Initial conditions select one from the family. Each idea feeds the next — none are optional.