<<

Lecture 3 Power (See Chapter 1 in Boas)

We want to continue the discussion of the previous lecture with the focus now on , i.e., where the terms in the series contain powers of some parameter, typically a dynamical variable, and we are expanding about the point where that parameter vanishes. (A special case is the geometric series we discussed in Lecture 2.) The power series then defines a of that parameter. The standard examples are the Taylor and Maclaurin series mentioned at the beginning of the previous lecture corresponding to expanding in a series about x  0 or xx 0 ,

 n S x   bn x Maclaurin n0 or (3.1)  n S x  bn  x x0  Taylor . n0

The coefficients bn are related to the of the underlying function nn n (bn 1 n ! d S dx S 0 or x0  n !), at least when the series is convergent, i.e., xx 0 or 0 when the series actually defines the function. Some specific examples of power series are

n 1 x x23 x x0 b   S x  1     , 01n 2n 2 4 8 n1 1 x2 x 3 x 4 x00 b 0  0, bn   S 2  x  x     , n1 n 2 3 4 n (3.2) 1 x3 x 5 x 7 x0 b  0, b   S x  x     , 0 2nn 2 12n  1 ! 3 3! 5! 7! 23 12x   xx22   x 2 b   S x  1     . 04n n 1 2 3 4

These series uniquely define the corresponding functions, whenever (i.e., at values of x where) the series converges. When we apply the convergence tests of the previous lecture to these expressions, we will define a range for the variable x within which the

Physics 227 Lecture 3 1 Autumn 2008 series converges, i.e., a range in which the series expansion makes mathematical (and physical) sense. This range for x is called the interval of convergence (for the power series expansion). For values of x outside of this interval we will need to find different expressions to define the underlying functions, i.e., the power series serves to define the function only in the interval of convergence.

Applying the ratio test to Sx1   we find

n1  x 2 x n    ,  x 2n 2 (3.3)  1 x  2.

So the series absolutely converges for x  2 . At the endpoints,  1, x  2 , the series does not absolutely converge since both the p and s parameters of Eq. (2.29) vanish. For x 2 all terms in the series are positive and the series diverges

( SS1122     ). At the other endpoint, , x  2, we must be more careful due to the alternating signs. We apply test 5) (from Lecture 2) to this series with nn abnn21    . Since limnn a  0 , the series again diverges. We can see both of these results explicitly by looking at the series,

SS2  1  1  1  1    limit cycle  1,0,1,0, , 1 N (3.4) S1 2  1  1  1  1    .

Hence the function is well defined (by the series, i.e., the series converges) only on the open interval 22 x  (open means excluding the end points).

For Sx2   we find from the ratio test that

xnn1 1x  1 1 n   x 1,    xn n1 1  n n2 n (3.5)

limnn x .

Physics 227 Lecture 3 2 Autumn 2008 So the ratio test says that the series absolutely converges for x 1 ( ps1, 0 ). At the endpoint x 1 the signs are all negative and the series diverges

( SS2211     , just the negative Harmonic series). At the other endpoint, n1 x 1, the signs alternate, test 5) is satisfied ( ann  1 , aann1  , limnn a  0) and the series converges conditionally. Hence the function Sx2   is well defined (by the power series) only on the semi-open interval 11 x  . Note again that we must treat the endpoints carefully.

The third series may look like it is missing every other term (the even powers) and therefore you may be confused about how to apply the ratio test. This is not an issue. The idea of the ratio test is to always consider 2 contiguous terms in the series. Alternatively we can (re)write the series as (note that now every value of n contributes to the sum)

 n 2 n 1 S3  x  x bnn x ,. b (3.6) n0 2n  1 !

Applying the ratio test we find (recall nn! 1  2  3 , 0! 1)

xn23n 2 3 ! x 2 n 21n , x2 n 1 ! 2 n  2 2 n  3 (3.7)

limnn  0  any x   .

The series converges absolutely everywhere,  x   ( Sx3   is just the power series expansion of the sine function sin x ).

Finally apply the ratio test to Sx4  

1 1 n 11n  n x 2  x  2  x  2 1   , nn 221 2  n (3.8)

