Key takeaways
- Guess y = eʳˣ to get the characteristic equation ar² + br + c = 0.
- Two real roots: y = C₁e^(r₁x) + C₂e^(r₂x).
- Repeated root: y = (C₁ + C₂x)e^(rx). Don't forget the extra x.
- Complex roots α ± βi: y = e^(αx)[C₁cos(βx) + C₂sin(βx)], a fading or growing wave.
- This calculator always uses y(0) = 1 and y'(0) = 0.
In this guide
What is a second-order homogeneous ODE?
It is an equation with the second derivative y'' (acceleration), the first derivative y' (speed) and y itself, all adding up to zero. 'Homogeneous' means the right side is 0: there is no outside push.
Picture a weight on a spring. y is how far it is from its resting place. The spring pulls it back (the c·y term), friction slows it down (the b·y' term), and its mass resists changes in speed (the a·y'' term). Depending on the numbers, it either wobbles back and forth while fading, or slowly creeps back to rest.
Why does this equation matter?
Anything that can vibrate follows this equation: springs, pendulums, bridges, buildings in wind, guitar strings and electric circuits. The three kinds of roots match three real behaviours: slow settling, the fastest settling without overshoot, and bouncing.
Car makers tune shock absorbers using exactly this maths. Too little damping and the car bounces; too much and the ride feels stiff.
| Discriminant b² − 4ac | Roots | What you see |
|---|---|---|
| Positive | Two real roots | Slow return, no wobble (overdamped) |
| Zero | One repeated root | Fastest return with no wobble (critically damped) |
| Negative | Complex pair α ± βi | Wobbles that fade or grow (underdamped) |
The formula
| Symbol | What it means | Example |
|---|---|---|
| a | Coefficient of y'' (like mass). Cannot be 0 | 1 |
| b | Coefficient of y' (like friction) | 2 |
| c | Coefficient of y (like spring stiffness) | 5 |
| r | A root of the characteristic equation | −1 ± 2i |
| x | Where you want y, often time | 1 |
This calculator always uses the starting conditions y(0) = 1 and y'(0) = 0: start 1 unit away, at rest. It finds C₁ and C₂ for you and gives y at your chosen x. Angles in cos and sin are in radians.
How to solve it step by step
- 1Write the characteristic equation. Replace y'' with r², y' with r and y with 1:
ar² + br + c = 0. - 2Find the roots. Use the quadratic formula and check the discriminant.
- 3Pick the matching general solution. Two real roots, a repeated root or a complex pair (see the takeaways).
- 4Use the starting values. Put y(0) and y'(0) into the solution to find C₁ and C₂.
- 5Evaluate. Put in x to get the value of y.
Now enter your own a, b, c and x below. The calculator picks the right case and shows every constant.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Stopping at e^((α+βi)x). Turn complex roots into
e^(αx)cos(βx)ande^(αx)sin(βx)for a real answer. - Using degrees in cos and sin. The solution uses radians.
- Expecting other starting values. This calculator fixes y(0) = 1 and y'(0) = 0.
- Dividing by a = 0. Then it isn't second-order at all.
Tips and tricks
- No friction (b = 0):
y'' + y = 0givesy = cos xwith these starting values, a wave that never fades. - Repeated root check:
y'' + 2y' + y = 0has r = −1 twice, soy = (1 + x)e⁻ˣ, and y(1) = 2/e ≈ 0.7358. - First-order instead? Use the first-order linear ODE calculator.
Where you'll use it in real life
- Cars: tuning springs and shock absorbers for a smooth ride.
- Electronics: RLC circuits in radios and filters.
- Buildings and bridges: how structures sway and settle after wind or earthquakes.
- Music: vibrating strings and drum skins.
Quick summary
Guess y = eʳˣ to turn ay'' + by' + cy = 0 into ar² + br + c = 0. The discriminant tells you whether the solution creeps, settles fastest or wobbles, and the starting values fix the constants. Use the calculator above to solve any case starting from y(0) = 1, y'(0) = 0.
Worked example
A car's spring and shock absorber follow y'' + 2y' + 5y = 0, where y is the bounce height. The wheel is pushed down 1 unit and released at rest. Where is it after 1 second? Use a = 1, b = 2, c = 5 and x = 1.
- 01ODE: 1y'' + 2y' + 5y = 0
- 02Characteristic equation: 1r² + 2r + 5 = 0
- 03Discriminant = 2² − 4(1)(5) = -16
- 04Complex roots: r = -1 ± 2i
- 05General solution: y = e^(-1x)[C₁cos(2x) + C₂sin(2x)]
- 06With y(0)=1, y'(0)=0: C₁ = 1, C₂ = 0.5
- 07y(1) = 0.0142
These numbers are pre-filled in the calculator above.
Frequently asked questions
What does the discriminant tell me in a second-order ODE?
If b² − 4ac > 0, the solution is a mix of two exponentials (no wobble). If it equals 0, there is a repeated root. If it is negative, the solution oscillates like a wave.
How do I solve y'' − 3y' + 2y = 0?
The characteristic equation r² − 3r + 2 = 0 factors as (r − 1)(r − 2) = 0, so y = C₁eˣ + C₂e²ˣ. With y(0) = 1 and y'(0) = 0 you get C₁ = 2 and C₂ = −1.
What makes an oscillation die out?
With complex roots α ± βi, the factor e^(αx) controls size. If α is negative (which happens when b/a > 0), the wobble fades over time.
Can I change the starting values in the calculator?
No. It always uses y(0) = 1 and y'(0) = 0. For other starting values, use the same general solution and solve for C₁ and C₂ by hand.


