Differential Equations · Undergraduate

Power Series Solutions of Differential Equations

Quick answer

When an equation has variable coefficients, like y″ = xy, no formula built from exponentials will do. Instead, assume a power series y = Σ aₙxⁿ, substitute, shift indices so every sum uses xⁿ, and set the coefficient of each power to zero. The result is a recurrence relation that gives each coefficient from earlier ones. The first two, a₀ = y(0) and a₁ = y′(0), are free, and they split the answer into two independent solutions.

What you'll learn

  • Substitute a power series into a linear differential equation
  • Shift indices so that all sums share the same power of x
  • Derive and use a recurrence relation for the coefficients
  • Identify the two independent series solutions

Guessing a series

For y′′=xyy'' = xy, Airy’s equation, the coefficient xx rules out erxe^{rx}. Instead, assume a power series:

y=∑n=0∞anxn,y′=∑n=1∞nanxn−1,y′′=∑n=2∞n(n−1)anxn−2y = \sum_{n=0}^{\infty} a_nx^n, \qquad y' = \sum_{n=1}^{\infty} na_nx^{n-1}, \qquad y'' = \sum_{n=2}^{\infty} n(n - 1)a_nx^{n-2}

The plan:

  1. Substitute into the equation.
  2. Shift indices so that every sum has xnx^n.
  3. Set the coefficient of each power of xx to 00, giving a recurrence.
  4. Use the free constants a0=y(0)a_0 = y(0) and a1=y′(0)a_1 = y'(0) to build two solutions.

Why matching coefficients works

A power series equals zero on an interval only if every coefficient is zero, since the coefficients are the derivatives at 00 divided by factorials. So one equation between functions becomes infinitely many equations between numbers, one for each power of xx, and they can be solved in order. Each new coefficient depends only on earlier ones, which is why the first two can be chosen freely, as initial conditions.

Worked examples

Partial sums approaching e^(−x²/2) The solution y = e^(−x²/2) of Example 3, a bell-shaped curve, with two partial sums of its series. The two-term sum 1 − x²/2 is a downward parabola that matches only near 0. The three-term sum 1 − x²/2 + x⁴/8 follows the curve farther out before rising away. −3−2−1123−11xy
  • y = e^(−x²/2)
  • two terms
  • three terms
Partial sums approaching e^(−x²/2)

Common mistakes

Practice problems

  1. Find the recurrence for y′′−y=0y'' - y = 0.

    Answer

    an+2=an(n+2)(n+1)a_{n+2} = \tfrac{a_n}{(n + 2)(n + 1)}

    Full solution

    With a0=1,a1=0a_0 = 1, a_1 = 0 this gives cosh⁡x\cosh x; with a0=0,a1=1a_0 = 0, a_1 = 1, sinh⁡x\sinh x.

  2. Solve y′=yy' = y with y(0)=1y(0) = 1 by a power series.

    Answer

    ∑xnn!=ex\sum \tfrac{x^n}{n!} = e^x

    Full solution

    (n+1)an+1=an(n + 1)a_{n+1} = a_n, so an=1n!a_n = \tfrac{1}{n!}.

  3. Solve y′=2xyy' = 2xy with y(0)=1y(0) = 1 by a power series.

    Answer

    1+x2+x42+⋯=ex21 + x^2 + \tfrac{x^4}{2} + \cdots = e^{x^2}

    Full solution

    (n+1)an+1=2an−1(n + 1)a_{n+1} = 2a_{n-1}, with a1=0a_1 = 0. So a2=1a_2 = 1, a4=12a_4 = \tfrac{1}{2}, a6=16a_6 = \tfrac{1}{6}: the series for ex2e^{x^2}.

  4. In Airy’s equation with a0=2a_0 = 2 and a1=0a_1 = 0, find a3a_3 and a6a_6.

    Answer

    a3=13a_3 = \tfrac{1}{3}, a6=190a_6 = \tfrac{1}{90}

    Full solution

    a3=26a_3 = \tfrac{2}{6} and a6=a330a_6 = \tfrac{a_3}{30}.

  5. Why is a5=0a_5 = 0 in Airy’s equation?

    Answer

    a5=a220a_5 = \tfrac{a_2}{20} and a2=0a_2 = 0.

    Full solution

    Every coefficient a2,a5,a8,…a_2, a_5, a_8, \ldots traces back to a2a_2, which the x0x^0 term forces to be 00.

  6. Rewrite ∑n=2∞n(n−1)anxn−2\sum_{n=2}^{\infty} n(n - 1)a_nx^{n-2} so the power is xnx^n.

    Answer

    ∑n=0∞(n+2)(n+1)an+2xn\sum_{n=0}^{\infty} (n + 2)(n + 1)a_{n+2}x^n

    Full solution

    Replace nn by n+2n + 2 everywhere, including the starting index.

  7. In Example 3, find a8a_8.

    Answer

    1384\tfrac{1}{384}

    Full solution

    a8=−a68=148⋅8a_8 = -\tfrac{a_6}{8} = \tfrac{1}{48 \cdot 8}, matching 14! 24\tfrac{1}{4!\,2^4} in the series for e−x2/2e^{-x^2/2}.

  8. A student adds ∑n(n−1)anxn−2\sum n(n - 1)a_nx^{n-2} and ∑anxn\sum a_nx^n term by term and gets n(n−1)an+an=0n(n - 1)a_n + a_n = 0. What went wrong?

    Answer

    The sums were combined before shifting, so terms with different powers were added.

    Full solution

    Shift the first sum to ∑(n+2)(n+1)an+2xn\sum (n + 2)(n + 1)a_{n+2}x^n; then matching gives (n+2)(n+1)an+2+an=0(n + 2)(n + 1)a_{n+2} + a_n = 0.

Frequently asked questions

When do you use a power series solution?

For linear equations with variable coefficients, such as y″ − xy = 0, when there is no closed-form method. Near an ordinary point, where the coefficients are well behaved, the series converges.

What are the steps?

Write y = Σ aₙxⁿ, compute y′ and y″, substitute, shift indices so every sum has xⁿ, combine, and set each coefficient to zero to get a recurrence.

Why are a₀ and a₁ free?

They equal y(0) and y′(0), the two initial conditions a second-order equation needs. Every other coefficient follows from them.

What is Airy's equation?

y″ = xy, which appears in optics and quantum mechanics. Its recurrence is aₙ₊₂ = aₙ₋₁/((n + 2)(n + 1)), with a₂ = 0.

How do you shift an index?

Replace n by n + 2 in Σ n(n − 1)aₙxⁿ⁻², giving Σ (n + 2)(n + 1)aₙ₊₂xⁿ starting at n = 0. The terms are the same; only the label changes.