Recipe
Solve a homogeneous second-order linear ODE
Use when: you have ay''+by'+cy=0 with constant coefficients, and the characteristic equation's roots are real — possibly repeated
Goal: the general solution y(x), whether the roots are distinct or repeated
Taught in Repeated real roots · extends Solve a homogeneous second-order linear ODE · a later section extends this recipe with more cases
Quick recipe
-
1
Replace y''\to r^2, y'\to r, and y\to1 to get ar^2+br+c=0.
Example
For y''-6y'+9y=0 (a=1,b=-6,c=9): r^2-6r+9=0.
Why: substituting the trial solution y=e^{rx} into the ODE and dividing out e^{rx} — never zero — collapses the differential equation to this single algebraic one.
-
2
Solve ar^2+br+c=0 for r; the discriminant b^2-4ac tells you which case you're in before you even factor.
Example
b^2-4ac=(-6)^2-4(1)(9)=36-36=0 — the repeated-root case. Factoring confirms it: r^2-6r+9=(r-3)^2=0, so r=3.
- b^2-4ac>0, two distinct real roots r_1\ne r_2 — use y=C_1e^{r_1x}+C_2e^{r_2x} below.
- b^2-4ac=0, one repeated real root r — use y=(C_1+C_2x)e^{rx} below.
- Not yet: b^2-4ac<0, a pair of complex conjugate roots — covered in Complex roots and Euler's formula
Why: the characteristic equation's roots are exactly the values of r for which e^{rx} solves the ODE, and the discriminant's sign is what decides which of the two real-root cases you're in.
-
3
Distinct roots give y=C_1e^{r_1x}+C_2e^{r_2x}; a repeated root r gives y=(C_1+C_2x)e^{rx}.
Example
With the repeated root r=3: y=(C_1+C_2x)e^{3x}.
Why: a repeated root only hands over one genuine exponential solution, e^{rx} — reduction of order (Chapter 6, section 10) is what produces the missing second solution xe^{rx}, never a second copy of e^{rx}.
-
4
If you're given y(x_0) and y'(x_0), substitute x_0 into both y and its derivative for whichever form you're using.
Example
For y(0)=2, y'(0)=1: y(0)=C_1=2. Since y'=C_2e^{3x}+3(C_1+C_2x)e^{3x}, y'(0)=C_2+3C_1=1.
Why: this turns the free constants into a system pinned down by the actual conditions of the problem, not just the equation.
-
5
Solve the resulting 2\times2 linear system for C_1,C_2, then substitute back into y.
Example
With C_1=2: C_2+3(2)=1, so C_2=-5. \boxed{y=(2-5x)e^{3x}}
Why: the general solution is a whole family of curves; the conditions pick out the one curve that actually matches the problem.
Common mistakes
- Writing y=C_1e^{rx}+C_2e^{rx} for a repeated root — that's the same function counted twice, not two independent solutions.
- Forgetting the factor of x on the second term once the root repeats.
- Checking the discriminant after writing the general solution instead of before — decide the case first.
- Reading off the characteristic equation before dividing out e^{rx}, which leaves a stray x-dependence in r.