4.0 series - university of oxfordsjrob/teaching/p1_calc/l4slides.pdf · terms grow by adding a...

30
1 4.0 SERIES Series are useful Engineering Tools for representing functions for calculation, and for proving theorems. All functions can be represented by Taylor series – a comprehensive list is given in HLT. 4.1 Definitions If n a a a ,...., , 2 1 is a sequence of numbers, the finite series is simply the sum of the first n terms of that series. If this sum converges, or approaches a limit as n then the sum of the infinite series = = = 1 lim r r n a S n S Not all series converge as n . For example, .... 8 1 4 1 2 1 1 + + + + does converge to 2. But .... 8 4 2 1 + + + + does not; it continues to grow! r n r n n a = a ... + a + a + a = S = + 1 3 2 1 .

Upload: dotu

Post on 18-Jan-2019

228 views

Category:

Documents


0 download

TRANSCRIPT

1

4.0 SERIES

Series are useful Engineering Tools for representing functions for calculation, and for proving theorems. All functions can be represented by Taylor series – a comprehensive list is given in HLT.

4.1 Definitions If naaa ,....,, 21 is a sequence of numbers, the finite series is simply the sum of the first n terms of that series.

If this sum converges, or approaches a limit as ∞→ n then the sum of the infinite series

∑∞

=∞ =

∞→=

1

lim

rrn aS

nS

Not all series converge as ∞→n .

For example, ....8

1

4

1

2

11 ++++ does converge to 2.

But ....8421 ++++ does not; it continues to grow!

r

n

rnn a = a ... + a + a + a = S ∑

=

+1

321 .

2

