Power-Series Solutions

When an equation resists every closed-form trick, there is a method that almost never fails: assume the answer is a power series with unknown coefficients, and let the equation tell you what they must be. Write

y = \sum_{n=0}^{\infty} a_n x^n = a_0 + a_1 x + a_2 x^2 + \cdots,

plug it in, and matching the coefficient of each power of x turns the differential equation into a recurrence for the a_n. Solve the recurrence and you have built the solution one coefficient at a time — often recovering a function you already know.

Worked example: y' = y rebuilds e^x

We know y' = y has solution y = a_0 e^x. Let us pretend we don't, and discover it from the series.

Step 1 — write the series and its derivative.

y = \sum_{n=0}^{\infty} a_n x^n, \qquad y' = \sum_{n=1}^{\infty} n\,a_n x^{n-1}.

Step 2 — reindex y' so both sides carry x^n. Let m = n - 1 (so n = m+1), then rename m back to n:

y' = \sum_{n=0}^{\infty} (n+1)\,a_{n+1}\, x^n.

Step 3 — impose y' = y. Both are now series in x^n, so match coefficients power by power:

(n+1)\,a_{n+1} = a_n \qquad \text{for every } n \ge 0.

Step 4 — read off the recurrence.

a_{n+1} = \frac{a_n}{n+1}.

Step 5 — unwind it. Starting from a free constant a_0:

a_1 = \frac{a_0}{1}, \quad a_2 = \frac{a_1}{2} = \frac{a_0}{2!}, \quad a_3 = \frac{a_2}{3} = \frac{a_0}{3!}, \quad \dots, \quad a_n = \frac{a_0}{n!}.

Step 6 — sum the series.

y = a_0 \sum_{n=0}^{\infty} \frac{x^n}{n!} = a_0 e^x.

The series is the exponential. The lone free constant a_0 = y(0) is exactly the one integration constant a first-order equation should have.

The same machine on a second-order equation gives two free constants and recovers both trig functions. From y'' + y = 0, matching x^n yields the two-step recurrence

(n+2)(n+1)\,a_{n+2} = -a_n \;\Rightarrow\; a_{n+2} = -\frac{a_n}{(n+1)(n+2)}.

It couples even indices to even and odd to odd. Seeding with a_0 gives a_2 = -a_0/2!,\ a_4 = +a_0/4!, \dots — the cosine series; seeding with a_1 gives the sine series. So

y = a_0 \cos x + a_1 \sin x,

the familiar general solution, assembled purely from a recurrence. The two free seeds a_0 = y(0) and a_1 = y'(0) are the two constants a second-order equation demands.

When the method is guaranteed

Consider y'' + p(x)\,y' + q(x)\,y = 0 near a point x_0.

The dividing line is whether the coefficient functions p, q stay finite. At an ordinary point a plain power series works. At a singular point — where a coefficient blows up — the naive series can fail, and Frobenius's (x-x_0)^r prefactor rescues it.

This is where mathematics' celebrated special functions are born — each the series solution of an equation that has no elementary answer:

None has a closed form in elementary functions, yet the recurrence delivers every coefficient. The power-series method is how these functions were first defined and how their values are still computed.

Watch the partial sums converge

Here is the series solution of y' = y with a_0 = 1 — the partial sum \sum_{n=0}^{N} x^n/n! against the true e^x (dashed). Add terms with the slider and watch the polynomial hug the exponential over a wider and wider window.