limnn x  2 .

Physics 227 Lecture 3 3 Autumn 2008 Thus the series absolutely converges for 1 x  2  1, the open interval 31 x   .

Since p 1 2 1, S4 diverges at the end points. For x 1 there are no alternating n signs so S4 1 also diverges. At x 3 we have ann  11  , which satisfies test 5) and the series conditionally converges. Hence the interval of convergence for

Sx4   is 31 x   .

Now that we have verified that we know how to determine the interval of convergence, we should restate what is important about the interval. For values of x within that interval of convergence the following statements are all true (and equivalent).

n  The series defines the function of x, S x   bn x .

n  The power series bxn converges (in the sense of Lecture 2) to the function Sx  .

 The function is (accurately) represented by the series .

 is a power series expansion for the function .

To further develop this discussion we state the following theorems (without proof), which are true in the interval of convergence where the (infinite) power series can be treated like a polynomial.

I) We can integrate or differentiate the series term-by-term to find a definition of the corresponding integral or of the function defined by the original series, i.e., Sx  or  S x dx . The resulting series has the same interval of convergence as the original series, except perhaps for the behavior at the endpoints (see below). [This is why series are so useful. Note that the effect of integrating or taking a derivative is to introduce a factor of 1/(n+1) or n in the n±1 term bn x , which does not change the interval of convergence (you should convince yourself of this fact).]

II) If we have two series defining two functions with known intervals of convergence, we can add, subtract or multiply the two series to define the

corresponding functions, S12 x  S x or S12 x S x. The new series

Physics 227 Lecture 3 4 Autumn 2008 convergences in the overlap (or common) interval of the original 2 intervals of convergence. We can also think about the function defined by dividing the two series, which with some manipulation we can express as a corresponding power series. This function is well defined in the overlap interval of the original series except points where the series in the denominator vanishes. At these points the function may still be defined if the series in the numerator also vanishes (appropriately quickly). We are guaranteed that there is an interval where the new function and its series expansion make sense, but we must explicitly calculate it.

III) We can substitute one series into another series if the value of the first series is n n within the interval of convergence of the second, S1  x   bn x , S2  x   cn x n  yields S31 x   cn  S x .

IV) The power series expansion of a function is UNIQUE! No matter how you n determine the coefficients bn in bxn , once you have found them you are done. [This is a really important point for the Lazy but Smart!]

So let’s develop power series expansions for the functions we know and love. We know the general form is given by Eq. (3.1). If we apply the Maclaurin expansion definition to ex , we find (recall the essential property of the exponential, dexx dx e )

ddnn11 ex e x 1,  b  e x  dxnnx0 n n!! dx n xx00 (3.9) x23 x xn exx 1.       2 6n0 n !

For this power series the interval of convergence is all values of x, x ,

x ,  0 x   . (3.10) n n 1 

In a similar fashion we can quickly demonstrate that

Physics 227 Lecture 3 5 Autumn 2008 35  nn11 xx 11 21n   sinx x     x b2nn  0, b 2 1  , 3! 5!n0  2nn 1 ! 2 1 ! (3.11) 24  nn xx 11 2n   cosx 1     x b2nn  , b 2 1  0 . 2! 4!n0  2nn ! 2 !

Again the interval of convergence is all values of x, x . ASIDE: Note that with the definition i2 1, i 1, it follows from Eqs. (3.9) and (3.11) that ixn  ix2 k   ix 2 l 1 eix      n0n! k  0 2 k ! l  0  2 l  1 ! 11kl  x2kl i x 2 1 (3.12) kl002kl ! 2 1 ! cosx i sin x .

This last result is called Euler’s formula (and is extremely useful!).

We can obtain more useful relations by using the four theorems above. Recall our discussion in the last lecture of the geometric and Harmonic series. We had

 1 1x  x23  x   xn   1  x  1 (3.13) n0 1 x or equivalently

 n 1 1x  x23  x    x   1  x  1 . (3.14) n0 1 x

Using I) and integrating both sides of these equations we obtain

