Reduction of Order

April 13, 2026

Problem

Given that y1 = e^x solves y'' - 2 y' + y = 0, find a second linearly independent solution using reduction of order. Show that y2 = x e^x emerges naturally.

Explanation

When reduction of order is the right tool

If you already know one solution y1(x)y_1(x) of a second-order linear homogeneous ODE, reduction of order lets you find a second, linearly independent solution y2(x)y_2(x) without guessing. It works for any second-order linear homogeneous ODE (constant or variable coefficients), making it more general than the characteristic-equation trick (#181–#185) which only handles constant coefficients.

The key idea: guess y2(x)=u(x) y1(x)y_2(x) = u(x) \, y_1(x) with uu non-constant and plug in. The ODE collapses from a 2nd-order equation on yy to a 1st-order equation on u′u' — hence the name, "reduction of order."

This also provides the cleanest derivation of why xerxx e^{r x} is the second solution at a repeated root (#185).

The given problem

y′′−2y′+y=0y'' - 2 y' + y = 0

Given that y1=exy_1 = e^{x} solves this. (You can verify: y1′′−2y1′+y1=ex−2ex+ex=0y_1'' - 2 y_1' + y_1 = e^{x} - 2 e^{x} + e^{x} = 0 ✓. The characteristic equation is (r−1)2=0(r - 1)^{2} = 0, so this is a repeated-root case with r=1r = 1.)

Step-by-step recipe

Step 1 — Ansatz.

Assume y2(x)=u(x) y1(x)=u(x) exy_2(x) = u(x) \, y_1(x) = u(x) \, e^{x} for some unknown function u(x)u(x).

Step 2 — Compute derivatives (product rule). y2′=u′ex+u ex=(u′+u)exy_2' = u' e^{x} + u \, e^{x} = (u' + u) e^{x} y2′′=(u′′+u′)ex+(u′+u)ex=(u′′+2u′+u)exy_2'' = (u'' + u') e^{x} + (u' + u) e^{x} = (u'' + 2 u' + u) e^{x}

Step 3 — Substitute into the ODE. y2′′−2y2′+y2=ex[(u′′+2u′+u)−2(u′+u)+u]y_2'' - 2 y_2' + y_2 = e^{x}\bigl[(u'' + 2 u' + u) - 2(u' + u) + u\bigr] =ex[u′′+2u′+u−2u′−2u+u]=ex⋅u′′.= e^{x}\bigl[u'' + 2 u' + u - 2 u' - 2 u + u\bigr] = e^{x} \cdot u''.

Setting this to zero: u′′=0.u'' = 0.

Integrate twice: u(x)=A+Bx,u(x) = A + B x, where A,BA, B are integration constants.

Step 4 — Assemble. y2(x)=u(x) ex=(A+Bx) ex.y_2(x) = u(x) \, e^{x} = (A + B x) \, e^{x}.

The constant term A exA \, e^{x} is just a scalar multiple of y1=exy_1 = e^{x} — it's not linearly independent. Throw it away (set A=0A = 0) and take the non-constant part B x exB \, x \, e^{x}. Pick B=1B = 1:  y2(x)=x ex \boxed{\, y_2(x) = x \, e^{x} \,}

Verification

y2=xexy_2 = x e^{x}, y2′=ex+xex=(1+x)exy_2' = e^{x} + x e^{x} = (1 + x) e^{x}, y2′′=ex+(1+x)ex=(2+x)exy_2'' = e^{x} + (1 + x) e^{x} = (2 + x) e^{x}.

Plug: y2′′−2y2′+y2=(2+x)ex−2(1+x)ex+xexy_2'' - 2 y_2' + y_2 = (2 + x) e^{x} - 2 (1 + x) e^{x} + x e^{x} =ex[(2+x)−2(1+x)+x]=ex[2+x−2−2x+x]=0.  ✓= e^{x} \bigl[(2 + x) - 2(1 + x) + x\bigr] = e^{x} \bigl[2 + x - 2 - 2 x + x\bigr] = 0. \; \checkmark

General solution

With both independent solutions in hand: y(x)=C1 ex+C2 x ex=(C1+C2x) ex.y(x) = C_1 \, e^{x} + C_2 \, x \, e^{x} = (C_1 + C_2 x) \, e^{x}.

Exactly the repeated-root form we claimed in #185, now derived rather than pulled from a table.

Why it always works — the structural reason

For a 2nd-order linear homogeneous ODE y′′+p(x)y′+q(x)y=0y'' + p(x) y' + q(x) y = 0 with known solution y1y_1, plug in y2=u y1y_2 = u \, y_1 and simplify. The coefficient of uu is y1′′+py1′+qy1=0y_1'' + p y_1' + q y_1 = 0 (since y1y_1 solves the ODE), which kills the uu-term. What survives is a 2nd-order linear ODE in uu with no uu term — equivalent to a 1st-order ODE in u′u': y1 u′′+(2y1′+py1) u′=0.y_1 \, u'' + (2 y_1' + p y_1) \, u' = 0.

Divide by y1y_1 (where y1≠0y_1 \ne 0): u′′+(2y1′y1+p)u′=0.u'' + \left( 2 \frac{y_1'}{y_1} + p \right) u' = 0.

Substitute w=u′w = u': w′+(2y1′y1+p)w=0.w' + \left( 2 \frac{y_1'}{y_1} + p \right) w = 0.

This is a first-order linear ODE in ww, solved by the integrating-factor formula: w(x)=u′(x)=Cy12(x)exp⁡ ⁣(−∫p(x) dx).w(x) = u'(x) = \frac{C}{y_1^{2}(x)} \exp\!\left( -\int p(x) \, dx \right).

Abel's formula emerges! Integrating u′u' gives uu, and y2=u y1y_2 = u \, y_1.

In our problem p(x)=−2p(x) = -2, y1=exy_1 = e^{x}, so y12=e2xy_1^{2} = e^{2x} and ∫p dx=−2x\int p \, dx = -2 x: u′(x)=Ce2xe2x=C  ⟹  u(x)=Cx+D.u'(x) = \frac{C}{e^{2x}} e^{2x} = C \implies u(x) = C x + D.

Giving y2=(Cx+D)exy_2 = (C x + D) e^{x} — same answer, via the general formula.

Variable-coefficient example

x2y′′+xy′−y=0,y1=x.x^{2} y'' + x y' - y = 0, \quad y_1 = x.

Cauchy-Euler (see #188). Indicial r2−1=0  ⟹  r=±1r^{2} - 1 = 0 \implies r = \pm 1, second solution y2=1/xy_2 = 1/x by inspection. Let's get it by reduction of order instead.

y2=u(x)⋅xy_2 = u(x) \cdot x. Then y2′=u′x+uy_2' = u' x + u, y2′′=u′′x+2u′y_2'' = u'' x + 2 u'. Substitute: x2(u′′x+2u′)+x(u′x+u)−ux=x3u′′+2x2u′+x2u′+xu−ux=x3u′′+3x2u′.x^{2} (u'' x + 2 u') + x (u' x + u) - u x = x^{3} u'' + 2 x^{2} u' + x^{2} u' + x u - u x = x^{3} u'' + 3 x^{2} u'.

Set to zero and divide by x2x^{2}: xu′′+3u′=0x u'' + 3 u' = 0, i.e. u′′=−(3/x)u′u'' = -(3/x) u'. Let w=u′w = u': w′/w=−3/x  ⟹  ln⁡∣w∣=−3ln⁡∣x∣+C  ⟹  w=C/x3w'/w = -3/x \implies \ln|w| = -3 \ln|x| + C \implies w = C/x^{3}. Integrate: u=−C/(2x2)+Du = -C/(2 x^{2}) + D. Take u=1/x2u = 1/x^{2} (dropping constants): y2=u⋅x=1x.  ✓y_2 = u \cdot x = \frac{1}{x}. \; \checkmark

Comparison to the limit derivation (for repeated roots)

In #185 we also derived xerxx e^{r x} as a limit of the distinct-roots formula: e(r+ε)x−erxε→ε→0x erx.\frac{e^{(r + \varepsilon) x} - e^{r x}}{\varepsilon} \xrightarrow{\varepsilon \to 0} x \, e^{r x}.

Reduction of order works without needing to perturb and take a limit — it's a direct algorithm. Both perspectives produce the same answer, but reduction of order is the preferred method in practice because it:

  1. Works for any known y1y_1, not just exponentials.
  2. Works for variable-coefficient ODEs.
  3. Doesn't require the perturbation setup.

Common mistakes

  • Trying y2=u⋅y1y_2 = u \cdot y_1 with uu constant. That just gives another multiple of y1y_1. The non-trivial content lives in the non-constant part of uu.
  • Forgetting to discard the redundant constant. After solving for uu, the part of uu that's a constant times y1/y1=1y_1 / y_1 = 1 just produces a multiple of y1y_1; drop it.
  • Algebra errors in the product rule. y2′′y_2'' has three terms from the second derivative of a product — plus u′′y1u'' y_1, 2u′y1′2 u' y_1', and uy1′′u y_1'' — and they combine with the ODE's py2′p y_2' and qy2q y_2 to produce the simplification. Track each piece.
  • Dividing by y1y_1 near its zeros. If y1y_1 has zeros inside your interval, the derivation breaks there and you need to work on connected sub-intervals where y1≠0y_1 \ne 0.

Try it in the visualization

Slide a "perturbation" parameter that moves the two roots of the characteristic equation apart. At the merged position, watch how the usual distinct-root solution bifurcates into the {erx,xerx}\{e^{r x}, x e^{r x}\} basis — reduction of order shown as a continuous limit.

Interactive Visualization

Parameters

1.00
1.00
1.00
0.30
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
Reduction of Order | MathSpin