14 C HA PT E R 1 Mathematical Preliminaries Since the true value of this integral is , =sin0.1≈0.099833417 bound We could also use a CAS in Example 3.Using Maple,we define f by >f:=c0s(x); ace multiple st on a line and to olon to suppress Maple >a3:-taylor(f,x-0,4):p3:-convert(s3,polynom); The first part computes the Taylor series with four terms (degree 3)and remainder ex- panded about xo =0.The second part converts the series s3 to the polynomial p3 by dropping the remainder.To obtain 11 decimal digits of display we enter >Dgit8:=11 and evaluate f(0.01),P3(0.01),and If(0.01)-P3(0.01)with >y1:=evalf(subs(x=0.01,f)); >y2:-evalf(subs(x=0.01,p3)); >err:=abs(y1-y2); This produce 1(0.0D)(001 f0.01)=0.99995000042.y2=P3(0.01)=0.99995000000.and 42×109 similar to Figure. >plot({f,p3 },x=-Pi.Pi); The commands for the integrals are >q1:=int(f,x=0.0.1) >q2:=1nt(p3,x=0.0.1) >err:=abs(q1-q2); which give the values 01 01 (r)dx .099833416647 and P3(x)dx=0.099833333333 with error0.83314×10-7 Parts (a)and (b)of the example show how two techniques can produce the same ap havedifering accuracy rances.Remember that deten part of our objective.An qually important part is to determine at easta bound for the ccuracy o f the approxim
1.1 Review of Calculus 不 EXERCISE SET 11 1.Show that the following equations have at least one solution in the given intervals x cosx-2x2+3x-1=0.[0.2,0.3)andl.2,1.3] x-22-hx=0.1,2and[e,4 c2xcos(2x)-(x-2)2=0.[2.3]and[3.4] ,x-nx)*=0.[45 2. Find intervals containing solutions to the following equations a.x-3-x=0 b.4x2-e'=0 c. x2-2x2-4x+3=0 d.x3+4.001x2+4.002x+1.101=0 3. Show that f()given intervals a.fx)=1-e+(e-1)sin(π/2)x),l0,1] b.f(x)=(x -1)tanx +x sinx,[0.1] c fx)=xsinπx-x-2)nx, 1,2 d. f(x)=(x-2)sin x In(x+2).「-1.31 Find maxf(x)!for the following functions and intervals fx)=2 g+2x)/3. fx)=(4x-3)/x2-2x),l0.5,1 fx)=2xc0s(2x)-(x-2)2.[2.4 f(x)=1+e 1,2 5. Use the Intermediate Value Theorem and Rolle's Theorem to show that the graph of f(x)= x+2x+k crosses the x-axis exactly once,regardless of the value of the constant k. 6. Suppose f Cla,b]and f'(x)exists on (a,b).Show that if f'(x)0 for all x in (a.b), then there can exist at most one number p in la,with f(p)=0. 7. Let f(x)=x3. 3. Find the second Taylor polynomial P2(x)about xo =O b. Find R(0.5)and the actual error in using p(0.5)to anproximate f(0.5) Repeat part (a)usingxo=1 d.Repeat part (b)using the polynomial from part (c). 8.Find the third Tavlor polynomial P3(x)for the function f(x)=+I about xo =0.Ap- proximate√0.5,√o.75,√.2i.and√T.3 using Pa(x).and find the actual eors. 9. Find the second Taylor polynomial Pa(for the functionf(x)=ecos about=0. 3. Use P2(0.5)to approximate f(0.5).Find an upper bound for error f(0.5)-P2(0.5) using the error formula,and compare it to the actual error. b. Find a bound for the error f(x)-P(x)in using p(x)to approximate f(x)on the interval [o,I). c Approximatef(x)dx(x)dx d.Find an upper bound for the error in (c)usingRa(x)dxl,and compare the bound to the actual error. 10. Repeat Exercise 9 using xo=/6. Find the third Taylor polynomial P(x)for the function f(x)=(x-1)Inx about xo=1
16 C HA PT E R 1.Mathematical Prelliminaries a.Use P3(0.5)to approximate f(0.5).Find an upper bound for error If(0.5)-P3(0.5)1 using the error formula,and compare it to the actual error. b.Find a bound for the error If(x)-P(x)!in using P(x)to appruximate f(x)on the interval [0.5,1.5]. Approximatef(x)dx using()dx. d.Find an upper bound for the ero in (e)using and compare the bound to the actual error. 12.Let f(x)2x cos(2x)-(x 2)2 and xo=0. a.Find the third Taylor polynomial P(x),it toapproximate(4). b. Ise th o fo ula in Taylor'sTheorem to find an upper bound for the(4) )(.Compute C. Find the fourth Taylor polynomial P(x),and use it to approximate f(0.4). d.Use the eror formula in Taylor's Theorem to find an upper bound for the error f(0.4)- P(0.4).Compute the actual error. 13.Find the fourth Taylor polynomial Pa(x)for the function f(x)=xo =0. a. Find an upper b und for()-Pxl.for0≤x≤0.4 b. Approximateof(x)dx usingP4(x)dx. Find an upper bound for the error in (b)usingPa(x)dx d.Approximate f'(0.2)using P(0.2),and find the error. 14.Use the error term of a Taylor polynomial to estimate the error involved in using sinxx to approximate sin1°. 15. Use a Taylor polynomial about/4 to approximate accuracy of 10-. 16. Let f(x)=es in(x/3).Use Maple to d termine the following a The third Maclaurin polynomial P(x) h. (x)and a bound for the errorf(x)-P3(x)on 0.1]. 17. Let f(x)=In(x2+2).Use Maple to dctermine the following. The Taylor polynomial Pa(forf expanded abou 1 b. The maximum error lf(x)-P3(x),for 0x 1. The Maclaurin polynomial (x)for f. d. rfx)-乃xl,for0≤x≤1. e. Does P3(0)approximate f(0)better than P(1)approximates f(1)? 18. Let f(r)=(1x)-and xo =0.Find the nth Taylor polynomial P(x)for f(x)about xo. Find a value of n necessary for P()to approximate /(x)to within 10-on [0.0.5]. 19. Let f(r)=e*and xo =0.Find the nth Taylor polynomial P (x)for f(x)about xo.Find a value ofn necessary for P(x)to approximate f(x)to within 10-6 on [0,0.51. 20 Find the nth Maclaurin polynomial P.(x)for f(x)=arctanx. is to be used to approximate f(x)=cox in(.Find a bound for the maximum error 22. The nth Taylor polynomial for a function f at xo is sometimes referred to as the polynomial of degree at most n that "best"approximates f near xo. a.Explain why this description is accurate. Find the quadratic polynomial that best a oximates a function f near xo =1 if the e the Find ppre n 2.5 to e.The error bound in in F ppr
1.1 Review of Calculus 17 24.The error function defined by the oropability that mal distriband standard dof th t the beevainaom ons.so an approximating technique a.Integrate the Maclaurin scries foreto show that erf(x)= 2户- √示台2k+1)k! b.The error function can also be expressed in the form erf(r)=_ e2 2x2张+1 135.(2k+ Verify that the two series agree fork=1,2,3,and 4.[Hint:Use the Maclaurin series for c.Use the series in part (a)to approximate erf(1)to within 10-7. Use the same umber of terms as in part(c)to approximate erf(1)with the series in par 6 e. Explain why difficulties occur using the series in part(b)to approximate erf(). A function f:[a,b]R is said to satisfy a Lipschitz condition with Lipschitz constantL on【a,b创i近,for everyx,y∈【a.bl,we have If(x)-fyi≤Llx-yH. a. Show that if f satisfies a Lipschitz condition with Lipschitz constant L on an interval [a,b),then f e Cla,b). Show that if f has a deri ative that is bounded on []byL,then f satisfies a Lipschitz condition with Lipschitz[ G节 tha contin ous ona closd interval but docs not satisfy the interva 26.Suppose f Cla,b],that x and x2 are in [a,bl.and that c and cz are positive constants. Show that a number exists between x and xz with f传)=f)+2fe G1+c2 27.Let f Cla,b],and let p be in the open interval (a,b) a. se(p)Show that withf for ll in with (p 5.p+8]a subset of [a,b]. b. Suppose f(p)= ≥0i Show that a exists witf(l≤k,for al -6.p+8].with [p-8.p+8]a subset of [a.bl
18 CH APTE R 1.Mathematical Preillminaries 1.2 Roundoff Errors and Computer Arithmetic The arithmetic performed by a calculator or computer is different from the arithmetic in ose246恤日 =3.n standard computational arithmetic we will have the first two but not always the third.To understand why this is true we must explore the world of finite-digit arithmetic. In our traditional mathematical world we permit numbers with an infinite number of digits.The arithmetic we use in this world defines 3 as that unique positive number that when multiplied by itself produces the integer 3.In the computational world,however,each representable only a fixed,finite number of digits.This me s for exar and not even all of thes ented etly.Si it is given e hose squa vill no se to3 to be acceptable in mos situations.In most cases,then,this machine arithmetic is satis factory and passes without notice or concern,but at times problems arise hecause of this discrepancy. Roundoff error is produced when a calculator or computer is used to perform real- number calculations.It occurs because the arithmetic performed in a machine involves numbers with oply a finite number of digits.with the result that calculations are performed with only approximate re presentations of the actual numbers.In a typical computer,only nall suhse f the real mber system is used for the sentation of all the Thi both pos and negative,an stores thef geth al P In 1985,the itute I Electri ic En ngineers)publisheda single,double,and extended precisions,and these standards are generally followed by all microcomputer manufacturers using floating-point hardware.For example,the mumerical coprocessor for PCs implements a 64-bit (binary digit)representation for a real number. called a long real.The first bit is a sign indicator,denoted s.This is followed by an 11-bit exponent,c,called the characteristic,and a 52-bit binary fraction,f,called the mantissa. The base for the xponent is 2. Since 52 binary digits co ond to betwe sume that a num represented in this system ha ent6and7decimaldiet we ca 5 at lea st 16 decima of preci The exponent of 11 binary digits gives a range ofto =2047.However,using only positive integers for the exponent would not permit an adequate representation of numbers with smadl magnitude.To ensure that numbers with small magnitude are equally representable,1023 is subtracted from the characteristic,so the range of the exponent is actually from-1023 to 1024. osave storage and provide a unique representation for each floating-point number, mposed.Using this system gives a foating-point number of the form (-1)y产2-10(1+f). Consider for example,the machine number 0100000000111011100100010000000000000000000000000000000000000000