Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Solve a homogeneous second-order linear ODE

Use when: you have any equation of the form ay''+by'+cy=0 with constant coefficients a,b,c

Goal: the general, real-valued solution y(x), covering every possible characteristic-root outcome

Taught in Complex roots and Euler's formula · extends Solve a homogeneous second-order linear ODE

  1. 1

    Replace y''\to r^2, y'\to r, and y\to1 to get ar^2+br+c=0.

    Example

    For y''+2y'+5y=0 (a=1,b=2,c=5): r^2+2r+5=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. 2

    Solve ar^2+br+c=0 for r; the discriminant b^2-4ac tells you which of the three cases you're in before you finish factoring.

    Example

    b^2-4ac=2^2-4(1)(5)=4-20=-16<0 — the complex-pair case. The quadratic formula gives r=\dfrac{-2\pm\sqrt{-16}}{2}=-1\pm2i, so \alpha=-1, \beta=2.

    • 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.
    • b^2-4ac<0, a complex conjugate pair r=\alpha\pm\beta i — use y=e^{\alpha x}(C_1\cos\beta x+C_2\sin\beta x) below.

    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 three cases you're in — there is no fourth case.

  3. 3

    Distinct real roots give y=C_1e^{r_1x}+C_2e^{r_2x}; a repeated root r gives y=(C_1+C_2x)e^{rx}; a complex pair \alpha\pm\beta i gives y=e^{\alpha x}(C_1\cos\beta x+C_2\sin\beta x).

    Example

    With \alpha=-1, \beta=2: y=e^{-x}(C_1\cos2x+C_2\sin2x).

    Why: distinct roots make the two exponentials automatically independent; a repeated root needs reduction of order's extra factor of x (Chapter 6, section 10); a complex pair's raw complex exponentials get split into real and imaginary parts by Euler's formula — this section's own technical block — because the original equation's real coefficients guarantee each part is separately a real solution.

  4. 4

    If you're given y(x_0) and y'(x_0), substitute x_0 into both y and its derivative for whichever of the three forms you're using.

    Example

    For y(0)=1, y'(0)=1: y(0)=C_1=1. Since y'=e^{-x}[(-C_1+2C_2)\cos2x+(-C_2-2C_1)\sin2x], y'(0)=-C_1+2C_2=1.

    Why: this turns the free constants into a system pinned down by the actual conditions of the problem, not just the equation.

  5. 5

    Solve the resulting 2\times2 linear system for C_1,C_2, then substitute back into y.

    Example

    With C_1=1: -1+2C_2=1, so C_2=1. \boxed{y=e^{-x}(\cos2x+\sin2x)}

    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 instead of (C_1+C_2x)e^{rx}.
  • Stopping at the complex form y=C_1e^{(\alpha+\beta i)x}+C_2e^{(\alpha-\beta i)x} instead of converting to the real form via Euler's formula.
  • Mixing up \alpha (the exponential envelope's rate) and \beta (the oscillation's angular frequency) when reading a complex root pair.
  • Checking the discriminant after writing the general solution instead of before — decide the case first, every time.