Power Series Solutions of ODEs

April 13, 2026

Problem

Solve y' = y using a power series y = sum of a_n x^n, n = 0 to infinity. Show the recursion for a_n and recover the exponential y = e^x term by term.

Explanation

When power series solutions are the right tool

Many ODEs — Legendre, Bessel, Hermite, Airy — have no closed form in elementary functions, but they do have power-series solutions around a regular point. The strategy is always the same:

  1. Guess y(x)=n=0anxny(x) = \sum_{n = 0}^{\infty} a_n x^{n}.
  2. Compute derivatives term by term.
  3. Plug into the ODE and collect coefficients of like powers of xx.
  4. Set each coefficient to zero → get a recursion relating ana_n to earlier aka_k.
  5. Solve the recursion given enough initial data (usually a0a_0 from y(0)y(0) and a1a_1 from y(0)y'(0)).
  6. Recognise the resulting series if you can.

This problem applies the method to the simplest nontrivial ODE in existence — y=yy' = y — so every step is visible and the final series is something you already know (exe^{x}).

The given ODE

y=y,y(0)=1 (for definiteness).y' = y, \qquad y(0) = 1 \text{ (for definiteness)}.

Step-by-step

Step 1 — Ansatz.

y(x)=n=0anxn.y(x) = \sum_{n = 0}^{\infty} a_n \, x^{n}.

Step 2 — Differentiate term by term.

y(x)=n=1nanxn1.y'(x) = \sum_{n = 1}^{\infty} n \, a_n \, x^{n - 1}.

To match the index with yy's, reindex by m=n1m = n - 1 (so n=m+1n = m + 1): y(x)=m=0(m+1)am+1xm.y'(x) = \sum_{m = 0}^{\infty} (m + 1) \, a_{m + 1} \, x^{m}.

Rename mnm \to n — still the same series: y(x)=n=0(n+1)an+1xn.y'(x) = \sum_{n = 0}^{\infty} (n + 1) \, a_{n + 1} \, x^{n}.

Step 3 — Substitute into the ODE.

n=0(n+1)an+1xn=n=0anxn.\sum_{n = 0}^{\infty} (n + 1) \, a_{n + 1} \, x^{n} = \sum_{n = 0}^{\infty} a_n \, x^{n}.

Step 4 — Match coefficients of xnx^{n}.

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

Step 5 — Solve the recursion.

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

Start from a0a_0 and roll forward: a1=a01,a2=a12=a02!,a3=a23=a03!,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!}, \ldots an=a0n!.a_n = \frac{a_0}{n!}.

Step 6 — Assemble the series.

y(x)=a0n=0xnn!.y(x) = a_0 \sum_{n = 0}^{\infty} \frac{x^{n}}{n!}.

With y(0)=a0=1y(0) = a_0 = 1: y(x)=n=0xnn!=ex\boxed{\, y(x) = \sum_{n = 0}^{\infty} \frac{x^{n}}{n!} = e^{x} \,}

The series is the Taylor series of exe^{x}, converging for all xRx \in \mathbb{R} (radius of convergence R=R = \infty).

Verification

Differentiate the series term by term: y(x)=n=1nxn1n!=n=1xn1(n1)!=m=0xmm!=y(x).  y'(x) = \sum_{n = 1}^{\infty} \frac{n \, x^{n - 1}}{n!} = \sum_{n = 1}^{\infty} \frac{x^{n - 1}}{(n - 1)!} = \sum_{m = 0}^{\infty} \frac{x^{m}}{m!} = y(x). \; \checkmark

This is the classic reason exe^{x} is its own derivative — the factorial in each term exactly cancels the power that falls out when you differentiate.

Radius of convergence

The recursion gives an+1/an=1/(n+1)0a_{n+1}/a_n = 1/(n + 1) \to 0. Ratio test for the series: limnan+1xn+1anxn=xlim1n+1=0<1  for all x.\lim_{n \to \infty} \left|\frac{a_{n+1} x^{n+1}}{a_n x^{n}}\right| = |x| \cdot \lim \frac{1}{n+1} = 0 < 1 \;\text{for all } x.

So the series converges everywhere — the solution is entire (analytic on the whole real line). This is a general feature of linear ODEs with analytic coefficients: the series always converges at least as far as the nearest singularity of the coefficient functions.

When the ODE has non-constant coefficients — regular vs singular points

For the ODE y+p(x)y+q(x)y=0y'' + p(x) y' + q(x) y = 0:

  • x0x_0 is an ordinary point if pp and qq are analytic at x0x_0. Power series centred at x0x_0 converge in a disk around x0x_0 at least up to the nearest singularity — Frobenius isn't needed, the usual ansatz works.
  • x0x_0 is a regular singular point if pp or qq fails to be analytic but (xx0)p(x)(x - x_0) p(x) and (xx0)2q(x)(x - x_0)^{2} q(x) are analytic. Use the Frobenius method — ansatz y=an(xx0)n+ry = \sum a_n (x - x_0)^{n + r} with an unknown exponent rr.
  • Otherwise, it's an irregular singular point — power series may diverge; asymptotic methods are needed instead.

Bessel's equation has a regular singular point at x=0x = 0; Hermite and Legendre have ordinary points. Each generates its characteristic family via this machinery.

A second worked example — Airy's equation

y=xy.y'' = x y.

Ansatz y=anxny = \sum a_n x^{n}. Then y=n(n1)anxn2=(n+2)(n+1)an+2xny'' = \sum n(n-1) a_n x^{n-2} = \sum (n+2)(n+1) a_{n+2} x^{n} (reindexed). Substituting: (n+2)(n+1)an+2=an1for n1,(n + 2)(n + 1) a_{n + 2} = a_{n - 1} \quad \text{for } n \ge 1, with a2=0a_2 = 0 (from the x0x^0 matching, since xyx y has no constant term). The recursion steps by 33, producing two independent series: one from a0a_0 (even powers shifted by 00) and one from a1a_1 (powers shifted by 11). Both converge on all of R\mathbb{R}. These are the famous Airy functions.

Common mistakes

  • Reindexing errors. When substituting, line up powers of xx carefully by shifting indices. Off-by-one slips are the most common failure mode.
  • Forgetting that coefficients vanish independently. If two series agree, their xnx^{n} coefficients must match for every nn. One recursion per power; that's how you extract all the info.
  • Not supplying enough initial data. For a first-order ODE you need a0a_0. For second-order you need a0a_0 and a1a_1. The rest is determined by the recursion.
  • Assuming the series converges everywhere without checking. It usually does for the textbook examples, but singular points of p,qp, q limit the radius.

Try it in the visualization

Watch the partial-sum series yN(x)=n=0Nanxny_N(x) = \sum_{n=0}^{N} a_n x^{n} grow toward exe^{x} as NN increases. Slide NN and see each new term "fix" the approximation over a wider interval — classic Taylor-series visualisation of how more terms buy more accuracy.

Interactive Visualization

Parameters

4.00
1.00
3.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
Power Series Solutions of ODEs | MathSpin