128ahw2sum10

# 128ahw2sum10 - MATH 128A, SUMMER 2010, HOMEWORK 2 SOLUTION...

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

MATH 128A, SUMMER 2010, HOMEWORK 2 SOLUTION BENJAMIN JOHNSON Homework 2: Due Wednesday, June 30 1.3; 1ab, 6b, 13b, 16 2.1; 2b, 13, 17 2.2; 1d, 4, 8, 17 section 1.3 1. a. Use three-digit chopping arithmetic to compute the sum 10 i =1 (1 /i 2 ) ﬁrst by 1 1 + 1 4 + ··· + 1 100 and then by 1 100 + 1 81 + ··· + 1 1 . Which method is more accurate and why? solution: The sequence of partial answers obtained by computing the ﬁrst sum is h 1 . 00 , 1 . 25 , 1 . 36 , 1 . 42 , 1 . 46 , 1 . 48 , 1 . 50 , 1 . 51 , 1 . 52 , 1 . 53 i . The sequence obtained by doing the same sum in reverse order is h 0 . 01 , 0 . 0223 , 0 . 0379 , 0 . 0583 , 0 . 0860 ,. 0860 ,. 0126 , 0 . 188 , 0 . 299 , 0 . 549 , 1 . 54 i . The second sequence is more accurate because it is able to use more signiﬁcant digits for all steps of the computation due to the 1 not being in the ﬁrst decimal position. b. Write an algorithm to sum the ﬁnite series N i =1 x i in reverse order. solution: INPUT N,x 1 ,...,x N OUTPUT N i =1 x i (evaluated in reverse order) Step 1 Set SUM=0. Step 2 For i=N to 1 do (consider variables in reverse order) set SUM = SUM + x i . Step 3 OUTPUT SUM; STOP. 6. Find the rate of convergence of the following sequences as n → ∞ . b. lim n →∞ sin 1 n 2 = 0 solution: We need to ﬁnd upper and lower bounds for the sequence ± | sin 1 n 2 - 0 | ² = ± sin 1 n 2 ² . Using Taylor’s theorem to expand sin x about x 0 = 0, we get sin x = sin 0 + cos 0 · x - sin 0 2 x 2 - cos c 6 x 3 = x - x 3 cos c 6 where c is some number between x and 0. Since - 1 cos c 1 for every c we can deduce that x - x 3 6 sin x x + x 3 6 for every x . Furthermore, for x [0 , 1], we have x 3 x and so 5 6 x sin x 7 6 x . Since 1 n 2 [0 , 1] for every n , this bound applies to our sequence, that is: 5 6 · 1 n 2 sin 1 n 2 7 6 · 1 n 2 , which shows that the rate of convergence of sin 1 n 2 is O ( 1 n 2 ) . 13. b. Make a table listing 1 /n , 1 /n 2 , 1 /n 3 , and 1 /n 4 for n = 5, 10, 100, and 1000, and discuss the varying rates of convergence of these sequences as n becomes large. solution: The sequences with higher exponents converge faster. Date : June 30, 2010. 1

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

View Full Document
2 BENJAMIN JOHNSON Table 1. Table of values for 1 /n , 1 /n 2 , etc. . . n
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/04/2011 for the course MATH 128 taught by Professor To during the Fall '10 term at SUNY Geneseo.

### Page1 / 4

128ahw2sum10 - MATH 128A, SUMMER 2010, HOMEWORK 2 SOLUTION...

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

View Full Document
Ask a homework question - tutors are online