Physics 227 Lecture 3 6 Autumn 2008 xxn dy n 1 ln 1 x   1 ynn dy  x 1 , 0011ynnn00 n  x x2 x 3 x 4 ln 1 x  x  x      1  x  1 , (3.15) n0 n 1 2 3 4  xn x234 x x ln 1 x x  x   1 x 1 . n0 n 1 2 3 4

Note that the integral changes the behavior at one endpoint from divergent in the geometric case to conditionally convergent in the harmonic case, an example of the change at the endpoints noted above in item I).

Likewise we have

xxdy tan1x  dy 1  y 2  y 4  y 6  2   001 y x3 x 5 x 7 x     (3.16) 357  1n  xx21n  11    n0 21n 

Now let’s try using theorem III) in the form (p any real number)

n  p pxln 1  1xe pxln 1     n0 n! n  1k (3.17) pxnk1   k0 k 1   . n0 n!

By rearranging terms we obtain (admittedly a tedious task)

Physics 227 Lecture 3 7 Autumn 2008 p p p1 p p  1 p  2 11x   px  x23  x  2! 3! (3.18)  p!   xn. n0 n!! p n

This is just the (hopefully) familiar binomial result,

n n n! m n m a b  a b , (3.19) m0 m!! n m

p which we could have obtained directly by differentiation of 1 x . In this context the reader is encouraged to think some about this use of the function even when the argument is not an integer, i.e., the expansion in Eq. (3.19) is useful even when n is not an integer (but m is).

Another tool for obtaining a series expansion arises from switching from a Maclaurin series expansion to a expansion, i.e., expand about a point other than the origin. Consider the function ln x. It is poorly behaved at x  0, but is well behaved at x 1. So we can use Eq. (3.15) in the form

nn 11 n1  x lnx ln 1  x  1  x  1   . (3.20) nn00nn11

The interval of convergence is then given by 1 xx  1  1  0   2, i.e., the series converges absolutely for 02x and converges conditionally at x  2.

To repeat, the function defined by a power series expansion is well behaved within the interval of convergence. But clearly it is important to consider what it means when the series expansion for a function diverges. In general, the series will diverge where the original function is singular as is the case for ln x at x  0 in Eq. (3.20). However, the relationship between the series and the function does not always work going the other way. A divergent series does not necessarily mean a singular function. The various possibilities are the following.

1) The series diverges and the function is singular at the same point. This typically occurs at the boundary of the interval of convergence as in the example of at

Physics 227 Lecture 3 8 Autumn 2008 x  0.

2) The series may be divergent, but the function is well behaved. For example ln x is well behaved for x  2 but the (specific) power series expansion in Eq. (3.20) diverges. Similarly the function 11  x is well behaved everywhere except the single point x 1 while the power series expansion in Eq. (3.14) diverges for x 1. The mathematics behind this behavior is most easily understood in the formalism of complex variables as we will discuss next (where we will develop the concept of a radius of convergence to replace the interval of convergence). In any case, it is clear as we have already noted that outside of the interval of convergence the series is no longer useful to define the function. However, it is often possible to find a different power series expansion that is useful (convergent) in a different interval of convergence.

The logic of how a power series expansion is used typically runs like the following. We solve a differential equation by using the equation to solve for the coefficients in  n a power series expansion of the solution (e.g., S x x  x n 1 ).   n0    Within the interval of convergence of that series we succeed in summing the series and writing the solution in closed form (e.g., S x ln 1 x). We use that closed form to define the solution to the original differential equation over a much larger range in the variable. (The essential subtext here is the uniqueness of the solution and the power series.)

3) A third and truly devious possibility is that the series looks “OK” but does not accurately describe the function. This behavior is associated with points where the 2 function exhibits an essential singularity. Consider the function f x  e1 x . The function and all of its derivatives vanish at suggesting a power series expansion about of the (naïve) form fx   0. But this is only true at the isolated point and has no finite interval of validity, because the function has an essential singularity at the origin. A more useful series arises from expanding about  the point at infinity, f x1!n n x2n . In this form it is clear that special   n0    care must be taken at the point .

If we know that a power series converges, a related important issue, especially for physicists, is the question of how rapidly the series is converging, i.e., what is the magnitude of the error if we truncate the series after N terms? There are several useful relations that address this question, which we present without derivation.