4.2 Arithmetic Series Terms grow by adding a difference, d.

))1((....)2()( dnadadaaSn −+++++++=

Derive a formula for nS by writing the above backwards and adding:

( ) ( ) ( ) adadnadnaSn ++++−++−+= ....)2()1(

Then ( ) ( ) ( )dnadnadnaSn )1(2....)1(2)1(22 −+++−++−+=

same the all terms n !

So ( )dnanSn )1(22 −+= or ( )dnan

Sn )1(22

−+= .

Example Sum the first 100 numbers 10099....321100 +++++=S

1=a , 1=d , 5050)992(2

100=+=nS

Arithmetic series always diverge!

3

4.3 Geometric Series Terms grow by a ratio r.

∑−

=

− =+++=1

0

1....n

i

inn arararaS

( )12 ....1 −++++= nn rrraS

Now, ( )nnn rrrrarS ++++= −12 .... .

Subtract: )1( nnn rarSS −=− or

)1(

)1(

r

raS

n

n−

−= .

Example A company purchases certain materials each year. The company pays £100,000 for the materials in 2006. Assuming an inflation rate of 3% per annum, how much will the materials cost in total over ten years starting from 2006?

510=a , 03.1=r ( )

388,146,1£)03.11(

)03.1(110

105

10 =−

−=S .

4

Infinite Geometric Series

Consider )1(

)1(

r

raS

n

n−

−=

If 0→nr as ∞→n , then )1( r

aS

−=∞

This requires 1<r or 11 <<− r for convergence.

Example 1 Find the sum to infinity

of ....8

1

4

1

2

11 ++++=+S and ....

8

1

4

1

2

11 +−+−=−S

For +S , 1=a , 2

1=r , 2

2

11

1=

=+S

For −S , 1=a , 2

1−=r ,

3

2

2

11

1=

+

=−S

5

Example 2 Under what conditions is the series

....)12(

10

)12(

10

)12(

1010

32222+

++

++

++=

x

x

x

x

x

xxS

convergent, and what is its sum?

xa 10= , )12(

12 +

=x

r . It is convergent if 1)12(

12

<+x

or 112 2 >+x ,

If 1)12( 2 >+x , 02 2 >x , and so 0>x .

The condition ( ) 112 2 −<+x cannot occur, so S is convergent if 0>x .

Sum

( )

( )x

x

x

xS

125

12

11

10 2

2

+−=

+−

= .

6

4.4 Binomial Series Consider the sequence: baba +=+ )(

222 2)( bababa ++=+

32233 33)( babbaaba +++=+

4322344 464)( babbabaaba ++++=+

Generalise this for n factors:

nnrnr

nnnnnnn bbaCbaCbaCaba ++++++=+ −−− ........)( 222

11

This is the Binomial Theorem.

∑=

−=+n

r

rrnr

nn baCba0

)( ← 1+n terms

where )!(!

!

!

)1)....(1(

rnr

n

r

rnnn

r

nCr

n

−=

+−−=

=

7

A simpler and more useful form is obtained by taking na outside and making nn xaa

bx )1( +→= . Then drop

the na :- Simplified Binomial Theorem

rn

rr

nn xCx ∑=

=+0

)1(

This can be proved by induction. It obviously works for n = 1, 2 and 3. Assume it works for all n.

Then xxxxxx nnnn )1()1()1()1()1( 1 +++=++=+ +

1

00

+

==∑∑ += rn

rr

nrn

rr

n xCxC

altering indices

rn

rr

nrn

rr

n xCxC ∑∑+

=−

=

+=1

11

0

( ) 1

111 +

=− +++= ∑ nr

n

rr

nr

n xxCC

But )!1()!1(

!

)!(!

!1

+−−+

−=+ −

rnr

n

rnr

nCC r

nr

n

8

++

+

+−

−+

+=

)1()1(

)1(

)!1(!

)!1(

n

r

n

rn

rnr

n

rn C1+=

Thus rn

rr

nn xCx ∑+

=

++ =+1

0

11)1( and it works for )1( +n . Thus it holds for all n.

If n is a positive integer, the Binomial series is finite. Otherwise it is infinite.

Example: 2

1

)1(1 xx +=+ ....!3

2

3

2

1

2

1

!2

2

1

2

1

2

11 32 +

+

++= xxx

....2

5

16

1

8

1

2

11 4

7

32 +−+−+= xxxx

It can be shown that the Infinite Binomial series converges for 1<x . This can be used to derive other series.

9

Example: 1)1(1

1 −+=+

xx

....1 432 −+−+−= xxxx But, since x

xx

1ln

d

d= ,

)1(

1)1ln(

d

d

xx

x +=+

i.e. cx

xx +

+=+ ∫ )1(

d)1ln(

Integrate the series for x+1

1 term by term, and noting that 0)1ln( = so 0=c gives an infinite series for the

Logarithm Function

...5432

)1ln(5432

−+−+−=+xxxx

xx for 1<x .

This can be used to generate values of )ln(x .

e.g. 0953103.05

00001.0

4

0001.0

3

001.0

2

01.01.0)1.1ln( =+−+−≈ .

[True value 09531018.0)1.1ln( = – so approximation is not bad]

10

4.5 Exponential Function

The definition of xe can used to generate a power series for xe :

( ) xx

xee

d

d= ; 1e0 =

Assume ........e 2210 +++++= n

nx xaxaxaa ∑

=

=0n

nn xa

Then ( ) ....)1(....32ed

d1

12321

nn

nn

x xanxnaxaxaax

+− ++++++=

( ) ∑∞

=++=

01)1(e

d

d

n

nn

x xanx

So nn aan =+ +1)1( or )1(

1+

=+n

aa n

n Since 1e0 = , 10 =a , 11 =a , 2

12 =a ,

!3

1

23

13 =

⋅=a ,

!4

14 =a , ....

Series for ex

∑∞

=

=++++=0

32

!....

!3!21e

n

nx

n

xxxx which is convergent for all x.

11

4.6 Application Examples 1. The Binomial Series can be used to provide a more rigorous proof of

1

d

d −= nn nxxx

x

xxx

xx

x

nnn

δ

δ

δ

−+

→=

)(

0

lim

d

d

+

→=

x

x

x

xx

n

n

δ

δ

δ

11

0

lim

−+

−++

→=

x

x

xnn

x

xn

xx

n

δ

δδ

δ

1....!2

)1(1

0

lim

2

+

→= x

x

nx

x

n δδ

in terms0

lim 1−= nnx .

12

2. Other series can be derived (see next section) from Taylor’s series.

e.g. ...!5!3

sin53

−+−=xx

xx

Use this to prove 1sin

→x

x as 0→x .

x

xxx

xx

x

x

....!5!3

0

limsin

0

lim

53

−+−

→=

1....!5!3

10

lim 42

=

−+−

→=

xx

x

13

Convergence Tests Series convergence is often not obvious from inspection. For example, the harmonic series

...1

...4

1

3

1

2

11 ++++++

r, is divergent,

but the same series with alternating signs

...)1(

...4

1

3

1

2

11

1

+−

++−+−+

r

r

, is convergent.

Unfortunately, no single test can be applied to check convergence in all cases. We therefore have to use several tests in order to classify series. Among the more useful are the following three, which apply to series of positive terms:

(1) A necessary, but not sufficient, condition for convergence of a series ∑ ra is 0→ra as ∞→r

. Consider the series:

......4321 ++++++ r , ∞→ra as ∞→r ∴ divergent.

Consider the harmonic series:

...1

...4

1

3

1

2

11 ++++++

r, 0→ra as ∞→r

∴ may be convergent (but in fact is not). Note that all arithmetic series are divergent.

14

(2) D’Alembert’s Ratio Test The above test can prove that a series is definitely divergent, but it cannot prove convergence – the result is therefore often inconclusive. D’Alembert’s test is usually more likely to give a conclusive result.

A series ∑ ra is convergent if 1lim 1 <+

∞→ r

r

r a

a.

It is divergent if 1lim 1 >+

∞→ r

r

r a

a.

The test is inconclusive if: 1lim 1 =+

∞→ r

r

r a

a.

Example: Consider the series:

....2

....164

1

242

+

++++

rxxx

So, 4

2

2

22221 x

x

x

a

arr

r

r =

=

++ and 1

4lim

21 <=+

∞→

x

a

a

r

r

r if convergent.

Therefore convergent if 22 <<− x .

15

(3) Cauchy’s Integral Test

A series ∑∞

=1rra converges when ∫

1

d)( xxf converges and diverges when ∫∞

1

d)( xxf diverges. See Stephenson p76

for proof, based on areas under the curve.

So far we have concentrated on series of positive terms. A series ∑ ra of alternating positive and negative

terms is convergent so long as the magnitude of the terms continually decreases and 0lim =∞→

nn

a .

For example, consider the alternating form of the harmonic series ...)1(

...4

1

3

1

2

11

1

+−

++−+−+

r

r

If the series .......321 +++++ raaaa converges, then ∑ ra is said to be absolutely convergent.

If ∑ ra converges but ∑ ra diverges, then the series is conditionally convergent.

Thus, the alternating form of the harmonic series is conditionally convergent, whereas

....)1(

....4

1

3

1

2

11

2

1

222+

−++−+−

+

r

r

is absolutely convergent.

16

4.7 Taylor’s Theorem Suppose we have some function f(x) which we wish to approximate by an algebraic series. We can do this using Taylor’s theorem, which is valid so long as the function is:

• continuous

• single-valued (i.e. only one value of f(x) corresponding to each x)

• differentiable (n+1) times in the range a to x.

Taylor’s theorem states that

nn

n

Rafn

axaf

axafaxafxf +

−++′′

−+′−+= )(

!

)(....)(

!2

)()()()()( )(

2

where the error, or remainder, term is given by

)()!1(

)( )1(1

ξ++

+

−= n

n

n fn

axR xa << ξ .

If the function is differentiable any number of times and the remainder tends to zero as ∞→n , then an infinite series can be obtained. Taylor’s theorem is often expressed in a slightly different form by replacing x with xa + :

nn

n

Rafn

xaf

xafxafxaf +++′′+′+=+ )(

!....)(

!2)()()( )(

2

where )()!1(

)1(1

ξ++

+= n

n

n fn

xR xa << ξ .

17

The form of the Taylor series is easy to verify. We assume that f(x) can be expressed in series form as:

....)()()()( 33

2210 +−+−+−+= axAaxAaxAAxf

Then, differentiating gives:

....)(3)(2)( 2321 +−+−+=′ axAaxAAxf ,

....)(62)( 32 +−+=′′ axAAxf ,

....)(246)( 43 +−+=′′′ axAAxf , etc.

Putting ax = in the above equations:

0!0)( Aaf = , 1!1)( Aaf =′ , 2!2)( Aaf =′′ , 3!3)( Aaf =′′′ , …. nn Anaf !)()( = .

This establishes the values of the terms in the series ( )(0 afA = , )(1 afA ′= , !2/)(2 afA ′′= , etc.), but is not a

rigorous proof since it does not deal with the expression for the remainder – we will not go into this further here.

18

Example: Expand xxf sin)( = about 4π=a .

2/1)( =af

The first few differentials are: xxf cos)( =′ 2/1)( =′ af

xxf sin)( −=′′ 2/1)( −=′′ af

xxf cos)( −=′′′ 2/1)( −=′′′ af

So, using the first four terms of the series,

−−+≈

+

621

2

1

4

32 xxxxf

π

and the remainder term is 24

)sin(!4

44

3

xxR ≤= ξ .

The series can be used to evaluate, for example, )3/sin(π

(exact answer = ...8660254.02/3 = )

...86588.0126

1

122

1

121

2

1

124sin

3sin

32

=

−+≈

+=

ππππππ

19

4.8 Maclaurin Series Maclaurin’s series is simply a special case of Taylor’s series with 0=a :

nn

n

Rfn

xf

xfxfxf +++′′+′+= )0(

!....)0(

!2)0()0()( )(

2

where )()!1(

)1(1

ξ++

+= n

n

n fn

xR x<< ξ0 .

This extremely simple form of series is often preferred to Taylor’s series.

20

Some useful Maclaurin series (taken from Stephenson p98):

....!3

)2)(1(

!2

)1(1)1( 32 +

−−+

−++=+ xxxx

ααααααα for 1<x ,

where α is any real number,

....!7!5!3

sin753

+−+−=xxx

xx & ....!6!4!2

1cos642

+−+−=xxx

x for all x,

....315

17

15

2

3tan

753

++++=xxx

xx for 22

ππ<<− x ,

....432

)1ln(432

+−+−=+xxx

xx for 11 ≤<− x ,

....!3!2

1e32

++++=xx

xx ,

....!5!32

eesinh

53

+++=−

=− xx

xxxx

and

....!6!4!2

12

eecosh

642

++++=+

=− xxx

xxx

for all x.

21

4.9 Convergence and Ranges of Convergence Obviously Taylor and Maclaurin series are only useful if we can be sure that their sum converges to the value of the function we are trying to represent. Convergence can either be checked using one of the tests discussed earlier ….

Example: xxf sinh)( = . Maclaurin series = ∑∞

=

−1

12

)!12(r

r

r

x.

Use d’Alembert’s ratio test:

02)12(

)!12(

)!12(

2

12

121 →

+=

+=

++

rr

x

x

r

r

x

a

ar

r

r

r as ∞→r for all finite x.

… or by showing that the remainder tends to zero as ∞→r .

Example: xxf e)( = . Remainder of Maclaurin series )()!1(

1

ξfn

xR

n

n+

=+

, x<< ξ0 . 0e)!1(

1

→+

≤+

xn

nn

xR

as ∞→n for all finite x. (n! eventually becomes much bigger than xn as n becomes bigger than x.) A third, less rigorous method is simply to compute values and plot them. In most cases, it is then obvious whether or not the series converges. Of course, this does not constitute a formal proof of convergence.

22

4.10 Linearization Taylor and Maclaurin series give us polynomial approximations to functions, the accuracy improving with the number of terms of the series we use. If we truncate the series for f(x) immediately after the term in x, then we come up with a linear approximation of the function. Obviously such an approximation will only be reasonably accurate over a very short range. For any a function f(x) , we write hax += and then expand f as a Taylor series about a. Truncating the series after the term in h we get:

Rafhafhafxf +′+=+= )()()()( .

Thus, if we know the value of the function and its first derivative at a, then from the above formula we can find the approximate function value at )( ha + . This can be represented graphically as in the left plot below

y

x a a + h

f ‘(a)

h f(x)

y

x a a + h

h f(x)

f(a)

f(a+h)

23

Alternatively, we can rearrange the formula to give

h

R

h

afhafaf +

−+=′

)()()(

Then, knowing the function values at various points, we can estimate the derivative, as shown in the right plot above. Example: If xxf sin)( = , evaluate )1(f ′ .

(Exact answer: ...540302305.0)1cos( = )

Taking h = 0.1, 4974.01.0

)0.1sin()1.1sin()1( =

−=′f (7.9% error)

Taking h = 0.01, 5361.001.0

)0.1sin()01.1sin()1( =

−=′f (0.8% error)

24

This is an example of a forward difference method. Another widely used approach is the central difference method, which makes use of both )( haf + and )( haf − . You will see later in the course that such methods are

widely used in the computational solution of differential equations. It should be noted that in all of the above the accuracy of the linear approximation depends on the size of the interval h. We can get a more quantitative feel for how the errors vary with h by examining the remainder term R.

For the forward difference method, we have )(2

2

ξfh

R ′′= .

But the error in estimating )(af ′ is )(2

ξfh

h

R′′= .

In other words, the error = O(h) (i.e. first-order accurate). By a similar approach we can show that the central difference approximation of )(af ′ has an error of order h2 (i.e.

second-order accurate).

25

4.11 Other Applications of Taylor and Maclaurin Series (a) Evaluation of f(x) at large x. This can be done using inverse series. That is, we write xy /1= , then develop a Maclaurin series in terms of y.

(b) Simplifying integration. Many functions are easy to differentiate but difficult to integrate. In such cases, the Taylor or Maclaurin series can be derived and integrated term by term – remember that both the series and the integral must be convergent.

26

(c) Limits of functions – L’Hopital’s Rule. The limit of a function is defined as follows: If we can make the value of f(x) as close as we please to some number l by making x sufficiently close to a number a, then we say that l is the limit of f(x) as x tends to a.

This is normally written as: Lxfax

=→

)(lim

The definition sounds quite confusing, but the topic is really very straightforward. The limit of f(x) is simply the value that f(x) tends towards as x tends towards a. Limits can usually be determined by inspection, for instance:

The exception is

→ )(

)(lim

xg

xf

ax when

0

0

)(

)(=

ag

af.

However, this case can usually be dealt with using L’Hopital’s Rule, which is easily derived using Taylor series.

27

Expanding f(x) and g(x) as Taylor series about a :

..)(!2

)()()()(

...)(!2

)()()()(

)(

)(2

2

+′′−

+′−+

+′′−

+′−+=

agax

agaxag

afax

afaxaf

xg

xf

Since f(a) = g(a) = 0, this simplifies to L’Hopital’s Rule:

)(

)(

)(

)(lim

ag

af

xg

xf

ax ′

′=

→.

28

Example: To evaluate )(

)(lim

sinlim

00 xg

xf

x

x

xx →→= ,

xxf cos)( =′ , 1)( =′ xg ,

∴ 11

)0cos(sinlim

0==

→ x

x

x.

If 0)()( =′=′ agaf , then we can apply L’Hopital’s rule using the second derivative (and so on).

Example: )(

)(lim

)(

)cos1(lim

2 xg

xf

x

x

xx ππ π →→=

+.

xxf sin)( −=′ , )(2)( xxg −−=′ π , ∴ 0

0

)(

)(=

π

π

g

f not useful

So, xxf cos)( −=′′ , 2)( =′′ xg , ∴ 2

1

)(

)(=

′′

′′

π

π

g

f.

Functions may need a bit of manipulation before L’Hopital’s rule can be applied.

29

Example:

Rewrite xxx

tan2

lim2

π

π as

)(

)(lim

cot

2lim

22 xg

xf

x

x

xx ππ

π

→→=

and apply L’Hopital’s rule,

giving 11

1

)2/(

)2/(tan

2lim

2=

−=

′=

→ π

ππ

π g

fxx

x.

30

Although l’Hopital’s rule is a powerful technique for finding hard-to compute limits, it is not always the simplest. Some series are actually easier to compute using Taylor series expansions on top and bottom – particularly if these expansions are given in HLT. For example :

+−+−=

∞→∞→

......!7

1

!5

1

!3

11lim

1sinlim

753 xxxxx

xx

xx

1......!5

1

!3

11lim

42=

++−=

∞→ xxx

Another example :

2

1

1

......62

1

lim

1......62

1lim

1)exp(lim

0

2

32

020

=++

=

−−++++=

−−

→→

x

x

xxx

x

x

xx

x

xx