A849 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A8 · Lesson 49 · Power series solutions

When no formula exists, let the equation write the solution's Taylor series

Most linear equations with variable coefficients have no solution in familiar functions. Airy's equation, y′′=xy, describes an electron's wave near a tunneling barrier and light near the bright edge of a rainbow; Bessel's equation describes drumheads, waveguides and the current inside a thick wire. Their solutions are smooth, though, so each has a Taylor series. Put an unknown series into the equation, and matching powers of x gives a rule that produces the coefficients one after another. The series is then the solution, to as many digits as you care to add terms for.

  • The curves are the partial sums of the series solution of y′′=xy with y(0)=1, y′(0)=0, using the terms up to x3N, against the exact solution computed numerically.
  • Each extra term extends the range where the sum is right: the series converges for every x, but far out it needs many terms.

Predict

Put y=a0+a1x+a2x2+⋯ into y′=y with y(0)=1. What rule do the coefficients follow?

Name it

The method

  1. Write y=∑anxn, y′=∑nanxn−1, y′′=∑n(n−1)anxn−2.
  2. Substitute, and shift the indices so every sum is written in powers xn.
  3. Set the total coefficient of each power to zero. That gives a recurrence: each a in terms of earlier ones.
  4. The initial conditions fix the first ones: a0=y(0) and a1=y′(0).

For Airy's equation y′′=xy: the left side is ∑(n+2)(n+1)an+2xn and the right is ∑an−1xn, so a2=0 and

an+2=an−1(n+2)(n+1)

Each coefficient comes from the one three places back: a0 feeds a3,a6,… and a1 feeds a4,a7,…, giving two independent solutions.

Where it works, and how far

At an ordinary point, where the equation y′′+p(x)y′+q(x)y=0 has p and q with Taylor series, the method gives two independent series solutions. Each converges at least out to the distance from the center to the nearest point where p or q blows up, including complex points. For (1+x2)y′′+y=0, nothing goes wrong on the real line, yet the series about 0 only converges for |x|<1, because 1+x2=0 at x=±j.

At a singular point, like x=0 for Bessel's equation, plain power series can fail; a modified series, xr∑anxn, takes over (course A12).

Worked example

Solve y′′+y=0 by series, with y(0)=a0 and y′(0)=a1.

Show the solution
  1. Substitute the series. ∑[(n+2)(n+1)an+2+an]xn=0
  2. Recurrence. an+2=−an(n+2)(n+1)
  3. First coefficients. a2=−a02,a4=a024a3=−a16,a5=a1120
  4. Recognize the series. The even terms are a0(1−x2/2!+x4/4!−⋯)=a0cos⁡x and the odd ones a1sin⁡x.
  5. Why it matters. The series method recovers the familiar solution, which is the test that the method and the algebra are right before using them where no familiar solution exists.

Answer y=a0cos⁡x+a1sin⁡x.

Worked example

Find y(1) for Airy's equation y′′=xy with y(0)=1 and y′(0)=0.

Show the solution
  1. The surviving chain. With a1=0 only the chain from a0 survives: a3=13⋅2=16a6=a36⋅5=1180a9=a69⋅8=112960a12=11710720
  2. Sum at x=1. y(1)=1+0.166667+0.005556+0.000077+0.000001=1.172300
  3. Check. An RK4 integration of the equation from 0 to 1 gives 1.172 300 too.
  4. Why it converges fast. The terms shrink so fast because each is divided by roughly n2; at x=2 it takes nine terms to reach ten digits.

Answer y(1)=1.172300.

Worked example

How far from 0 can you trust the series solution of (4+x2)y′′+xy′+y=0?

Show the solution
  1. Standard form. Divide by 4+x2: p=x4+x2,q=14+x2
  2. Singular points. These blow up where x2=−4, at x=±2j.
  3. Radius of convergence. Those are 2 away from the origin, so the series about 0 converges for |x|<2 at least.
  4. Why the limit is there. On the real line the equation is perfectly calm at x=2; the limit comes from points you'd never plot.
  5. Going farther. For values farther out, expand about another center, or integrate numerically.

Answer you can trust it for |x|<2 at least.

Check

For y′′+y=0 with y(0)=1 and y′(0)=1, what is the coefficient a5 of x5 in the series solution?

Check

Using the series through x12, what is the solution of y′′=xy with y(0)=1, y′(0)=0 at x = 1.5?

Check

About x=0, what is the guaranteed radius of convergence of the series solutions of (x2+22)y′′+y=0?

Check

Find the recurrence for y′=2xy with y=∑anxn.

Step 1

Writing y′ in powers xn, the coefficient an+1 multiplies what?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Solve y′′+xy′+y=0 by series with y(0)=2 and y′(0)=0.

(a)

Substituting gives (n+2)(n+1)an+2+(n+1)an=0. Write an+2 in terms of a=an and n.

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

(b)

What is a4?

Check

Write airy_series(x, tol) that sums the series solution of y′′=xy with y(0)=1, y′(0)=0 from its recurrence, adding terms until the next one is smaller than tol. Return (value, terms), the sum and the number of nonzero terms used. Set ys, n = airy_series(X, tol) for X = 2 and tol = 1 × 10⁻⁸, and y_rk to the RK4 solution at X with 20 000 steps.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

The equation (1+x2)y′′+y=0 is smooth for every real x. Why does its series solution about 0 stop converging at |x|=1?

Explain why

A series solution and an RK4 integration both give y(1) for Airy's equation. What does each offer that the other doesn't?

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.