Second-Order Linear ODE with Constant Coefficients

April 13, 2026

Problem

Solve y'' - 5y' + 6y = 0. Find the characteristic roots r = 2, 3 and write the general solution y = C1 e^(2x) + C2 e^(3x).

Explanation

The general form

A homogeneous second-order linear ODE with constant coefficients has the form ay+by+cy=0,a,b,cR,  a0.a \, y'' + b \, y' + c \, y = 0, \qquad a, b, c \in \mathbb{R}, \; a \ne 0.

"Homogeneous" here means the right side is 00 (the #178 sense doesn't apply — different usage). "Constant coefficients" means a,b,ca, b, c don't depend on xx.

The whole method to solve these is one slick idea: guess y=erxy = e^{r x}. Because plugging that in gives ar2erx+brerx+cerx=erx(ar2+br+c)=0,a r^{2} e^{r x} + b r e^{r x} + c e^{r x} = e^{r x} (a r^{2} + b r + c) = 0, and erx0e^{r x} \ne 0, the equation collapses to the algebraic characteristic equation ar2+br+c=0\boxed{\, a r^{2} + b r + c = 0 \,}

Solve this quadratic for rr — three possible outcomes, three kinds of solutions. (Repeated roots are in #185; complex roots are in #184.) This problem focuses on the clean case of two real distinct roots.

The given equation

y5y+6y=0y'' - 5 y' + 6 y = 0

Coefficients a=1a = 1, b=5b = -5, c=6c = 6.

Step-by-step solution

Step 1 — Write the characteristic equation. r25r+6=0r^{2} - 5 r + 6 = 0

Step 2 — Solve it.

Factor: r25r+6=(r2)(r3)=0r^{2} - 5 r + 6 = (r - 2)(r - 3) = 0. r1=2,r2=3r_1 = 2, \quad r_2 = 3

(Or use the quadratic formula: r=(5±2524)/2=(5±1)/2r = (5 \pm \sqrt{25 - 24})/2 = (5 \pm 1)/2.)

Step 3 — Write the two basic solutions. y1=e2x,y2=e3xy_1 = e^{2 x}, \qquad y_2 = e^{3 x}

Step 4 — Combine into the general solution.

Because the ODE is linear and homogeneous, any linear combination of solutions is also a solution (see #200 on superposition). The general solution is y(x)=C1e2x+C2e3x\boxed{\, y(x) = C_1 \, e^{2 x} + C_2 \, e^{3 x} \,}

for arbitrary constants C1,C2C_1, C_2.

Verification

Differentiate y=C1e2x+C2e3xy = C_1 e^{2x} + C_2 e^{3x}: y=2C1e2x+3C2e3xy' = 2 C_1 e^{2x} + 3 C_2 e^{3x} y=4C1e2x+9C2e3xy'' = 4 C_1 e^{2x} + 9 C_2 e^{3x}

Plug into the ODE y5y+6yy'' - 5 y' + 6 y: 4C1e2x+9C2e3x5(2C1e2x+3C2e3x)+6(C1e2x+C2e3x)4 C_1 e^{2x} + 9 C_2 e^{3x} - 5(2 C_1 e^{2x} + 3 C_2 e^{3x}) + 6 (C_1 e^{2x} + C_2 e^{3x}) =C1e2x(410+6)+C2e3x(915+6)=0+0=0= C_1 e^{2x}(4 - 10 + 6) + C_2 e^{3x}(9 - 15 + 6) = 0 + 0 = 0 \quad\checkmark

The clean cancellation comes from the fact that each rr satisfies r25r+6=0r^2 - 5r + 6 = 0.

Why two arbitrary constants?

The ODE is order 2, so its general solution has a 2-parameter family. Geometrically, the solution space is a 2-dimensional vector space (over the reals), spanned by the basis {e2x,e3x}\{e^{2x}, e^{3x}\}.

Two pieces of data (typically an IVP y(x0)=ay(x_0) = a, y(x0)=by'(x_0) = b, or a BVP with boundary values at two endpoints) pin down C1C_1 and C2C_2.

Initial value problem

Say y(0)=0y(0) = 0 and y(0)=1y'(0) = 1. Then 0=C1+C20 = C_1 + C_2 1=2C1+3C21 = 2 C_1 + 3 C_2

From the first, C2=C1C_2 = -C_1. Substitute: 1=2C13C1=C1    C1=11 = 2 C_1 - 3 C_1 = -C_1 \implies C_1 = -1, C2=1C_2 = 1. y(x)=e2x+e3x=e2x(ex1).y(x) = -e^{2 x} + e^{3 x} = e^{2 x} (e^{x} - 1).

Check: y(0)=0y(0) = 0 ✓; y(x)=2e2x+3e3xy'(x) = -2 e^{2x} + 3 e^{3x}, y(0)=2+3=1y'(0) = -2 + 3 = 1 ✓.

The three cases of the characteristic equation

Let the discriminant be Δ=b24ac\Delta = b^{2} - 4 a c. Then:

  • Δ>0\Delta > 0: two real distinct roots r1,r2r_1, r_2. General solution y=C1er1x+C2er2xy = C_1 e^{r_1 x} + C_2 e^{r_2 x}. (This problem. Also #183.)
  • Δ=0\Delta = 0: repeated real root rr. General solution y=(C1+C2x)erxy = (C_1 + C_2 x) e^{r x}. (See #185.)
  • Δ<0\Delta < 0: complex conjugate roots α±iβ\alpha \pm i \beta. General solution y=eαx(C1cosβx+C2sinβx)y = e^{\alpha x}(C_1 \cos \beta x + C_2 \sin \beta x). (See #184.)

Pattern: you always get exactly dim=2\dim = 2 linearly independent solutions, but their form depends on which case the discriminant falls into.

Stability at a glance

Just by looking at the roots you can predict long-term behaviour:

  • Both r<0r < 0: solutions decay to 00 — stable.
  • Both r>0r > 0: solutions grow unboundedly — unstable.
  • One r>0r > 0, one r<0r < 0: saddle — generic initial data blows up, but a 1-parameter family of initial data decays.

For our problem r=2,3r = 2, 3 — both positive, so every non-trivial solution grows exponentially. No equilibrium other than y0y \equiv 0.

Common mistakes

  • Forgetting to divide by aa. If a1a \ne 1, the characteristic equation is r2+(b/a)r+(c/a)=0r^{2} + (b/a) r + (c/a) = 0, not r2+br+cr^{2} + b r + c. (Or keep aa and solve ar2+br+c=0a r^{2} + b r + c = 0 directly — either way, don't drop aa.)
  • Using only one constant. A second-order linear ODE needs two arbitrary constants in its general solution.
  • Plugging in before solving for CC. Apply initial conditions after you have the general solution with both constants.
  • Treating non-distinct roots the same way. If r1=r2r_1 = r_2, then er1xe^{r_1 x} and er2xe^{r_2 x} are the same solution — you need to manufacture a second linearly independent one (it's xerxx \, e^{r x}, see #185).

Try it in the visualization

Slide the coefficients bb and cc and watch the discriminant cross zero. See the solution morph from two exponentials (Δ>0) into a repeated-root form (Δ=0) into oscillating exponentials (Δ<0). Each regime has a distinctly different shape.

Interactive Visualization

Parameters

-5.00
6.00
0.00
1.00
2.00
15.00
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 Linear ODE with Constant Coefficients | MathSpin