hw3 - ( i ) number of data points used, ( ii ) step size, (...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ENGR 6101: C OMPUTATIONAL E NGINEERING Problem Set 3 (due Monday in my mailbox by 4pm, 09/20) Questions: 1. Compute the integral Z π / 2 0 sin ( x ) dx = 1 in the following ways: (a) (1 pts.) Using Trapezoid rule with two data points ( x = 0 , π 2 ). (b) (1 pts.) Using Trapezoid rule with three data points ( x = 0 , π 4 , π 2 ). (c) (1 pts.) Using Richardson’s extrapolation (Romberg integration) with the results in (a) and (b). (d) (1 pts.) Using Simpson’s rule with 3 data points ( x = 0 , π 4 , π 2 ) (e) (1 pts.) Using Gaussian quadrature with two data points. (f) (1 pts.) Using Gaussian quadrature with three data points. (g) (2 pts.) Write down the exact error (not relative, not approximate) for all of the above. Based on your results, sort the methods according to their accuracy. (h) (2 pts.) Prove that for the following integral Z π / 2 0 f ( x ) dx (c) and (d) will always give the exact same result for any function f ( x ) . 2. Consider the following integral Z 4 0 e x dx (a) (3 pts.) Implement Simpson’s method using Matlab to solve this integral. Your code should print
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ( i ) number of data points used, ( ii ) step size, ( iii ) value of the integral, and ( iv ) exact error 1 . Print your code and include it in your solution. Name your code as simpson.m and submit soft copy as an e-mail attachment to caner@uga.edu. (b) (3 pts.) Find the order of Simpsons method by running your code using various step-sizes. Include the output of your runs, and show clearly the operations you did to estimate the order. 3. (3 pts.) Find the quadrature formula Z 1-1 f ( x ) dx c 2 i = f ( x i ) that is exact for all quadratic polynomials. 4. (3 pts.) Find A , B and C so that the numerical integration rule of the form Z 1-1 xf ( x ) dx Af (-1 ) + Bf ( ) + C f ( 1 ) is exact for all f ( x ) polynomials of maximum degree m . What is m ? 1 Compute the error using the exact value of the integral. 1...
View Full Document

This note was uploaded on 03/16/2011 for the course ENGR 8101 taught by Professor Canor during the Fall '08 term at University of Georgia Athens.

Ask a homework question - tutors are online