Second-Order ODE with Real Distinct Roots

April 13, 2026

Problem

Solve y'' - y = 0. Find characteristic roots r = plus or minus 1 and write the general solution y = C1 e^x + C2 e^(-x). Show both exponential modes and their hyperbolic-function recombination.

Explanation

Setup

The ODE yy=0y'' - y = 0 is the simplest "two real roots, opposite signs" example. It also happens to be the defining equation of the hyperbolic functions cosh\cosh and sinh\sinh, so there's more structure here than meets the eye.

Step-by-step solution

Step 1 — Characteristic equation. r21=0    (r1)(r+1)=0    r1=1,  r2=1r^{2} - 1 = 0 \implies (r - 1)(r + 1) = 0 \implies r_1 = 1, \; r_2 = -1

Discriminant Δ=04(1)(1)=4>0\Delta = 0 - 4(1)(-1) = 4 > 0, two real distinct roots.

Step 2 — General solution. y(x)=C1ex+C2ex\boxed{\, y(x) = C_1 \, e^{x} + C_2 \, e^{-x} \,}

Verification

y=C1ex+C2exy = C_1 e^{x} + C_2 e^{-x} y=C1exC2exy' = C_1 e^{x} - C_2 e^{-x} y=C1ex+C2exy'' = C_1 e^{x} + C_2 e^{-x}

So yy=(C1ex+C2ex)(C1ex+C2ex)=0y'' - y = (C_1 e^{x} + C_2 e^{-x}) - (C_1 e^{x} + C_2 e^{-x}) = 0. ✓

The two exponential modes

Any solution decomposes uniquely into two modes:

  • y1=exy_1 = e^{x}: the growing mode. r1=1>0r_1 = 1 > 0 drives exponential growth.
  • y2=exy_2 = e^{-x}: the decaying mode. r2=1<0r_2 = -1 < 0 drives exponential decay.

Every non-trivial solution eventually blows up (because the growing mode dominates) unless C1=0C_1 = 0, in which case the solution decays to 00. Setting C1=0C_1 = 0 requires precisely the right initial conditions — it's the stable manifold of the saddle at the origin. This is the defining feature of a "saddle" fixed point: one direction attracts, the other repels.

Recombination into hyperbolic functions

exe^{x} and exe^{-x} are one basis for the 2-d solution space. So are their sum and difference (halved): coshx=ex+ex2,sinhx=exex2.\cosh x = \frac{e^{x} + e^{-x}}{2}, \qquad \sinh x = \frac{e^{x} - e^{-x}}{2}.

So we can equivalently write y(x)=Acoshx+Bsinhxy(x) = A \cosh x + B \sinh x with A,BA, B a linear rebasing of C1,C2C_1, C_2 (A=C1+C2A = C_1 + C_2, B=C1C2B = C_1 - C_2).

When to prefer which basis?

  • Exponentials are natural for IVPs with boundary at ±\pm \infty (growing / decaying behaviour explicit).
  • Hyperbolics are natural for symmetric BVPs, e.g. y(L)=y(L)=1y(-L) = y(L) = 1 (even solution → pick B=0B = 0).

Our ODE's solution space is one two-dimensional vector space; {ex,ex}\{e^{x}, e^{-x}\} and {coshx,sinhx}\{\cosh x, \sinh x\} are just two different bases.

Initial value problem

y(0)=2y(0) = 2, y(0)=0y'(0) = 0.

Using the hyperbolic basis: y(0)=Acosh0+Bsinh0=A=2y(0) = A \cosh 0 + B \sinh 0 = A = 2 y(0)=Asinh0+Bcosh0=B=0y'(0) = A \sinh 0 + B \cosh 0 = B = 0 y(x)=2coshxy(x) = 2 \cosh x

Using the exponential basis (equivalent): 2=C1+C2,0=C1C2    C1=C2=12 = C_1 + C_2, \quad 0 = C_1 - C_2 \implies C_1 = C_2 = 1 y(x)=ex+ex=2coshx  y(x) = e^{x} + e^{-x} = 2 \cosh x \; \checkmark

Geometric picture — catenary and saddle

Catenary (hanging chain) is shaped like y=acosh(x/a)y = a \cosh(x/a) — solutions of y=y/a2y'' = y / a^2 with appropriate scaling. The mathematics of hanging cables, power lines, and arches all live in this one ODE.

In the phase plane (y,y)(y, y') the ODE y=yy'' = y becomes the 2D linear system y˙=v,v˙=y.\dot y = v, \quad \dot v = y. Eigenvalues are ±1\pm 1 — one positive, one negative — the classic saddle. Most initial conditions eventually go to \infty; only the 1-d stable manifold (the direction of exe^{-x} mode) gets pulled in to 00.

Contrast with y+y=0y'' + y = 0 (the harmonic oscillator)

A sign flip gives y+y=0y'' + y = 0, characteristic equation r2+1=0r^{2} + 1 = 0, roots r=±ir = \pm i. Pure imaginary roots ⇒ solutions are cosx,sinx\cos x, \sin x (bounded oscillation, see #184). Same machinery, but the sign of the discriminant flips us from exponentials-that-blow-up to pure oscillations.

Common mistakes

  • Writing y=C1exC2exy = C_1 e^{x} - C_2 e^{-x} with a minus sign glued to C2C_2. The constants are arbitrary — you don't need a sign in front, just absorb it into C2C_2.
  • Thinking exponentials and hyperbolics are different solutions. They span the same space; it's just a change of basis.
  • Missing the stable/unstable split. For any saddle-type ODE there's a 1-d stable manifold of initial data that decays — worth finding explicitly.

Try it in the visualization

Slide C1,C2C_1, C_2 independently and watch the two exponential modes add up. Toggle the basis to {cosh,sinh}\{\cosh, \sinh\} to see the same solution written differently — especially useful for symmetric initial data.

Interactive Visualization

Parameters

1.00
1.00
2.50
8.00
exponential
phase plane (saddle)
Your turn

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.

Sign Up Free to Try It30 free visualizations every day
Second-Order ODE with Real Distinct Roots | MathSpin