{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

128a_su09_hw2_sol

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

Info icon This 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
Image of page 1

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

View Full Document Right 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, p 0 = π . (Note: any p 0 [0 , 2 π ] is okay.) We can use the error bound | p n - p | ≤ k n · π ( π being the maximum distance between p 0 and any point in [0 , 2 π ]), or compute p 1 = π + 1 / 2 and use the error bound | p n - p | ≤ k n / (1 - k ) · (1 / 2) = (2 / 3) · 4 - n . The latter error bound is more favorable, and drops below 10 - 2 when n = 4. (The former bound requires n = 5.) Actual calculation, shown in the following table, shows that only 3 iterations are needed.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern