8.2 Power Series Methods
A direction field shows the shape of a solution but gives no formula. The next best thing to a formula is a power series. If the solution of an initial-value problem can be written as
then the first few terms give a polynomial that approximates near . A polynomial is easy to evaluate, differentiate and integrate. In this section we learn two ways to compute the coefficients for a first-order problem
You met power series solutions of linear second-order equations in Chapter 6. The ideas here are similar, but they work for nonlinear equations too.
When is there a power series solution?
Not every initial-value problem has a solution that is a power series. The right-hand side must be smooth in a strong sense. We call a function analytic at if it equals a convergent double power series in and near that point. Polynomials, , , , and sums, products and compositions of these are analytic everywhere; a quotient is analytic wherever its denominator is not zero.
If is analytic at , then the initial-value problem , has a unique solution that is analytic at . That is, there is a number such that
This result goes back to Cauchy. Note what it does not say: it does not tell us how large is. Even when is a polynomial, the series may converge only on a small interval. We will see a concrete case in Example 8.2.3.
Throughout this section, is analytic at the starting point, so the theorem applies.
The Taylor series method
If is analytic at , its power series is its Taylor series:
So we need the numbers . The beautiful point is that the differential equation hands them to us one after the other, without solving it.
- is the initial condition.
- comes from the equation itself.
- For , differentiate the equation with respect to , remembering that is a function of . By the chain rule (as in Section 8.1), . Substituting the known values of , and gives .
- Differentiate again to get in terms of , , , , and substitute. And so on.
- Write and .
- Differentiate the equation with respect to repeatedly, treating as a function of (chain rule, product rule). This gives formulas for , , ... in terms of and lower derivatives.
- Evaluate each formula at , using the values already found.
- Assemble . This Taylor polynomial approximates for close to .
Use the Taylor series method to find the terms through of the solution of , . Compare with the exact solution at and .
Solution
- First two values. and .
- Differentiate the equation. From :
- Evaluate at . In fact for every , so for all .
- Assemble.
- Compare. The exact values are and . The Taylor polynomials of increasing degree give (6 decimals):
At the quartic is already within of the exact value. At , farther from the centre, convergence is slower.1 1.500000 2.000000 2 1.625000 2.500000 3 1.687500 3.000000 4 1.695312 3.125000 5 1.696094 3.150000 - Cross-check. Expanding the exact solution, .
Of course, we did not need a series for a linear equation; we could solve it exactly. The method earns its keep on nonlinear equations, where no formula is available.
Find the Taylor polynomial of degree 4 for the solution of , , and use it to estimate .
Solution
- Start. and .
- Differentiate repeatedly. Use and the product rule:
- Evaluate at , in order.
- Assemble.
- Estimate. . A high-accuracy numerical solution gives , so the error is about . With only the cubic, , about eight times worse. At the quartic gives against the true : the approximation degrades quickly as we move away from (Figure 8.2.2).
Do not try to write general formulas for in terms of partial derivatives of ; they grow very fast. Instead, differentiate the specific equation, as we did above, and substitute numbers as soon as possible. Each derivative only needs the numbers found before it.
The next example comes from mechanics (Chapter 3). It has an exact solution, which lets us see something important about how far a series can be trusted.
A small body falls from rest. With quadratic air resistance its velocity (in m/s, taking m/s²) satisfies Find the Taylor polynomial through . The exact solution is ; compare at , and .
Solution
- Derivatives. Differentiate again and again:
- Values at . , , then
- Assemble. Only odd powers appear: is an odd function of . One more round gives the next term, .
- Exact solution. Separating, . Partial fractions give , so and . Its Maclaurin series agrees with ours.
- Compare.
At the series works well. At it is useless, and adding terms makes it worse: the velocity cannot exceed the terminal value m/s, yet says and says .exact 0.5 4.625000 4.620784 4.621172 1 8.000000 7.460317 7.615942 2 36.000000 −33.079365 9.640276 - Why? The Maclaurin series of converges only for . The reason lies in the complex plane: , and at . A power series converges up to the nearest such trouble spot, even if the trouble is invisible on the real axis. For , no number of terms will do.
A power series solution is excellent near and may be worthless farther away, even when the true solution is smooth and bounded. Before using a truncated series at some , ask whether is close to , and check that the terms you add are getting rapidly smaller there. If they are not, use a numerical method instead (Sections 8.4 to 8.8), or re-expand the series about a new centre closer to the point of interest.
Try the method on your own problems with the calculator below. It performs the repeated differentiation for , , with a polynomial in and , and lists every derivative value. It starts with Example 8.2.2; change , or the degree and compare with your hand computation.
The method of undetermined coefficients
The second method should feel familiar from Chapter 6. We assume a series with unknown coefficients, substitute it into the equation, and match powers of .
For the right-hand side we need expressed in powers of and . When is a polynomial this is just algebra: replace by and by and expand. Then substitute and collect powers.
- Write (so from the initial condition).
- Then .
- Substitute the series for into and expand in powers of , keeping only the powers you need.
- Equate coefficients of on both sides. Each equation gives one new from the earlier ones.
Solve Example 8.2.2, , , through by undetermined coefficients.
Solution
- Assume a series. , so
- Square the series. Multiply out and collect powers up to (higher powers are not needed for ):
- Right-hand side.
- Match coefficients.
- Result. , the same as in Example 8.2.2, as it must be: an analytic function has only one power series about a given point.
Find the terms through of the solution of , . Estimate and .
Solution
- Shift the variable. Put , so . We look for (Since , differentiating in or in is the same.)
- Right-hand side. As in Example 8.2.4, . Subtracting : Note there is no constant term: .
- Match.
- Result. The solution has a horizontal tangent at (indeed ) and a local maximum there, since .
- Estimates. At : , which matches a high-accuracy numerical value to all six decimals. At the polynomial gives against the true : still good, but the error has grown from below to .
Which method should you use?
Both methods produce the same coefficients; they differ only in bookkeeping.
- The Taylor series method is direct and works for any analytic , including or . Each step needs one more differentiation, and the expressions grow quickly.
- Undetermined coefficients is pleasant when is a polynomial in : everything is multiplication of series. It can also produce a recurrence for all coefficients at once (see Exercise 8), something the Taylor method rarely gives.
Either way, remember that a truncated series is reliable only near . To march far away from the initial point with controlled accuracy we need different tools: successive approximations (Section 8.3) and, above all, numerical methods (Section 8.4 onward).
Exercises
In Exercises 1–7, use the Taylor series method to find the terms of the solution up to the indicated power.
- , ; through . Compare with the series of the exact solution .
Answer
(agrees with the exact series). - , ; through . Guess the general term, and find the exact solution. For which does the series converge?
Answer
; general term . Exact ; the series converges for . - , ; through .
Answer
- , ; through .
Answer
- , ; through .
Answer
(the coefficient is ). - , ; through .
Answer
- , ; through .
Answer
- For , , substitute and show that , and for . Write the terms through .
Answer
All even coefficients vanish; - A body falling with linear air resistance satisfies , . Find the series through and check it against the exact solution .
Answer
(); same as the exact series. - , ; through .
Answer