FACULTY OF MATHEMATICAL STUDIES

MATHEMATICS FOR PART I

Lectures

MODULE 20 FURTHER II 1. Sequences and 2. Rolle’s theorem and mean value theorems 3. Taylor’s and Maclaurin’s theorems 4. L’Hopital’s rule

1. Sequences and series When obtaining a mathematical solution to an engineering problem it is possible to proceed in an obvious way but sometimes obtain the wrong answer, even though the initial model and all the algebraic manipulations are correct. In these situations the errors usually arise because some mathematical procedure has been assumed to be true, whereas a much closer inspection would have revealed a flaw in the argument. Analysis is the of mathematics in which rigour is investigated. Very little on this topic is covered in your engineering course, but a few ideas are introduced in this module and in this section we consider sequences and series.

Consider a function f with domain 0, 1, 2, ... , then the set of values {f(0),f(1),f(2), ...} is called a sequence. The sequence is often written {f0,f1,f2, ...}. A sequence which does NOT end is called an infinite sequence, a sequence which ends is called a finite sequence. n Denote a finite sequence by {fk}k=0 , in which the first term is f0 and the last term is fn , and an infinite ∞ sequence by {fk}k=0 . (Note that the above notation is that used by James, although different notations appear in other books.) The values of the terms in a sequence are often related. For example, the terms might satisfy fk+1 = fk +1 and this is called a recurrence relation. There are two special types of sequence which almost all of you will have met before, and these are briefly considered below. Arithmetic sequence – a sequence in which the difference between successive terms is constant e.g. {4, 7, 10, 13} or {1, −2, −5} . n−1 The general form of an arithmetic sequence is {a + kd}k=0 ,where a is the first term, d is the common difference and n is the number of terms. Geometric sequence – a sequence in which the ratio of successive terms is constant 1 1 e.g. {4, 8, 16, 32, 64} or {4, −2, 1, − , , ...} . 2 4 k n−1 The general form of an geometric sequence is {ar }k=0 ,where a is the first term, r is the common ratio and n is the number of terms.

Def. A series is the sum of terms in a sequence. Arithmetic series – from the arithmetic sequence a, a + d, a +2d,...., add together the first n terms to give the arithmetic series with sum Sn,sothat

Sn=a+(a+d)+(a+2d)+ ... +(a+(n−1)d) .

1 As you may know the formula for the sum can easily be derived by rewriting the above expression, reversing the order of the terms, so that

Sn =(a+(n−1)d)+(a+(n−2)d)+(a+(n−3)d)+ ...+a.

Adding the corresponding terms in the latter two expressions then implies

2Sn =(2a+(n−1)d)+(2a+(n−1)d)+(2a+(n−1)d)+ ...+(2a+(n−1)d), (n terms) n n → Sn = (2a +(n−1)d)= (first term + last term) , 2 2 where “first” and “last” refer to terms in the original series. Geometric series – from the geometric sequence a, ar, ar2, ..., add together the first n terms to yield the geometric series with sum Sn,

2 3 n−1 Sn = a + ar + ar + ar + ... +ar .

To calculate the sum multiply everything in the expression by r

2 3 4 n rSn =ar + ar + ar + ar ... +ar

and subtract from the first series giving

n Sn − rSn =(1−r)Sn =a−ar , since almost all the terms on the right-hand side cancel. It follows immediately that the sum of a geometric series of n terms is a(1 − rn) Sn = . 1 − r The above results for the sums of arithmetic and geometric series with n terms should be remembered.

1 1 Ex 1. Calculate 4 − 2+1− + . 2 4 1 This is a geometric series, with 5 terms, first term a = 4, common ratio r = − . 2 Hence, using the formula,   5 1 33 4(1 − (−1/2) ) 4 1+ 32 4 32 11 S5 = − − = 3 = 3 = , 1 ( 1/2) 2 2 4 which can easily be verified by direct calculation.

Ex 2. How many terms in the series 11 + 15 + 19 + ... are needed to give a sum of 341? This is an arithmetic series of n terms, for which a =11and d= 4 . It is not difficult to deduce that the final term, the nth term, equals 11 + (n − 1)4 = 7 + 4n and, therefore, n Sn = (11 + (7 + 4n)) = 341. 2 Hence n (18 + 4n) = 341, 2 → 4n2 +18n−682 = 0, or 2n2 +9n−341 = 0 , i.e. (n − 11)(2n + 31) = 0, → n =11, or − 31/2 ,

2 but the number of terms must be positive so the answer to the question is 11 terms.

Limit of a sequence It is often important to know whether a sequence converges. The condition can be ∞ stated mathematically – but in words we say that a sequence {an}n=0 converges to a a when for every small positive value of  you choose there always exists a place in the sequence (at which n = N) beyond which EVERY term in the sequence lies between a −  and a + . an x x x a+ε x x a x x x x x xxx xx x a- ε x x x x x x x x 1 5 N n Properties of convergent sequences

If sequence {an} has limit a and {bn} has limit b then

