1.1 Review of Calculus 9 f(0)=-1<0and0 The Intermediate Value Theorem implies that a number x exists, with0 <x< 1, for which x5-2x3+3x2-1=0 As seen in Example 2, the Intermediate Value Theorem is used to determine when lutions to certain problems exist. It does not, however, give an efficient means for finding these solutions. This topic is considered in Chapter 2 Integration The other basic concept of calculus that will be used extensively is the riemann integral Definition 1.12 The Riemann integral of the function f on the interval [a, b] is the following limit, George Fredrich Berhard provided it exists Riemann(1826-1866)made many of the important f(x)dx= lim f(x)△x, discoveries classifying the functions that have integrals. He also did fundamental work in where the numbers xo0,x1,……, xn satisfy a=x≤x≤…≤In=b, where△x=x-x-1, geometry and complex function for each i= 1, 2, .. n, and zi is arbitrarily chosen in the interval [xi-l, xi] the profound mathematicians of the nineteenth century. A function f that is continuous on an interval [a, b] is also Riemann integrable on la, b]. This permits us to choose, for computational convenience, the points x; to be equally spaced in [a, b], and for each i= 1, 2,..., /, to choose z;=x i. In this case, f(r)dr= lim f(x), where the numbers shown in Fi f(x Two other results will be needed in our study of numerical analysis. The first is a generalization of the usual Mean Value Theorem for Integrals Copyright 2010 Cengage Learning. All Rights t materially affect the overall leaming eaperience Cengage Learning reserves the right to remo rty commen may be suppressed from the eBook andor eChaptert'sh. May no be copied, scanned, or duplicated, in whole or in part Due to
1.1 Review of Calculus 9 f (0) = −1 < 0 and 0 < 1 = f (1). The Intermediate Value Theorem implies that a number x exists, with 0 < x < 1, for which x5 − 2x3 + 3x2 − 1 = 0. As seen in Example 2, the Intermediate Value Theorem is used to determine when solutions to certain problems exist. It does not, however, give an efficient means for finding these solutions. This topic is considered in Chapter 2. Integration The other basic concept of calculus that will be used extensively is the Riemann integral. George Fredrich Berhard Riemann (1826–1866) made many of the important discoveries classifying the functions that have integrals. He also did fundamental work in geometry and complex function theory, and is regarded as one of the profound mathematicians of the nineteenth century. Definition 1.12 The Riemann integral of the function f on the interval [a, b] is the following limit, provided it exists: b a f (x) dx = lim max xi→0 n i=1 f (zi) xi, where the numbers x0, x1, ... , xn satisfy a = x0 ≤ x1 ≤···≤ xn = b, where xi = xi−xi−1, for each i = 1, 2, ... , n, and zi is arbitrarily chosen in the interval [xi−1, xi]. A function f that is continuous on an interval [a, b] is also Riemann integrable on [a, b]. This permits us to choose, for computational convenience, the points xi to be equally spaced in [a, b], and for each i = 1, 2, ... , n, to choose zi = xi. In this case, b a f (x) dx = lim n→∞ b − a n n i=1 f (xi), where the numbers shown in Figure 1.8 as xi are xi = a + i(b − a)/n. Figure 1.8 y x y f(x) a x0 x1 x2 xi1 xi xn1 b xn . . . . . . Two other results will be needed in our study of numerical analysis. The first is a generalization of the usual Mean Value Theorem for Integrals. Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
10 CHAPTER 1- Mathematical Preliminaries and Error Analysis Theorem 1.13(Weighted Mean Value Theorem for Integrals Suppose f E Cla, b], the Riemann integral of g exists on [a, b], and g(r) does not change ign on [a, b]. Then there exists a number c in(a, b) with f()g(r)dx=f(c)g()di When g(x)=l, Theorem 1. 13 is the usual Mean Value Theorem for Integrals. It gives the average value of the function f over the interval [ a, b] as(See Figure 1.9 f(c)= f(x)di Figure 1.9 f(x) b The proof of Theorem 1. 13 is not generally given in a basic calculus course but can be found in most analysis texts(see, for example, [Fu], p. 162) Taylor Polynomials and Series The final theorem in this review from calculus describes the Taylor polynomials. These polynomials are used extensively in numerical analysis Theorem 1.14(Taylors The Brook Taylor (1685-1731) Suppose f E C"[a, b], that(n+ exists on [a,b], and xo E [a, b]. For every x E [a, b] described this series in 1715 in there exists a number E(x)between xo and x with the paper Methodus increentorm directa et inversa f(x)=Pn(x)+Rn(r) Special cases of the result, and likely the result itself, had been where previously known to Isaac ewton, James Gregory, and others Pn(x)=f(x0)+f(x0)(x-x0)+ (x-x0) Copyright 2010 Cengage Learning. All Rights t materially affect the overall leaming eaperience Cengage Learning reserves the right to remo rty commen may be suppressed from the eBook andor eChaptert'sh. May no be copied, scanned, or duplicated, in whole or in part Due to
10 CHAPTER 1 Mathematical Preliminaries and Error Analysis Theorem 1.13 (Weighted Mean Value Theorem for Integrals) Suppose f ∈ C[a, b], the Riemann integral of g exists on [a, b], and g(x) does not change sign on [a, b]. Then there exists a number c in (a, b) with b a f (x)g(x) dx = f (c) b a g(x) dx. When g(x) ≡ 1, Theorem 1.13 is the usual Mean Value Theorem for Integrals. It gives the average value of the function f over the interval [a, b] as (See Figure 1.9.) f (c) = 1 b − a b a f (x) dx. Figure 1.9 x y f(c) y f(x) a b c The proof of Theorem 1.13 is not generally given in a basic calculus course but can be found in most analysis texts (see, for example, [Fu], p. 162). Taylor Polynomials and Series The final theorem in this review from calculus describes the Taylor polynomials. These polynomials are used extensively in numerical analysis. Theorem 1.14 (Taylor’s Theorem) Suppose f ∈ Cn[a, b], that f (n+1) exists on [a, b], and x0 ∈ [a, b]. For every x ∈ [a, b], there exists a number ξ(x) between x0 and x with Brook Taylor (1685–1731) described this series in 1715 in the paper Methodus incrementorum directa et inversa. Special cases of the result, and likely the result itself, had been previously known to Isaac Newton, James Gregory, and others. f (x) = Pn(x) + Rn(x), where Pn(x) = f (x0) + f (x0)(x − x0) + f (x0) 2! (x − x0) 2 +···+ f (n) (x0) n! (x − x0) n = n k=0 f (k) (x0) k! (x − x0) k Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1.1 Review of calculus R2(x)=f(() (x-x0) Colin Maclaurin(1698-1746)is best known as the defender of the Here Pn(x) is called the nth Taylor polynomial for f about xo, and Rn(x)is called alculus of Newton when it came the remainder term(or truncation error) associated with Pn(x). Since the number E(x) under bitter attack by the lrish in the truncation error R,(x)depends on the value of x at which the polynomial Pn(x)is philosopher, the Bishop George being evaluated, it is a function of the variable x. However, we should not expect to be Berkeley able to explicitly determine the function 5(x). Taylor's Theorem simply ensures that such a Maclaurin did not discover the function exists, and that its value lies between x and xo. In fact, one of the common problems series that bears his name; it was in numerical methods is to try to determine a realistic bound for the value of f(n+(E(x)) known to 17th century when x is in some specified interval mathematicians before he was The infinite series obtained by taking the limit of Pn(x)as n-oo is called the Taylor born. However, he did devise a series forf about xo. In the case xo=0, the Taylor polynomial is often called a Maclaurin metnod for solving a systemor polynomial, and the Taylor series is often called a Maclaurin series linear equations that is known Cramer's rule which Cramer did The term truncation error in the Taylor polynomial refers to the error involved in not publish until 1750 using a truncated, or finite, summation to approximate the sum of an infinite series Example 3 Let f(x)=cos x and xo=0. Determine (a) the second Taylor polynomial for f about xo; and (b) the third Taylor polynomial for f about xo Solution Since f E C(R), Taylor's Theorem can be applied for any n 20. Also f(x)=-sinx, f"(x)=-cosx, f"(x)=sin x, and f9(r)=cosx, f(0)=1,f(0)=0,f"(0) and f(0)=0 (a) For n =2 and xo =0, we ha cos x=f(O)+f(o)x+f(O), f"(E(r) 去(x) where 5()is some(generally unknown)number between O and x (See Figure 1. 10.) Figure 1.10 Copyright 2010 Cengage Learning. All Rights t materially affect the overall leaming eaperience Cengage Learning reserves the right to remo rty commen may be suppressed from the eBook andor eChaptert'sh. May no be copied, scanned, or duplicated, in whole or in part Due to
1.1 Review of Calculus 11 and Rn(x) = f (n+1) (ξ(x)) (n + 1)! (x − x0) n+1 . Here Pn(x) is called the nth Taylor polynomial for f about x0, and Rn(x) is called the remainder term (or truncation error) associated with Pn(x). Since the number ξ(x) in the truncation error Rn(x) depends on the value of x at which the polynomial Pn(x) is being evaluated, it is a function of the variable x. However, we should not expect to be able to explicitly determine the function ξ(x). Taylor’s Theorem simply ensures that such a function exists, and that its value lies between x and x0. In fact, one of the common problems in numerical methods is to try to determine a realistic bound for the value of f (n+1) (ξ(x)) when x is in some specified interval. Colin Maclaurin (1698–1746) is best known as the defender of the calculus of Newton when it came under bitter attack by the Irish philosopher, the Bishop George Berkeley. The infinite series obtained by taking the limit of Pn(x) as n → ∞ is called the Taylor series for f about x0. In the case x0 = 0, the Taylor polynomial is often called a Maclaurin polynomial, and the Taylor series is often called a Maclaurin series. Maclaurin did not discover the series that bears his name; it was known to 17th century mathematicians before he was born. However, he did devise a method for solving a system of linear equations that is known as Cramer’s rule, which Cramer did not publish until 1750. The term truncation error in the Taylor polynomial refers to the error involved in using a truncated, or finite, summation to approximate the sum of an infinite series. Example 3 Let f (x) = cos x and x0 = 0. Determine (a) the second Taylor polynomial for f about x0; and (b) the third Taylor polynomial for f about x0. Solution Since f ∈ C∞(R), Taylor’s Theorem can be applied for any n ≥ 0. Also, f (x) = − sin x, f (x) = − cos x, f (x) = sin x, and f (4) (x) = cos x, so f (0) = 1, f (0) = 0, f (0) = −1, and f (0) = 0. (a) For n = 2 and x0 = 0, we have cos x = f (0) + f (0)x + f (0) 2! x2 + f (ξ(x)) 3! x3 = 1 − 1 2 x2 + 1 6 x3 sin ξ(x), where ξ(x) is some (generally unknown) number between 0 and x. (See Figure 1.10.) Figure 1.10 y x y cos x y P2(x) 1 x2 1 π π 2 π 2 π 2 1 Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
12 CHAPTER 1 Mathematical Preliminaries and Error Analysis When x=0.01. this becomes cos001=1--(0.01)2+(001)3sin(001)=099959+sin(001) The approximation to cos 0.01 given by the Taylor polynomial is therefore 0.99995. The truncation error, or remainder term, associated with this approximation is sin5(001)=0.16×10-6sinO0.01) 6 where the bar over the 6 in 0.16 is used to indicate that this digit repeats indefinitely Although we have no way of determining sin 5(0.01), we know that all values of the sine lie in the interval [-l, 1, so the error occurring if we use the approximation 0.99995 for the value of cos 0.Ol is bounded by cos(01)-099951=0.16×10-sin(001)≤0.16×10-6 Hence the approximation 0.99995 matches at least the first five digits of cos 0.01, and 09999483<0.9995-1.6×10-6<cos0.01 ≤0.99995+1.6×10-6<0.9999517 The error bound is much larger than the actual error. This is due in part to the poor bound we used for sin 5(x). It is shown in Exercise 24 that for all values of x, we have Isin x≤μxl. Since0≤<0.01, we could have used the fact that sin 5(x)≤0.0 I in the error formula, producing the bound 0.16 x 10-8 (b) Since f(0)=0, the third Taylor polynomial with remainder term about xo =0 cOsr=/、7 x2+x cos E(x) where< 5(r)<0.01. The approximating polynomial remains the same, and the ap- proximation is still 0.99995, but we now have much better accuracy assurance. Since (x)≤ I for all x, we have x*cos 5(x) (0.01)(1)≈4.2×10 cos001-0.9995≤42×10-0, and 0.99994999958=0.99995-42×10-10 cos001≤099995+42×10-10=0.99990000 Example 3 illustrates the two objectives of numerical analysis: (i Find an approximation to the solution of a given problem. (i) Determine a bound for the accuracy of the approximation The Taylor polynomials in both parts provide the same answer to(i), but the third Taylor polynomial gave a much better answer to(ii) than the second Taylor polynomia We can also use the Taylor polynomials to give us approximations to integrals Copyright 2010 Cengage Learning. All Rights May no be copied, scanned, or duplicated, in whole or in part Due to maternally aftec the overall leaning expenence. Cengage Learning rese
12 CHAPTER 1 Mathematical Preliminaries and Error Analysis When x = 0.01, this becomes cos 0.01 = 1 − 1 2 (0.01) 2 + 1 6 (0.01) 3 sin ξ(0.01) = 0.99995 + 10−6 6 sin ξ(0.01). The approximation to cos 0.01 given by the Taylor polynomial is therefore 0.99995. The truncation error, or remainder term, associated with this approximation is 10−6 6 sin ξ(0.01) = 0.16 × 10−6 sin ξ(0.01), where the bar over the 6 in 0.16 is used to indicate that this digit repeats indefinitely. Although we have no way of determining sin ξ(0.01), we know that all values of the sine lie in the interval [−1, 1], so the error occurring if we use the approximation 0.99995 for the value of cos 0.01 is bounded by | cos(0.01) − 0.99995| = 0.16 × 10−6 |sin ξ(0.01)| ≤ 0.16 × 10−6 . Hence the approximation 0.99995 matches at least the first five digits of cos 0.01, and 0.9999483 < 0.99995 − 1.6 × 10−6 ≤ cos 0.01 ≤ 0.99995 + 1.6 × 10−6 < 0.9999517. The error bound is much larger than the actual error. This is due in part to the poor bound we used for |sin ξ(x)|. It is shown in Exercise 24 that for all values of x, we have |sin x|≤|x|. Since 0 ≤ ξ < 0.01, we could have used the fact that |sin ξ(x)| ≤ 0.01 in the error formula, producing the bound 0.16 × 10−8. (b) Since f (0) = 0, the third Taylor polynomial with remainder term about x0 = 0 is cos x = 1 − 1 2 x2 + 1 24x4 cos ξ (˜ x), where 0 < ξ (˜ x) < 0.01. The approximating polynomial remains the same, and the approximation is still 0.99995, but we now have much better accuracy assurance. Since | cos ξ (˜ x)| ≤ 1 for all x, we have 1 24x4 cos ξ (˜ x) ≤ 1 24(0.01) 4 (1) ≈ 4.2 × 10−10. So | cos 0.01 − 0.99995| ≤ 4.2 × 10−10, and 0.99994999958 = 0.99995 − 4.2 × 10−10 ≤ cos 0.01 ≤ 0.99995 + 4.2 × 10−10 = 0.99995000042. Example 3 illustrates the two objectives of numerical analysis: (i) Find an approximation to the solution of a given problem. (ii) Determine a bound for the accuracy of the approximation. The Taylor polynomials in both parts provide the same answer to (i), but the third Taylor polynomial gave a much better answer to (ii) than the second Taylor polynomial. We can also use the Taylor polynomials to give us approximations to integrals. Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it
Illustration We can use the third Taylor polynomial and its remainder term found in Example 3 to approximate Jo x dx. We have (-2)+几 01-2(0.1)3+ S5(x) cxdx01-601)=00983 a bound for the error in this approximation is determined from the integral of the Taylor remainder term and the fact that cos 5(r)l s l for all x x E(x)dx x i cos E(x)ldx 8.3×10 The true value of th cos x dx= sin x= sin 0. 1 N.099833416647 so the actual error for this approximation is 8. x 10, which is within the error We can also use Maple to obtain these results Define f f Maple allows us to place multiple statements on a line separated by either a semicolon or a colon. A semicolon will produce all the output, and a colon suppresses all but the final is given by lor(f,x=0,4):p3 The first statement s3: =taylor(f, x=0, 4)determines the Taylor polynomial about xo =0 with four terms(degree 3) and an indication of its remainder. The second p3 convert(s3, polynom) converts the series s3 to the polynomial p3 by dropping the remainder term Maple normally displays 10 decimal digits for approximations. To instead obtain the 11 digits we want for this illustration, enter and evaluate f(0.01)and P3(0.01)with yl: =evalf(subs(x=0.01, f): y2: =evalf(subs(r=0.01, P3) Copyright 2010 Cengage Learning. All Rights May no be copied, scanned, or duplicated, in whole or in part Due to maternally aftec the overall leaning expenence. Cengage Learning reserves the rig
1.1 Review of Calculus 13 Illustration We can use the third Taylor polynomial and its remainder term found in Example 3 to approximate 0.1 0 cos x dx. We have 0.1 0 cos x dx = 0.1 0 1 − 1 2 x2 dx + 1 24 0.1 0 x4 cos ξ (˜ x) dx = x − 1 6 x3 0.1 0 + 1 24 0.1 0 x4 cos ξ (˜ x) dx = 0.1 − 1 6 (0.1) 3 + 1 24 0.1 0 x4 cos ξ (˜ x) dx. Therefore 0.1 0 cos x dx ≈ 0.1 − 1 6 (0.1) 3 = 0.09983. A bound for the error in this approximation is determined from the integral of the Taylor remainder term and the fact that | cos ξ (˜ x)| ≤ 1 for all x: 1 24 0.1 0 x4 cos ξ (˜ x) dx ≤ 1 24 0.1 0 x4 | cos ξ (˜ x)| dx ≤ 1 24 0.1 0 x4 dx = (0.1)5 120 = 8.3 × 10−8 . The true value of this integral is 0.1 0 cos x dx = sin x 0.1 0 = sin 0.1 ≈ 0.099833416647, so the actual error for this approximation is 8.3314 × 10−8, which is within the error bound. We can also use Maple to obtain these results. Define f by f := cos(x) Maple allows us to place multiple statements on a line separated by either a semicolon or a colon. A semicolon will produce all the output, and a colon suppresses all but the final Maple response. For example, the third Taylor polynomial is given by s3 := taylor(f , x = 0, 4) : p3 := convert(s3, polynom) 1 − 1 2 x2 The first statement s3 := taylor(f , x = 0, 4) determines the Taylor polynomial about x0 = 0 with four terms (degree 3) and an indication of its remainder. The second p3 := convert(s3, polynom) converts the series s3 to the polynomial p3 by dropping the remainder term. Maple normally displays 10 decimal digits for approximations. To instead obtain the 11 digits we want for this illustration, enter Digits := 11 and evaluate f (0.01) and P3(0.01) with y1 := evalf(subs(x = 0.01, f )); y2 := evalf(subs(x = 0.01, p3) Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.