This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Note: You may have to use the diff command to dierentiate MATLAB inline functions. b. With Tol=105 and MaxIter=10, use Halleys method to approximate the roots of the following functions with given initial guesses. Also indicate if the method was successful or not. ( i ) f ( x ) = xcos( x ) , x = 4. ( ii ) f ( x ) = x 3x, x = 1 / 3. ( iii ) f ( x ) = 1 3 x 31 2 x 26 x + 1 , x =3. ( iv ) f ( x ) = 5 61 2 x 2cos( x ) , x = 3. ( v ) f ( x ) = xex , x = 3 / 2. For part a , your solution should consist of MATLAB code for the function HalleysMethod ; for part b , submit your numerical results from running HalleysMethod in the command window. 1 See Wikipedia for more on Halleys method....
View Full
Document
 Spring '08
 Instuctor
 Math, matlab

Click to edit the document details