hw3_solutions - CS 257 Numerical Methods - Homework 3...

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

View Full Document Right Arrow Icon
CS 257 Numerical Methods - Homework 3 September 20, 2006 1. [1pt] Section 3.2 #15 Solution: The first iteration of Newton’s method is: x 1 = x 0 - f ( x 0 ) f 0 ( x 0 ) In this case x 0 = 1, f ( x 0 ) = 1, and f 0 ( x 0 ) = 3 x 2 0 - 1 = 2. Therefore x 1 = 1 / 2. 2. [1pt] Section 3.2 #28 (use MATLAB if you wish) Solution: Beginning with x 0 = 1 we have the following sequence x 1 = 1 - f (1) f 0 (1) = 1 - - 8 - 4 = - 1 x 2 = - 1 - f ( - 1) f 0 ( - 1) = - 1 - 16 - 8 = 1 x 3 = 1 - f (1) f 0 (1) = 1 - - 8 - 4 = - 1 In MATLAB one could solve the problem as follows (using the UP key to scroll through previous commands): >> x = 1 x = 1 >> x = x - (3*x^3 + x^2 -15*x + 3)/(9*x^2 + 2*x - 15) x = -1 >> x = x - (3*x^3 + x^2 -15*x + 3)/(9*x^2 + 2*x - 15) x = 1 >> x = x - (3*x^3 + x^2 -15*x + 3)/(9*x^2 + 2*x - 15) x = -1 >> x = x - (3*x^3 + x^2 -15*x + 3)/(9*x^2 + 2*x - 15) x = 1 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
3. [1pt] Using the MATLAB implementation of Newton’s method (see page 106) on the course webpage or one of your own, solve the following problems. Compute a zero of f ( x ) = x 4 - 5 x 3 + 9 x 2 - 7 x + 2 with x 0 = 2 . 2, call this value ˆ x . Now create a semilog plot (not to be turned in) with blue lines showing the error e i = | ˆ x - x i | at each iteration. Solution:
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.

This note was uploaded on 09/15/2008 for the course CS 257 taught by Professor Thomaskerkhoven during the Fall '05 term at University of Illinois at Urbana–Champaign.

Page1 / 5

hw3_solutions - CS 257 Numerical Methods - Homework 3...

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