(i) {an + bn} has limit a + b ;

(ii) {an − bn} has limit a − b ;   an a (iii) has limit ; bn b (iv) {an bn} has limit ab.

∞ n Ex 3. Find the limits of {xn} defined by (a) xn = , n=0 n +1 2n2 +3n+1 (b) xn = . 5n2 +6n+2 (a) Dividing the numerator and denominator by n and using properties (i) and (iii) above it follows that

n n 1 1 1 xn = n+1 = 1 → = =1. n 1+ n 1+0 1

(b) Using a similar method as above, but dividing here by n2,leadsto

3 1 2+ n + n2 2+0+0 2 xn= 6 2 → = 5+ n + n2 5+0+0 5

Convergence of series You must be careful in deciding whether or not a series converges. For example, consider the harmonic series ∞ 1 1 1 X 1 1+ + + + ... = . 2 3 4 n=1 n Each term gets smaller and approaches zero, but does the series converge since an infinite number of small terms may add to give something significant (i.e. does the sum approach a limit as n →∞?) By splitting the fractional terms in the series into appropriate groups (the lengths of the groups being powers of 2n , namely one, two, four, eight, ...) then it is easy to deduce that 1 1 1 1 + > 2 × = , 3 4 4 2 1 1 1 1 1 1 + + + > 4 × = , 5 6 7 8 8 2 1 1 1 1 1 + + ... + > 8 × = ,andsoon. 9 10 16 16 2 3 1 The sum of each group of terms is therefore greater than . With an infinite number of terms in the original 2 series the groups never stop (although successive ones contain an increasing number of terms) and so the 1 sum of the series gets larger and larger, increasing by more than when each group of terms is added. The 2 harmonic series does NOT converge, therefore, and the series is said to be divergent.

Convergence of geometric series It was shown earlier in this section that for a geometric series of n terms

a(1 − rn) a + ar + ar2 + ... +arn−1 = . 1 − r

What happens as n →∞, when the series contains an infinite number of terms? The above series clearly converges when rn → 0 and hence the series converges if and only if |r| < 1and diverges if and only if |r|≥1. a For a converged infinite geometric series S = . 1 − r

D’Alembert’s is one very useful test for confirming, or otherwise, the convergence of infinite series. X∞ un+1 Suppose we consider the series uk , where all the uk are positive, and suppose that the limit lim n→∞ n k=0 u exists and equals ` . Then d’Alembert’s ratio test states that the given series is convergent if `<1and divergent if `>1 (if ` = 1 then the test does not provide any conclusions about convergence). N.B. A necessary condition for convergence of infinite series is that the general term in the series has limit X∞ zero as n →∞. Hence, if un → C as n →∞ and C =6 0 , then the series is divergent. k=0

Ex 4. Determine whether the following series are convergent ∞ ∞ 1 1 1 X2k Xk (a) 1 + + + + ...,(b) ,(c) . 2 4 8 k=0 k! k=0 k +1 1 (a) This is a geometric series with r = . The ratio is less than 1 and so the series converges to sum 2 1 S = 1 =2. 1 − 2 (b) All terms in the series are positive and

k+1 k+1 uk+1 2 /(k +1)! 2 k! 2 → →∞ = k = k = 0ask . uk 2 /k! (k +1)! 2 k+1

This limit is < 1 so d’Alembert’s test implies that the series converges. (c) In this case k k k 1 → 1 →∞ uk = = k+1 = 1 =1 as k . k +1 k 1+ k 1+0 The terms do NOT tend to zero as k gets large and so the series diverges.

2. Rolle’s theorem and mean value theorems Consider the two functions y = f(x) shown in the figure below. Clearly for each function there exists at least one point x = c where the of the curve is zero, i.e. there exists at least one point x = c such that f 0(c)=0.

4 y

a b x The above can be more precisely stated as Rolle’s theorem If (i) f(x) is continuous for a ≤ x ≤ b , (ii) f(x) is differentiable for a

a b x a d b x a e b x

figure 2a figure 2b figure 2c N.B. It is important to note that Rolle’s theorem states the existence of c but does NOT tell you how to find its value!

First mean value of calculus states: if f(x) is continuous in the closed interval a ≤ x ≤ b then there exists at least one point c such that Z 1 b f(c)= f(x)dx . b−a a

(Geometrically, above states that: area under graph = area of rectangle of height f(c) , see figure 2d). y y

a c b x a c1 c2 b x figure 2d figure 2e

First mean value of differential calculus states: if f(x) is continuous in the closed interval a ≤ x ≤ b and differentiable in the open interval a

f(b)−f(a) f 0(c)= . b−a

(Geometrically, the above states that the of the at the point x = c is parallel to the straight line joining the end-points of the curve (see figure 2e))

5 3. Taylor’s and Maclaurin’s theorems How accurately can we approximate functions, by using polynomials say? This is partly answered by the following theorem. Taylor’s theorem If f(x),f0(x), ...,f(n)(x) all exist and are continuous in [a, x], and f(n+1)(x)exists in (a, x)then