Physics 227 Lecture 3 9 Autumn 2008 Consider a Taylor series expansion about the point xx 0 of the function fx  . We can define a remainder as

nn N  x x00 nn  x x    RN  x  f x  f x00  f x . (3.21) n01nn!! n  N 

It turns out that the value of the remainder can be written as

N 1 xx 0  N 1 R x  f x , (3.22) N N 1!

where the point x lies somewhere in the interval between x0 and x, i.e., the final sum in Eq. (3.21) can be written in terms of the first term in the sum but with the derivative evaluated at the point rather than . While it may be difficult to determine the precise value of the special point , this expression provides an easy way to obtain an approximation to the remainder.

ASIDE: This result is often derived as part of the introductory calculus course, but recent experience suggests that we should review its derivation here. First note that functions defined by powers series (as here) are smooth and continuous (and bounded, i.e., not infinite) within the interval of convergence of the series in the sense that all derivatives of the function are (well) defined by related power series expansions which converge in the same interval (except possibly at the endpoints – see point I) on page 4). Next consider performing some nested integrals of the N +1st derivative of f(x), which is defined by its Taylor series. We have

x dy fNNN1 y f  x f  x ,       0  x0 xxy dydyfNNN1 y dyf  y f  x         0  x0 x 0 x 0 NNN11     f x  f x0  x  x 0 f x 0 ,

Physics 227 Lecture 3 10 Autumn 2008 x yy dy  dy  dy  fN 1  y  x0 x 0 x 0 x dy fNNN11 y  f  x  y  x f  x      0  0  0  (3.23) x0 2 NNNN2  2  1  xx  f   x  f   x  x  x f   x  0 f   x . 0 0 02! 0

Thus, if we perform N+1 such nested integrals, we obtain the following expression for the remainder in Eq. (3.21)

N  n x y N 1 N kN 1 kxx  n  dy  f  y   f x0 f  x        0  k1 n0 n! xx00 (3.24)

 RxN  .

We can evaluate this integral by using another calculus result – the mean value theorem. Consider a general function g(x) that is continuous and smooth in an interval that includes x0 to x. Thus in this interval the function g(y) will exhibit

(unique) maximum and minimum values such that gmin g y g max for all y in

the interval from x0 to x. Further g(y) will take on all values in this range

( ) at least once as y varies from x0 to x. Then it follows that the mean value for this interval, defined by

1 x g dy g y, xx  (3.25) 0 x0

satisfies

gmin g  g max,. g  g x  x 0  x  x (3.26)

There must at least one value of the variable y within the interval where the function passes through its mean value. Now we can apply this result to Eq. (3.23) and establish the existence of a value x such that

Physics 227 Lecture 3 11 Autumn 2008 x dy fNN11 y x x f  x .     0    (3.27) x0

So finally returning to Eq. (3.24) we use Eq. (3.27) to obtain the desired result

N  N 1 x y N 1 kN 1 kxx  N 1 R x dy  f  y  0 f  x . N        (3.28) k1 N 1! xx00  

Turning now to the special case of a convergent power series with alternating signs

( aann1  , limnn a  0) we have

nN1  x x00 nN  x x   1 RNn f x0  a 1  f x 0  . (3.29) nN1 nN!  1 !

But note that this result is not true for a series without alternating signs.

n For a general power series, S x   bn x , which is known to converge for x 1 and for which bbnn1  for nN , we have

bxN1 1 SxN 1 0 N1 Rx  N 1 . (3.30) N 1x N  1 ! 1  x

We see clearly that, as we approach the edge of the interval of convergence, the convergence is slower, i.e., it takes more terms to obtain the same size remainder.

Finally let’s discuss how to use such power series expansions.

1) They are extremely useful in numerical work, e.g., when working on a computer. Imagine that we wish to evaluate the difference between two very similar functions,

e.g., the difference between f1  x  tan x and f2  x ln 1  x 1  x near x  0. The functions are so similar that trying to take the difference by simply evaluating the functions separately numerically requires incredible numerical accuracy, while taking the difference first analytically greatly simplifies the problem. Consider their

