{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw7_solutions - CS 257 Numerical Methods Homework 7...

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

CS 257 Numerical Methods - Homework 7 November 2, 2006 1. [1pt] 5.2 #7 Solution: We need to find the smallest integer N such that the following relationship holds - 1 12 ( π - 0) h 2 sin ( ξ ) 10 - 12 We can bound the left side as follows - 1 12 πh 2 sin ( ξ ) 1 12 πh 2 sin ( ξ ) Using the fact that sin ( x ) 1 and h = π/N we can write π 3 12 N 2 10 - 12 which implies π 3 10 12 12 1607437 . 8339534581 N Therefore we can chose N = 1607438 No matter how many intervals we use to compute π 0 sin( x ) with the trapezoid rule, we will always compute something less than the true value. This is because sin is a strictly concave function on the interval [0 , π ] 2. [1pt] 5.2 #12 Solution: Like the previous problem, we can bound sin ( x ) 1 for x [2 , 5]. - 1 12 (5 - 2) h 2 sin ( ξ ) 3 · 0 . 01 2 12 = 0 . 000025 3. [1pt] 6.1 #1 Solution: The approximate value is 1 0 1 1 + x 2 1 6 ( f (0) + 4 * f (0 . 5) + f (1)) = 1 6 1 + 4 4 5 + 1 2 0 . 7833333 The true value is arctan(1) - arctan(0) = π/ 4. The error is then 0 . 002064. 4. [1pt] 6.1 #2 a,b Solution: First we compute the second derivative of f f ( x ) = sin π 2 x 2 f ( x ) = πx cos π 2 x 2

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

hw7_solutions - CS 257 Numerical Methods Homework 7...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online