hw10_solutions

# hw10_solutions - Homework 10 Math 471 Fall 2007 Assigned...

This preview shows pages 1–3. Sign up to view the full content.

Homework 10 Math 471, Fall 2007 Assigned: Friday, November 16, 2007 Due: Monday, December 3, 2007 Include a cover page Clearly label all plots using title , xlabel , ylabel , legend Use the subplot command to compare multiple plots Include printouts of all Matlab code, labeled with your name, date, section, etc. (1) (Piecewise Linear Interpolation) Use the error theorem on p. 390 to compute an upper bound on the pointwise error from interpolating f ( x ) = e - x 2 on the interval [ - 4 , 4] with piecewise linear functions at the points - 4, - 2, 0, 2, and 4. max x [ - 4 , 4] | e - x 2 - s ( x ) | ≤ 1 8 h 2 max x [ - 4 , 4] | f 00 ( x ) | = 1 . (2) (Cubic Spline Interpolation) P. 403 #10, P. 404 #15 P. 403 #10a j a j b j c j d j 0 0.500 1.49 0.286 -0.153 1 1.43 2.18 0.579 -0.153 2 2.64 2.64 0.350 -0.330 3 4.01 2.75 -0.144 -0.330 P. 403 #10b j a j b j c j d j 0 0.500 1.50 0.756 -0.106 1 1.43 2.18 0.600 -0.175 2 2.64 2.64 0.334 -0.287 3 4.01 2.76 -0.0961 -0.478 P. 404 #15 j a j b j c j d j 0 0.500 1.72 0 0.523 1 1.43 2.11 0.784 -0.297 2 2.64 2.67 0.338 -0.426 3 4.01 2.69 -0.301 0.200 (3) (Richardson Extrapolation) P. 454 #11 (a) Adding the Taylor series for f ( x 0 + h ) and f ( x 0 - h ) gives f ( x 0 + h ) + f ( x 0 - h ) = 2 f ( x 0 ) + h 2 f 00 ( x 0 ) + h 4 12 f (4) ( x 0 ) + h 8 2880 f (8) ( x 0 ) + h 8 2880 [ f (8) ( ξ ) - f (8) ( x 0 )] . Thus 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 f 00 ( x 0 ) = f ( x 0 + h ) - 2 f ( x 0 ) + f ( x 0 - h ) h 2 - h 2 12 f (4) ( x 0 ) - h 4 360 f (6) ( x 0 ) - h 6 2880 f (8) ( x 0 ) + o ( h 6 ) . (b) h O ( h 2 ) O ( h 4 ) O ( h 6 ) 0.5 2.255252 0.25 2.062826 2.049998 0.125 2.015645 2.012500 2.010000 (4) (Newton–Cotes). Suppose that f is a function with four continuous derivatives on the interval [ a, b ]. Recall that the error bound for the composite trapezoidal rule T ( h ) with panel width h is T ( h ) - R b a f ( x ) d x = ( b - a ) h 2 12 f 00 ( ξ ) for some ξ [ a, b ]. The error in the composite Simpson’s rule S ( h ) with panel width h is S ( h ) - R b a f ( x ) d x = ( b - a ) h 4 180 f (4) ( ξ ) for some (different) ξ [ a, b ]. (a) Let f ( x ) = e - x sin x . For the composite trapezoidal rule and the composite Simpson’s rule, find the number of panels n required to integrate f on the interval [0 , 2 π ] with error at most 10 - 4 . Recall that h = 2 π/n . How many function evaluations are required in each case? The first five derivatives of f are f 0 ( x ) = e - x (cos x - sin x ) f 00 ( x ) = - 2e - x cos x f 000 ( x ) = 2e - x (sin x + cos x ) f (4) ( x ) = - 4e - x sin x f (5) ( x ) = 4e - x (sin x - cos x ) To develop the bound for the composite trapezoidal rule, we need to calculate the maximum value of | f 00 ( x ) | on the interval [0 , 2 π ]. The extremum must occur at x = 0, x = 2 π , or at a point where f 000 ( x ) = 0. A short calculation establishes that the maximum occurs when x = 0, so max x [0 , 2 π ] | f 00 ( x ) | = 2 .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern