128a_su09_hw2_sol

128a_su09_hw2_sol - MATH 128A, SUMMER 2009: HOMEWORK 2...

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

View Full Document Right Arrow Icon
MATH 128A, SUMMER 2009: HOMEWORK 2 SOLUTIONS 2.1 10. This can be solved by hand or with a computer: bisection_table(@(x)(x+2)*(x+1)^2*x*(x-1)^3*(x-2), a, b, .1, 10) In each case it only takes one or two iterations for the bisection method to find an interval containing only one of the roots. (a) 0 (b) 0 (c) 2 (d) - 2 15. To guarantee an accuracy of 10 - 4 after n iterations, we can make sure that (2 - 1) / 2 n 10 - 4 . This happens when n 14. bisection(@(x)x^3-x-1, 1 , 2, 1e-4, 14) outputs 1 . 3248. 2.2 3. These tables were created with MATLAB code such as the following, for (a): fixedpoint_table(@(x)(20*x+21/x^2)/21, 1, 1e-6, 10); %similar for (b)-(d) (a) 3rd fastest (b) Fastest n | p_n | Delta-p(n-1) n | p_n | Delta-p(n-1) --------------------------------- --------------------------------- 1 | +1.95238095 | +0.95238095 1 | +7.66666667 | +6.66666667 2 | +2.12175427 | +0.16937332 2 | +5.23020374 | -2.43646293 3 | +2.24284969 | +0.12109542 3 | +3.74269692 | -1.48750682 4 | +2.33483967 | +0.09198998 4 | +2.99485357 | -0.74784335 5 | +2.40709338 | +0.07225371 5 | +2.77702223 | -0.21783134 6 | +2.46505929 | +0.05796591 6 | +2.75904187 | -0.01798036 7 | +2.51224346 | +0.04718418 7 | +2.75892418 | -0.00011769 8 | +2.55105710 | +0.03881363 8 | +2.75892418 | -0.00000001 9 | +2.58323777 | +0.03218067 10 | +2.61008144 | +0.02684368 (c) Not convergent to 21^(1/3) (d) 2nd fastest n | p_n | Delta-p(n-1) n | p_n | Delta-p(n-1) --------------------------------- --------------------------------- 1 | +0.00000000 | -1.00000000 1 | +4.58257569 | +3.58257569 2 | +0.00000000 | +0.00000000 2 | +2.14069514 | -2.44188055 3 | +3.13207559 | +0.99138045 4 | +2.58936653 | -0.54270907 5 | +2.84782227 | +0.25845575 6 | +2.71552125 | -0.13230102 7 | +2.78088509 | +0.06536384 8 | +2.74800884 | -0.03287626 9 | +2.76439809 | +0.01638926 10 | +2.75619128 | -0.00820681 7. Since the range of sin is [ - 1 , 1], the range of g ( x ) is [ π - 0 . 5 + 0 . 5]. In particular, g ( x ) [0 , 2 π ] for any x [0 , 2 π ]. g 0 ( x ) = 0 . 25 cos( x/ 2), so the range of g 0 ( x ) is [ - . 25 ,. 25]. In particular, | g 0 ( x ) | ≤ k = 1 / 4 < 1 for any x [0 , 2 π ]. Date : Due Thursday 7/02. 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Thus the conditions for theorem 2.2 (part b) are met, so g ( x ) has a unique fixed point on [0 , 2 π ]. Suppose we start at the interval’s midpoint,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

128a_su09_hw2_sol - MATH 128A, SUMMER 2009: HOMEWORK 2...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online