Practice Exam 2 (Solutions)

Similar documents
Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

Math 42: Fall 2015 Midterm 2 November 3, 2015

APPM/MATH Problem Set 6 Solutions

8.3 Numerical Quadrature, Continued

Math 122 Fall Unit Test 1 Review Problems Set A

Chapter 8: Techniques of Integration

5 Numerical Integration & Dierentiation

April 15 Math 2335 sec 001 Spring 2014

MATH 1242 FINAL EXAM Spring,

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Numerical Integration

Math 181, Exam 2, Study Guide 2 Problem 1 Solution. 1 + dx. 1 + (cos x)2 dx. 1 + cos2 xdx. = π ( 1 + cos π 2

Math 106: Review for Final Exam, Part II - SOLUTIONS. (x x 0 ) 2 = !

4.9 APPROXIMATING DEFINITE INTEGRALS

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

Math 1132 Practice Exam 1 Spring 2016

MATH 1014 Tutorial Notes 8

Distance and Velocity

f(x) g(x) = [f (x)g(x) dx + f(x)g (x)dx

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Numerical Methods. King Saud University

Questions from Larson Chapter 4 Topics. 5. Evaluate

Consistency and Convergence

8.4 Integration of Rational Functions by Partial Fractions Lets use the following example as motivation: Ex: Consider I = x+5

Math Practice Exam 2 - solutions

Chapter 4 Integration

1.8. Integration using Tables and CAS

X. Numerical Methods

2015 Math Camp Calculus Exam Solution

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

MA 3021: Numerical Analysis I Numerical Differentiation and Integration

Day 2 Notes: Riemann Sums In calculus, the result of f ( x)

To find an approximate value of the integral, the idea is to replace, on each subinterval

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Ordinary Differential Equations II

Numerical Analysis Exam with Solutions

Math 181, Exam 1, Study Guide 2 Problem 1 Solution. =[17ln 5 +3(5)] [17 ln 1 +3(1)] =17ln = 17ln5+12

Worksheet 9. Topics: Taylor series; using Taylor polynomials for approximate computations. Polar coordinates.

ECE5340/6340: Homework 4 ANSWER KEY

MATH 31B: MIDTERM 2 REVIEW. sin 2 x = 1 cos(2x) dx = x 2 sin(2x) 4. + C = x 2. dx = x sin(2x) + C = x sin x cos x

x 2 y = 1 2. Problem 2. Compute the Taylor series (at the base point 0) for the function 1 (1 x) 3.

Final Exam 12/11/ (16 pts) Find derivatives for each of the following: (a) f(x) = 3 1+ x e + e π [Do not simplify your answer.

Math 230 Mock Final Exam Detailed Solution

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Homework set #7 solutions, Math 128A J. Xia

THE UNIVERSITY OF BRITISH COLUMBIA Sample Questions for Midterm 1 - January 26, 2012 MATH 105 All Sections

The Intermediate Value Theorem If a function f (x) is continuous in the closed interval [ a,b] then [ ]

Section 6.6 Gaussian Quadrature

Integration - Past Edexcel Exam Questions

Spring 2017 Midterm 1 04/26/2017

Warm up: Recall we can approximate R b

Euler s Method, cont d

Solutions to Exam 2, Math 10560

MATH 2250 Exam 1 Solutions

1 Error Analysis for Solving IVP

In numerical analysis quadrature refers to the computation of definite integrals.

Math Real Analysis II

We say that the function f obtains a maximum value provided that there. We say that the function f obtains a minimum value provided that there

1 Exam 1 Spring 2007.

MATH 2300 review problems for Exam 1 ANSWERS

Scientific Computing: Numerical Integration

MATH 19520/51 Class 11

6 Lecture 6b: the Euler Maclaurin formula

Lecture 21: Numerical Solution of Differential Equations

Applied Calculus I. Lecture 29

Math 112 Section 10 Lecture notes, 1/7/04

Math 112 Rahman. Week Taylor Series Suppose the function f has the following power series:

12.0 Properties of orthogonal polynomials

Solutions to Exam 1, Math Solution. Because f(x) is one-to-one, we know the inverse function exists. Recall that (f 1 ) (a) =

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 257: Numerical Methods

4.3. Riemann Sums. Riemann Sums. Riemann Sums and Definite Integrals. Objectives

Essex County College Division of Mathematics MTH-122 Assessments. Honor Code

Calculus of Variations Summer Term 2014

Fall 2013 Hour Exam 2 11/08/13 Time Limit: 50 Minutes

SOLUTIONS TO EXAM II, MATH f(x)dx where a table of values for the function f(x) is given below.

Math123 Lecture 1. Dr. Robert C. Busby. Lecturer: Office: Korman 266 Phone :

Math Exam III - Spring

Differential Equations

Romberg Integration and Gaussian Quadrature

TEACHER NOTES MATH NSPIRED

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

This practice exam is intended to help you prepare for the final exam for MTH 142 Calculus II.

Math-3315 & CSE-3365, exam 2 answer sheet

Math 115 HW #5 Solutions

Ordinary Differential Equations II

Math 131. The Derivative and the Tangent Line Problem Larson Section 2.1

Math 162: Calculus IIA

Exam 3, Math Fall 2016 October 19, 2016

Math 106 Fall 2014 Exam 2.1 October 31, ln(x) x 3 dx = 1. 2 x 2 ln(x) + = 1 2 x 2 ln(x) + 1. = 1 2 x 2 ln(x) 1 4 x 2 + C

Math 113 (Calculus 2) Exam 4

Differentiation and Integration

Chapter 6 Section Antiderivatives and Indefinite Integrals

Math 181, Exam 1, Study Guide Problem 1 Solution. xe x2 dx = e x2 xdx. = e u 1 2 du = 1. e u du. = 1 2 eu + C. = 1 2 ex2 + C

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

MATH 20B MIDTERM #2 REVIEW

Chapter 8 Indeterminate Forms and Improper Integrals Math Class Notes

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Integration. Copyright Cengage Learning. All rights reserved.

Transcription:

Math 5, Fall 7 Practice Exam (Solutions). Using the points f(x), f(x h) and f(x + h) we want to derive an approximation f (x) a f(x) + a f(x h) + a f(x + h). (a) Write the linear system that you must solve to find the coefficients {a k } (do not solve). (b) If the solution to this system is a =, a h =, a h =, write the approximation h formula for f (x). (c) What is the order of accuracy for this approximation (e.g. O(h 8 )) (a) We have coefficients, so we ll write out the first 5 terms in each Taylor series, f(x) = f(x) f(x h) = f(x) hf (x) + h f (x) h f (x) + h f () (x) + O ( h 5) f(x + h) = f(x) + hf (x) + 9h f (x) + 7h f (x) + 8h f () (x) + O ( h 5). Combining these with our a coefficients, we have a f(x) + a f(x h) + a f(x + h) = f(x) [a + a + a ] + hf (x) [ a + a ] + h f (x) [a + 9a ] + h f (x) [ a + 7a ] + h f () (x) [a + 8a ] + O ( h 5). We have coefficients, and we are trying to compute f (x), so to find our coefficients we would solve the equations a + a + a = a a + a = a = a + 9a = 9 a h h (b) With those coefficients, we would plug them into our original approximation formula to obtain f (x) h f(x) + f(x h) + f(x + h). h h

(c) We analyze the left-over terms in our linear combination above: h f (x) [ a + 7a ] + h f () (x) [a + 8a ] + O ( h 5) [ h + 7 ] [ h + h f () (x) h + 8 h = h f (x) = h f (x) + 7h f () (x) + O ( h 5) = O(h). ] + O ( h 5). Let f(x) = x x + x (a) Evaluate f(), f(), f(), f() and f(). (b) Approximate f(x) dx using the composite midpoint rule with subintervals. What is (c) Approximate f(x) dx using the composite trapezoid rule with subintervals. What is (d) Approximate f(x) dx using the composite Simpson s rule with subintervals. What is (a) (b) The true integral is f() = () () + () =, f() = () () + () = + =, f() = () () + () = 8 + =, f() = () () + () = 7 7 + =, f() = () () + () = 8 + 8 =. (x x + x ) dx = ( ) x x + x x = + =. The composite midpoint rule for this integral with two subintervals is f(x) dx = f(x) dx + Hence the relative error is =. f(x) dx f() + f() = ( ) + () =.

(c) The composite trapezoid rule for this integral with two subintervals is f(x) dx+ f(x) dx [f() + f()]+ [f() + f()] = + = Hence the relative error is =. (d) The composite Simpson s rule for this integral with two subintervals is f(x) dx + f(x) dx [f() + f() + f()] + [f() + f() + f()] = [ + ( ) + () + ] = [] = Hence the relative error is =.

. Suppose that you want to approximate the integral dx + x using the composite Midpoint and composite Simpson rules over a uniform partition, = x < x <... < x n =, Imp(f) c and IS c (f). Write formulas for the minimum number of subintervals required for each method to guarantee an error below 8. [i.e. formulas of the form n >... ] We begin by writing down the error formulas for the composite Midpoint and composite Simpson rules (I ll use the version from our lecture notes, since in both cases h = (b a)/n): I(f) I c mp(f) = (b a)mh, M = max f (x), x [a,b] I(f) IS(f) c (b a) Mh =, M = max 88 f (x). x [a,b] In both cases, (b a) = ( ( )) = and h = (b a)/n = /n. So in order to proceed, we must compute both M and M. Let s start by taking the requisite derivatives of our integrand, f(x) = ( + x) : f (x) = ( + x) = ( + x), f (x) = ( + x) = f (x) = ( + x) = ( + x), f (x) = ( + x) 5 = ( + x), ( + x) 5. The absolute value of each of these will be maximized over x [, ] when the denominator is closest to zero, i.e., at x =, hence we have M = max x [,] ( + x) = ( ) =, M = max x [,] ( + x) 5 = ( ) 5 =. Inserting our values for (b a), M and M, and our formula for h, into the composite error formulas, we have I(f) I c mp(f) = ()()( ) n = n, I(f) I c S(f) = ()()( ) 88n = 5n. Our goal is for these to be below 8. Hence for the composite mipoint method, we need ( ) n < 8 / 8 8 < n n >. Similarly, for the composite Simpson method, we need 5n < 8 5 8 < n n > ( ) 8 /. 5

. Consider the quadrature rule f(x) dx ( 5 f ) + ( ) 5 f. (a) What is the degree of precision of this method (b) What is corresponding order of accuracy when this is applied in a composite rule where each subinterval has width h (c) Use this method to approximate the integral x + dx. (a) We compare the quadrature rule against the analytical integrals of the functions f {, x, x, x,... }, until these first disagree: = = = dx x dx x dx = ( ) + 5 5 ) + = ( 5 = ( 5 ) + 5 Hence the degree of precision for the method is. ( ) = 5 + 5 =, ( ) = 5 5 + 5 =, ( ) = 5 + 5 = X. (b) Based on Theorem..8 from our class lecture notes, the composite method based on this approximation will have error O ( h ). (c) In order to apply our approximation method, that is defined for the integration interval [, ], to the requested integral over the interval [, ], we must first use the change of variables, b a f(x) dx = b a f ( b a y + a + b ) dy, to convert the problem to the correct interval. For this problem, we have [a, b] = [, ], so (b a) =, (b a)/ = and (a + b)/ =, so x + dx = f (y + ) dy = We may now apply our approximation formula: y + 8 dy ( ) + ( ) 5 + 8 5 + 8 = 5 + 8 5 = 5. y + + dy = = 5 ( ) + 5 5 y + 8 dy. ( ) 5