Second-Order ODE with Complex Conjugate Roots
Problem
Solve y'' + 4y = 0. Find characteristic roots r = plus or minus 2i and write the real-valued general solution y = C1 cos(2x) + C2 sin(2x). Show the oscillation and its frequency.
Explanation
Setup
The ODE is the harmonic oscillator with angular frequency . Springs, pendulums (small-amplitude), LC circuits, and sound-wave equations all boil down to this shape.
Step-by-step solution
Step 1 — Characteristic equation.
Discriminant → complex conjugate roots.
Step 2 — Build the real general solution.
With roots the general real-valued solution is
Here , :
Why cos and sin, not ?
Technically the general complex solution is . Using Euler's formula :
For a real solution we need and , which forces . Writing recovers with .
That's the bridge from the complex algebra of the characteristic equation to the real-valued physical solution.
Verification
So . ✓
Amplitude–phase form
The same solution can be written as a single cosine with amplitude and phase : where
Expanding gives , — matching.
When to prefer which form?
- form is great for applying initial conditions cleanly (each IC plugs straight into one constant).
- Amplitude–phase form is great for reading off size of oscillation and timing relative to a reference.
Initial value problem
, .
Amplitude ; phase rad.
Physical interpretation — simple harmonic motion
describes a mass on a spring with no friction. Characteristic roots , so solutions are , with natural frequency
Our problem, , has , — the oscillation completes one full cycle every units of .
With damping —
If instead the ODE has a first-derivative term, , the roots are
- (under-damped): complex roots, , . Solution is an oscillation inside a decaying envelope.
- (critically damped): repeated real root, see #182/#185.
- (over-damped): real distinct roots, #183. No oscillation.
Our pure-oscillator is the un-damped limit (, ).
Common mistakes
- Writing as a final answer for a real problem. Complex exponentials are a useful intermediate, but the answer to a real ODE with real initial conditions should be real-valued.
- Confusing frequency with period . .
- Using with complex . is the imaginary part, not the magnitude.
- Dropping the envelope for damped oscillations. Pure oscillation only occurs when (roots on the imaginary axis).
Try it in the visualization
Slide (the coefficient of in the ODE) and watch the period shrink or grow. Enable damping to slide the roots off the imaginary axis — see the oscillation decay or explode. Overlay the amplitude–phase envelope to see where the peaks and zero-crossings land.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.