Physics 227 Lecture 3 12 Autumn 2008 power series expansions

x3 2 tanx x   x5  , 3 15 (3.31) 1 x x35 x lnx    . 1 x 3 5

Thus the difference is given most efficiently by

1 xx5 f x tan x  ln    , (3.32) 1 x 15

so that for x 103 the two functions are of this same order while the difference is of order f 103  10 16 . Taking the difference directly would require computing with at least 13 significant figures, an unlikely situation! Power series expansions also make it is easier to take derivatives numerically.

2) We can also turn our discussion around and use the power series expansions of known functions in order to evaluate sums of interest. This application is straightforward in principle, but requires some creativity. We used this approach in Lecture 2 to evaluate the Harmonic series with alternating signs to find ln2. Let’s do something more challenging here. Imagine that we want to sum the series

1 2 3  n S       . (3.33) 2! 3! 4!n1 n  1 !

Clearly we want to consider a function whose power series expansion has similar coefficients, but at the same time we want a power series that we can sum after, perhaps, simplifying the series using some simple operation like taking a derivative. In this case define a new function by the power series

 n f x   xn1, n1 n 1! (3.34) fS1. 

Physics 227 Lecture 3 13 Autumn 2008 Now we simplify by taking a derivative, then perform the sum, and finally integrate (by parts) to “undo” the derivative,

nn 1 xxnm  f x  xnx    x   xe , n1n1 ! n  1 n 1 ! m  0 m ! xx f x  f x  f0  f y dy  yey dy 00 (3.35) x xx yey  e y dy  xe x  e y  x 11 e x  00 0 Sf 1  1.

Showing that this sum is 1 is not at all straightforward by other means.

Similar manipulations can often be used to sum a power series and obtain a closed expression for the function defined by the power series. The point is to use manipulations allowed within the interval of convergence. Consider the function defined by

 f x 1  2 x  3 x21    nxn (3.36) n1

The ratio test tells us that this series is convergent for x 1. The explicit form clearly suggests that integrating will yield a simpler expression, which we can sum, i.e., which we can recognize,

x  nnx  f y dy x  x x   x 1  0 nn101 x (3.37) d x11 x fx    22  . dx11 x x 11xx  

Another example is given by

Physics 227 Lecture 3 14 Autumn 2008 1 x x21 xn fx        1 2 2  3 3  4n1 nn  1 2 xx1,n  1   , n xnn1 d x x22 f x   x f x   ln 1  x nn11n n1 dx n (3.38) x x x2 f x   dyln 1  y  1  y ln 1  y  1  y            0 0 1 x ln 1  x  x 11 x f x  ln 1  x xx2

3) Power series are also useful for performing integrals, at least numerically. Consider the following example,

11x3 x 4 x 5 dxex cos x dx 1 x    3 6 30 00 (3.39) 1 1 1 1 1     1.3767 2 12 30 150

while the true answer to the same number of significant figures is 1.3780. Of course, these days one is seldom far from a computer with Mathematica or Maple.

4) Power series expansions are also useful for evaluating indeterminate mathematical forms. This application is essentially (a careful application of) L’Hopital’s rule. Consider the example

10 ex lim . (3.40) x0 x 0

Now expand the numerator (and denominator) in power series keeping the first non- zero terms,

Physics 227 Lecture 3 15 Autumn 2008 2 1 1 xx  2 xx2 2 lim lim   1. (3.41) xx00xx

Likewise

sinx x x3 3! lim lim 1. (3.42) xx00xx

5) Finally power series are useful in simplifying physics problems. The standard example is that of a pendulum. With the pendulum’s orientation specified by a polar angle  (measured from the “down” direction) Newton’s equation is

ml  mgsin . (3.43)

Using just the first term in the power series for sin we obtain the (linearized) Harmonic Oscillator problem

ml   mg , (3.44)

with natural frequency 0  gl. For larger angles (more energy in the motion) the nonlinear terms (higher powers of ) in the expansion of sin will ensure that the resulting motion, while still periodic, is no longer simple harmonic (i.e., no longer a single frequency).

Physics 227 Lecture 3 16 Autumn 2008