This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
**Unformatted text preview: **Exam 3: Least Squres Fitting, Numerical Integration, and Root Finding MATH 3315 / CSE 3365 : 801C – Spring Semester 2007 Total points: 100 Thursday 26 April The SMU honor code applies. Don’t forget to write and sign your name. An answer should include necessary steps, unless it requires only one step. Question 1 (one- or two-step problems, 4 points each, 20 points) (1) Write down the midpoint rule R M ( f ) for approximating the definite integral I ( f ) = R 2 e x d x , then calculate the value of the approximation. Answer: R M ( f ) = (2- 0) f 2 + 0 2 = 2 f (1) = 2 e 1 = 2 e. (2) Write down the trapezoidal rule R T ( f ) for approximating the definite integral I ( f ) = R 1 x 2 d x , then calculate the value of the approximation. Answer: R T ( f ) = 1- 2 [ f (0) + f (1)] = 1 2 [0 2 + 1 2 ] = 1 2 . (3) Write down Simpson’s rule R S ( f ) for approximating the definite integral I ( f ) = R π sin( x )d x , then calculate the value of the approximation. Answer: R S ( f ) = π- 6 [ f (0) + 4 f 0 + π 2 + f ( π )] = π 6 [sin(0) + 4 sin π 2 + sin( π )] = 2 π 3 . (4) Write down the Newton iteration for finding a simple root of the function f ( x ) = x 2- x- 2. ( Note: No calculations are needed.) Answer: g ( x ) = x- f ( x ) f ( x ) = x- x 2- x- 2 2 x- 1 = x 2 + 2 2 x- 1 , x n +1 = g ( x n ) = x 2 n + 2 2 x n- 1 , n = 0 , 1 , 2 , ··· . 1 (5) Write down the values of the points in the closed 4-point Newton-Cotes rule for approximating the definite integral I ( f ) = R 1- 1 f ( x )d x . ( Hint: Think about the meaning of “closed”, “4-point”, and how the points in Newton-Cotes rules are distributed.) Answer: x =- 1 , x 1 =- 1 3 , x 2 = 1 3 , x 3 = 1 . Question 2 (15 points) Find the least squares linear polynomial fit p 1 ( x ) = a + a 1 x to the data set i x i f i- 4- 3 1- 2- 2 2 2 3 4 1 Answer: The normal equations are " ∑ N i =0 1 ∑ N i =0 x i ∑ N i =0 x i ∑ N i =0 x 2 i # a a 1 = " ∑ N i =0 f i ∑ N i =0 f i x i # ....

View
Full Document