2 n 0 (x−a) 00 (x−a) (n) f(x)=f(a)+(x−a)f (a)+ f (a)+ ... + f (a)+Rn(x), 2! n! where n+1 (x−a) (n+1) Rn(x)= f (c) ,a

(The above notation for Rn follows that in James, but it should be noted that the notation Rn+1 is often used in the literature). Comments (i) The quantity θ ,where0<θ<1 , is often used instead of c , giving c = a + θ(x − a).

(ii)The above theorem states the Lagrange form of the remainder. The remainder Rn(x) denotes the difference between the original function f(x)andthenth order polynomial that is used to approximate it. Taylor’s theorem shows the surprising result that however many terms you choose to have in your polynomial approximation to f(x) , the difference between f(x) and this polynomial can always be expressed in a comparatively simple form (Lagrange’s form), although you do NOT know the value of c .Knowledge of the range of c ,or θ, can often mean the maximum magnitude of the remainder can be calculated,and not guessed. X∞ n (iii) Infinite series anx ,wherethe an are independent of x, are called . n=0 Def. A power series has radius of convergence r if the series converges when |x| r. There are many important power series. For example

x2 xr ex =1+x+ + ... + + ... for all x, (i.e. r = ∞) 2! r! x3 x5 sin x = x − + + ... for all x (i.e. r = ∞). 3! 5!

(iv) Choosing a = 0 in Taylor’s theorem gives Maclaurin’s theorem:

2 n 0 x 00 x (n) f(x)=f(0) + xf (0) + f (0) + ... + f (0) + Rn(x) , 2! n! where n+1 x (n+1) Rn(x)= f (θx) , 0 <θ<1. (n +1)!

Taylor’s and Maclaurin’s series In Taylor’s and Maclaurin’s theorems if Rn → 0asn→∞ then the function f(x) can be represented by the corresponding infinite series:

(x−a)r f(x)=f(a)+(x−a)f0(a)+ ... + f(r)(a)+ ... (Taylor’s series) r! xr f(x)=f(0) + xf0(0) + ... + f(r)(0) + ... (Maclaurin’s series) r! 6 Ex 5. Use Maclaurin’s theorem, with two terms and a remainder, to show that the error in writing sinx as x is less than 0.005 if 0

Ex 6. Establish the convergence of Maclaurin’s series for cos x . For this function f(x)= cosx, f(0) = 1 , f 0(x)=−sin x, f0(0) = 0 , f 00(x)=−cos x, f00(0) = −1 , f (3)(x)= sinx, f(3)(0) = 0 , f (4)(x)= cosx, f(4)(0) = 1 , and therefore  (n) 0ifnis odd f (0) = n/2 (−1) if n is even Maclaurin’s theorem then yields r 0 x (r) f(x)=f(0) + xf (0) + ... + f (0) + Rr r! 2 4 2n x x x n =1− + + ... + (−1) + R2n+1, 2! 4! (2n)! where 2n+2 x n+1 R2n+1 = (−1) cos(θx), 0 <θ<1 (2n +2)! 2n+2 2n+2 x |x| →|R2n+1|≤ = . (2n +2)! (2n +2)! The latter term tends to zero as n →∞ for all x, because however large x is then as n increases the denominator will always become bigger than the numerator. Thus the remainder tends to zero and the series converges giving, for all x, x2 x4 x2n cos x =1− + + ... +(−1)n + ... 2! 4! (2n)!

7 4. L’Hopital’s rule sin x 0 It is often necessary to obtain limits of quotients as x → a . For instance, as x → 0then → =? x 0 How do you discover whether a limit exists? One useful result is stated below. L’Hopital’s rule If (i) f(a)=g(a) = 0 and (ii) f and g are differentiable at x = a then   f(x) f 0(a) lim = , provided g0(a) =06 . x→a g(x) g0(a)

f 0(a) 0 If = then keep differentiating the two functions, one at a time, until at least one of the g0(a) 0 f (n)(a)andg(n)(a) is non-zero (see Ex 9 below).   sin x Ex 7. Find lim . x→0 x   sin x sin 0 0 lim = = =? x→0 x 0 0

Using l’Hopital’s rule     sin x cos x cos 0 1 lim = lim = = =1 x→0 x x→0 1 1 1   x Ex 8. Find lim x . x→∞ e   x ∞ lim = =? x→∞ ex ∞ Using l’Hopital’s rule     x 1 lim = lim =0 x→∞ ex x→∞ ex   1 − cos x Ex 9. Find lim . x→0 2 x   1 − cos x 1 − cos 0 1 − 1 0 lim = = = =? x→0 x2 02 0 0 Using l’Hopital’s rule in this case leads to     1 − cos x sin x sin 0 0 lim = lim = = =? x→0 x2 x→0 2x 2(0) 0

Here we have to differentiate again     sin x cos x cos 0 1 lim = lim = = , x→0 2x x→0 2 2 2 which is the required answer.

rec/00lfc2

8