Section 1.1: Question is like: 2a. Produce the linear and quadratic Taylor polynomials for f ( x) x around x=1. (for lab, plot these plus the original function) 2b. Produce the linear and quadratic Taylor polynomials for f ( x) sin x around x= / 4 . (for lab, plot these plus the original function) 3b. Produce a general formual for the nth degree Taylor polynomial for f ( x) sin x around x=0. 4. Does f ( x) 3 x have a Taylor polynomial approximation of degree 1 around x=0? Does f ( x) 3 x have a Taylor polynomial approximation of degree 1 around x=1? Explain/justify your answers. 9a. Find the Taylor polynomial of degree 4 for f ( x) e x around x=0 directly. 9b. Use the Taylor polynomial of degree 4 for f ( x) e x around x=0 and substitute –x for x to obtain the Taylor polynomial of degree 4 for f ( x) e x . 10a. Find the Taylor polynomial of degree 4 for f ( x) cos x 2 around x=0 directly. 10b. Use the Taylor polynomial of degree 4 for f ( x) cos x around x=0 and substitute x2 for x to obtain the Taylor polynomial of degree 4 for f ( x) cos x 2 . 11. Use the results of the previous problem to approximate g ( x) cos x 2 1 x4 near x=0 and determine an appropriate value for g (0) . (for lab, plot this function on an interval around x=0 to check your result) 13. Consider f ( x) cos x on the interval 0, Find the Taylor polynomial of degree 1 around x=0 Find the Taylor polynomial of degree 1 around x= / 2 Find the line connecting 0, f (0) and , f ( ) (lab, plot these functions: comment on which is the best approximation to f on 0, 14. Extra credit: Consider f ( x) cos x on the interval 0, Find the Taylor polynomial of degree 3 around x=0 Find the cubic polynomial, g x , satisfying: g 0 f 0 ; g f ; g ' 0 f ' 0 ; g ' f ' ; (lab, plot these functions: comment on which is the best approximation to f on 0, Section 1.2 p.18 Questions similar to Bound the error in the cubic Taylor polynomial for f ( x) e x on the interval [-1, 1] and compare to the true values at x=-1 and at x=1. 3. Bound the error in the linear Taylor polynomial for f ( x) x on the interval [8, 8+ ] Bound the error in the quadratic Taylor polynomial for f ( x) x on the interval [8, 8+ ] 4. Bound the error in approximating sin x by x on / 4, / 4 . The percentage error is sin x x sin x x . How large can x be and still be sure error is sin x x less than 1%. 9. ln 1 x xe x /2 x 0 x3 Use Taylor polynomials to evaluate: lim ex 1 0 x dx to an accuracy of 10-6 by replacing the numerator with a Taylor series with remainder. 1 13. Evaluate Section 1.3 p. 30 Questions similar to: 1 1 cos t dt such that the error for any value of x on 4. Find enough terms of a power series for x 0 t2 [0, 1] will be no more than 5*10-9. x Section 2.2 p. 54 Questions similar to: 1 a,c,e Find the error, relative error and number of significant digits if: (T=true; A=approximate) a. xT 28.254 and xA 28.271 b. xT e and xA 19 / 7 c. xT ln 2 and xA 0.7 6 afh Use Taylor polynomials around x=0 to find approximations up to x4 for the following expressions and find the limits as x 0 . ex 1 a. x f. x sin x x3 h. x ln(1 x) x2 9. Use the quadratic formula to solve x 2 26 x 1 0 keeping 4 digits rounded at each step. Do the same by using the conjugate to solve for the “problematic” root keeping 4 digits rounded at each step. 13. Find the Taylor series through the quadratic term (around 0 ) for the expression 1 f ( ) 1 1 . Use the result to evaluate lim xf . x x Section 2.3 p. 62 Questions similar to: 1. If all the numbers here are rounded correctly find the smallest interval in which the following quantities must lie: a. 1.1062 + 0.947 b. 1.1062 * 0.947 c. 1.1062 / 0.947 5. Use the Mean Value Theorem to bound the error in evaluating tan 1 2.62 if the true value was rounded correctly to 2.62. Bound the relative error too. Section 2.4 p. 69 Questions similar to: 5 1a. Consider the sum 1 i i 1 . Evaluate this sum 3 ways, first find the exact value, next use 3 i 1 digit chopping at each step to evaluate, and finally use 3 digit chopping at each step but starting with the last term (when i=5) and working down (to i=1). What do you learn (in a sentence or two) from this? Section 3.1 Bisection p. 77 Questions similar to: 1abdg. Use an initial interval of length 1 (with integer values for the initial value of a and b) and perform 2 steps of bisection to find a smaller interval on which the root must lie. (Bring different parts of the expressions to different sides of the equations and sketching the functions may be helpful). What value would you guess the root to be? How close to the true value are you guaranteed to be? How many steps of bisection would be needed to be sure your guess for the root is within 10-5 of the true root? (Check your answer in lab) a. The real root of x3 x 2 x 1 0 . b. x 1 0.3cos x d. x e x g. All real roots of x 4 x 1 0 10. In trying to find the smallest positive solution to e x sin x , the curves y e x and y sin x are sketched to find a reasonable interval in which this solution must lie. How many steps of the bisection method are needed to guarantee you are within 10-9 of the true root? (Check you answer in lab) 11. What curves would you sketch to get a feel for where the smallest positive solution to 1 x sin x 0 must lie? Find such an interval. How many steps of the bisection method are needed to guarantee you are within 10-9 of the true root? Section 3.2 Newton p. 88 Questions similar to: 2abdg. Use the left end of the initial you used in each part of the problem in section 3.1 for each of the roots of the following and perform 2 steps of Newton’s method to improve your guess. In lab see how many steps of Newton’s method are needed get within 10-5 of the true root and compare with how many steps bisection takes (from the previous HW) a. The real root of x3 x 2 x 1 0 . b. x 1 0.3cos x d. x e x g. All real roots of x 4 x 1 0 4. Find the mth roots of 2 where m=3, 4, 5, 6 to within 10-6 in lab by solving x m 2 0 . Just show the set-up for the hand-in HW. For the lab produce a column of the iterates, a column of the error at each step (i.e. | true value – this iterate| or x* xn ) and the change at the next step of the iteration (i.e. xn1 xn ). The values in these last 2 columns should be pretty close indicating the Newton’s method greatly reduces the error each step. Not in book: Suppose you are using Newton’s method for f ( x) 0 with a starting guess with error no more than 0.4 units. Suppose further that 0.25 f '' x 0.5 and 2 f ' x 3 for all values of x within 1 unit of the root. After 3 steps of Newton’s method, you are then guaranteed to be within how many units of the true root. (That is, find a good upper bound for the error after 3 steps of Newton’s method). Section 3.3 Secant p. 96 Questions similar to: 1abdg Use secant method using the intervals you used for bisection in Section 3.1. Perform 2 steps of secant method in each case. In lab, investigate how many steps are needed to get within 10-5 of the true root and compare with how many steps bisection and Newton took. Section 3.4 p. 106 Questions similar to: 3. Consider solving for the root of x e x using the iteration scheme xn 1 e xn . For which initial guess values x0 should the method converge? Find the next 4 iterates using x0=0. Use Aitken’s method to improve these iterates. 6. In solving for 5 , we consider the equation x 2 5 0 and rewrite it as x x c x 2 5 . For what value(s) of c does the iteration scheme xn 1 xn c xn2 5 converge to the positive root, 5 , for a starting guess close enough to the root? 7. What, if any, are the solutions of x 1 x ? Which, if any of these solutions, does the iteration scheme xn1 1 xn converge to for a starting guess close enough to the root? 8a. For a starting guess close enough to the root, x* 1 , does the iteration scheme: 15 xn2 24 xn 13 converge and if so, what is the order of convergence? If the order of xn1 4 xn convergence is 1, by roughly what factor is the error reduced at each step. 8b. For a starting guess close enough to the root, x* 2 , does the iteration scheme: 3 1 xn 1 xn 3 converge and if so, what is the order of convergence? If the order of convergence 4 xn is 1, by roughly what factor is the error reduced at each step. Section 3.5 p. 116 Questions similar to: 8. Newton’s method is used to find a root of f ( x) 0 but is converging slowly. Why might this be happening? Use Aitken’s method to improve on the given iterates: x0 x1 x2 x3 x4 x5 1.0000 0.4286 0.2037 0.0997 0.0493 0.245 Section 4.1 p. 131 Questions similar to: 1a. Given the data points (0, 2) and (1, 1) find the equation of the line through these points. 1b. Given the data points (0, 2) and (1, 1) find a and b such that the curve f x a be x passes through these points. 2b. Find the equation of the quadratic polynomial that passes through (0, 2) (1/2, 5) and (1, 4). Find the roots of this quadratic and any maxima or minima. 8a. Find the equation of the quadratic polynomial that passes through (0, 1) (1, 3) and (2, 5). Comment on the result. 11 and 12. There is exactly one nth degree polynomial that passes through n+1 specified points. Explain why L0 x L1 x L2 x L3 x 1 for all x. 17. Find three quadratic polynomials such that: p1 x0 1; p1 x1 0; p1 ' x1 0; p2 x0 0; p2 x1 1; p2 ' x1 0; p3 x0 0; p3 x1 0; p3 ' x1 1; Then write the polynomial, q(x), satisfying: q x0 y0 ; q x1 y1; q ' x1 y2 ; as a linear combination of p1 , p2 and p3 . Not in the text: Produce a Newton’s divided difference table for the points (-1, -10) (0, -2) (1, -2) and (3, -2). Use the table to write the quadratic through the first 3 points and the quadratic through the final 3 points. Use the table also to write the cubic through all 4 points in two ways. Section 4.2 p. 143 Questions similar to: 4a. If a table is to be constructed of values of sin x on 0, / 2 , how small should the spacing between the x values be to guarantee that piecewise linear interpolation will give an error of no more than 10-6? 4b. If a table is to be constructed of values of sin x on 0, / 2 , how small should the spacing between the x values be to guarantee that piecewise quadratic interpolation will give an error of no more than 10-6? 7. If a table is to be constructed of values of x on 1,100 , how small should the spacing between the x values be to guarantee that piecewise linear interpolation will give an error of no more than 10-6? Compare the error bounds near x=1, x=50, and x=100. Section 4.3 p. 156 Questions similar to: 1. Consider the points (0, 1) (1, 1) and (2, 5). a. Find the piecewise linear interpolating function through these points and the value it gives at x=1.5. b. Find the quadratic interpolating function through these points and the value it gives at x=1.5. c. Find the natural cubic spline through these points and the value it gives at x=1.5. 2b. Find the cubic spline using the not-a-knot boundary condition for the points in the table: x 1 2 3 4 5 y 3 1 2 3 (Use just the 3 points x=1, 3, and 5 with x=2 and 4 for the not-a-knot conditions). 2 2 x3 0 x 1 3 2 12. Verify that: s x x 3x 3x 1 on 1 x 2 is a cubic spline on [0, 3]. Is it natural or 9 x 2 15 x 9 2 x3 clamped? 16. Find, if possible, the value of a, b, c, and d such that the function x 13 2 x 1 3 s x ax bx 2 cx d on 1 x 1 is a cubic spline. 9 x 2 3 1 x 3 Section 5.1 p. 200 Questions similar to: 2. Use the Midpoint Rule, the Trapezoidal Rule and Simpson’s Rule to approximate the value of integrals a, b, and f using n=2 and n=4. In lab, evaluate all the integrals for n=2, 4, 8, …, 512 using the Trapezoidal Rule and Simpson’s Rule. Find the errors and the ratios by which the errors decrease. Comment on the results. e 1 x a. e cos 4 x dx 17 0 1 b. x 5/2 dx 0 2 7 d. e cos x dx 7.95492652101284 cos x dx 1.93973485062365 /4 e. e 0 1 f. 0 xdx 2 3 b 5b. The arclength of a curve is given by 1 f ' x dx . Use (in lab) Trapezoidal rule and 2 a Simpson’s Rule ( with n=2, 4, 8, …, 512) to compute the length of f x e x on 0 x 1 . For HW just work out the setup. 10a. Derive Boole’s Method by setting up an integration scheme on [-2h, 2h] that has the highest possible degree of precision possible and is of the form: 2h f x dx 2 h a2 f 2h a1 f h a0 f 0 a1 f h a2 f 2h 1 10b. Use Midpoint Method, Trapezoidal Rule, Simpson’s Rule and Boole’s Method for dx 1 x 0 using 4 subintervals (i.e. intervals [0, 1/4] …[3/4, 1]) and compare with the exact answer (give the error for each). 11. Find the degree of precision for Midpoint Method, Trapezoidal Rule, Simpson’s Rule and Boole’s Method. (This means the highest degree polynomial the method is exact for – so show the method is exact for 1dx, xdx,..., x r dx but not for x r 1dx 1 12. Determine the degree of precision of the approximation 1 3 2 f x dx 4 f 0 4 f 3 . 0 Section 5.2 p. 215 Questions similar to: 7a. How small must the grid spacing, h, be such that using the Trapezoidal Rule to compute 3 ln xdx gives an error no more than 10-8 using the rigorous error bound? So how many grid 1 points are needed? Do the same using the asymptotic error bound. Do NOT compute the integral. 3 7b. How small must the grid spacing, h, be such that using Simpson’s Rule to compute ln xdx 1 -8 gives an error no more than 10 using the rigorous error bound? So how many grid points are needed? Do the same using the asymptotic error bound. Do NOT compute the integral. Not in text: The following results come from applying the Trapezoidal Rule and Simpson’s Rule 5 dx to evaluate 1 x2 5 h Trapezoidal Simpson 1 1/2 2.812366394 2.746208162 2.904693653 2.742908018 1/4 2.746647510 2.746793959 1/8 2.746763015 2.746801517 Use Richardson Extrapolation to improve these results as much as possible given that these methods have error terms of the form: Trapezoidal approximation = Exact +c1h2 c2 h4 c3h6 ... Simpson approximation = Exact +c1h4 c2 h6 c3h8 ... Section 5.3 p. 229 Questions similar to: 1, 2 Use Gaussian Quadrature (weights and nodes as given in the text p. 223) to compute: 1 1 e dx e e x 1 x e cos 4 x dx 0 1 x 5/2 dx 0 e 1 17 2 7 e cos x dx 7.95492652101284 /4 e cos x dx 1.93973485062365 0 1 0 xdx 2 3 using 2 nodes and 3 nodes for each and compare with your results (for the final 5 of these) to your results in section 5.1. 1 8. Determine the constants, c1 and c2 , so that f x dx c f 0 c f 1 is exact for all 1 2 0 polynomials of as large a degree as possible. What is the degree of precision? 9. Determine the constants, 1 , 2 and x2 , so that 1 f x dx f 0 f x is exact for all 1 2 2 0 polynomials of as large a degree as possible. What is the degree of precision? /2 f x dx 1 f x1 is exact for all 1 x2 polynomials, f x , of as large a degree as possible. What is the degree of precision? 10. Determine the constants, 1 , and x1 , so that /2 Section 5.4 p. 241 Questions similar to: Not in text: For the forward difference method f ' x f x h f x , find the error terms through h6. h f x h f x h f ' x f '' x ... h 2 f x h f x h For the centered difference method f ' x , find the error terms through h6. 2h f x h f x h That is, write f ' x ... 2h f x h 2 f x f x h For the difference method f '' x , find the error terms through h2 f x h 2 f x f x h h6. That is, write f '' x ... h2 Use these 3 methods to compute the first or second derivative of f x e x at x=0 using h=1 and That is, write h=1/2. Use one step of Richardson extrapolation to improve the results. In lab, use values of h down to 1/128 and compute the ratio of the errors as the step size decreases. Do this also (in lab) for the set of h values 1, 1/3, 1/9 down to 1/243. Use the Lagrange polynomial through f 0 , f 2h and f 3h to find a difference formula for f ' 0 of the form f ' 0 c1 f 0 c2 f 2h c3 f 3h and find the leading error term. Use the method of undetermined coefficients to find the same formula and error term. Section 8.2 p. 384 Questions similar to: 1a. Use Euler’s Method with step size h=1 to approximate Y(3) for: Y ' x cos2 Y x with Y 0 0 In lab, use Euler’s Method to compute Y(10) using step sizes h=1, ½, ¼, …, 1/64 and compute the ratio of the errors as step size decreases and the order of convergence, exact solution is Y x tan 1 x . Like 1 with a different equation. Use Euler’s Method with step size h=1 to approximate Y(4) for: 2 2 Y ' x 2 Y x - - 3 with Y 1 4 (use the positive square root) x x In lab, use Euler’s Method to compute Y(10) using step sizes h=1, ½, ¼, …, 1/64 and compute the ratio of the errors as step size decreases and the order of convergence, exact solution is 2 1 Y x x . x Section 8.3 p. 392 Questions similar to: 1. Use Euler’s Method with step size h =3, 2, 1 and 1/2 to approximate Y(6) for: Y ' x Y x with Y 0 1 . Compare the errors (exact solution is Y x e x ) with the error bound Y b y b e K max b x0 K Y x0 y x0 f x, z z eb x0 K 1 h Y '' x where xmax x b 2K 0 6. In lab, consider the differential equation, Y ' x x 1 with Y 0 0. Use Euler’s Method to compute approximations for Y 1 for: 2.5 and h 1/ 2,1/ 4,...1/ 32 1.5 and h 1/ 2,1/ 4,...1/ 32 1.1 and h 1/ 2,1/ 4,...1/ 32 The exact solution is Y x x . Compute the error ratios to determine the order of convergence. Section 8.4 p. 405 Questions similar to: 1. Analyze the stability of the scheme yn1 yn hf xn1 , yn hf xn1 , yn for Y ' x Y x with Y 0 1. h 2a. Analyze the stability of the scheme yn 1 yn f xn , yn f xn 1 , yn 1 2 for Y ' x Y x with Y 0 1. h 2b. Analyze the stability of the scheme yn 1 yn f xn , yn f xn 1 , yn hf xn , yn 2 for Y ' x Y x with Y 0 1. Section 8.5 p. 421 Questions similar to: 2a1. Use Second Order Taylor’s Method with step size h=1 to approximate Y(3) for: Y ' x cos2 Y x with Y 0 0 In lab, use Second Order Taylor’s Method to compute Y(10) using step sizes h=1, ½, ¼, …, 1/64 and compute the ratio of the errors as step size decreases and the order of convergence, exact solution is Y x tan 1 x . 2a2. Use the Second Order Runge Kutta Method h yn 1 yn f xn , yn f xn 1 , yn hf xn , yn 2 with step size h=1 to approximate Y(3) for: Y ' x cos2 Y x with Y 0 0 In lab, use Second Order Runge Kutta Method to compute Y(10) using step sizes h=1, ½, ¼, …, 1/64 and compute the ratio of the errors as step size decreases and the order of convergence, exact solution is Y x tan 1 x . 2a3. Use the Fourth Order Runge Kutta Method v1 f xn , yn h h v2 f xn , yn v1 2 2 h h v3 f xn , yn v2 2 2 v4 f xn h, yn hv3 h v1 2v2 2v3 v4 6 with step size h=1 to approximate Y(2) for: Y ' x cos2 Y x with Y 0 0 In lab, use Second Order Runge Kutta Method to compute Y(10) using step sizes h=1, ½, ¼, …, 1/64 and compute the ratio of the errors as step size decreases and the order of convergence, exact solution is Y x tan 1 x . yn 1 yn Section 8.7 p. 441 Questions similar to: 1a. Apply Euler’s method with step size h=1 to approximate Y 2 for Y ' AY G with 1 2 x 1 . A= ; G 2 and Y 0 2 1 x 3 3a. Write the 3rd order ordinary differential equation: Y ''' 4Y '' 5Y ' 2Y 2 x 2 10 x 8 with Y 0 1, Y ' 0 1, Y '' 0 3 as a system of first order ordinary differential equations. Then apply Euler’s method with step size h=1 to approximate Y 2 . (In lab, use Euler’s Method with step size 1/10 to compute Y 2 )