This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Assigned: Friday Sep. 30, 2011 Due Date: Friday Oct. 7, 2011 MATH 174: Homework 2 “Rootfinding” Fall 2011 NOTE: For each homework assignment observe the following guidelines: 1. Consider the function f ( x ) = x 3- 2. (a) Show that f ( x ) has a root α in the interval [1 , 2]. (b) Compute an approximation to the root by taking 4 steps of the bisection method ( BY HAND ). (c) Repeat, using Newton’s method . Take x = 1 . 5 for the starting value. For each method, present the results in the form of a table: Column 1: n (step) Column 2: x n (approximation) Column 3: f ( x n ) (residual) Column 4: | α- x n | (error) 2. SOURCE CODE: Write separate MATLAB functions for the bisection method , the method of false position , Newton’s method , and the secant method . These functions should be written so that they can be called in MATLAB by typing: • [x,NumIters] = Bisection(@f,a,b,TOL,MaxIters) • [x,NumIters] = FalsePos(@f,a,b,TOL,MaxIters) • [x,NumIters] = Newton(@f,@df,x0,TOL,MaxIters)...
View Full Document
This note was uploaded on 12/11/2011 for the course MATH 174 taught by Professor Staff during the Fall '08 term at UCSD.
- Fall '08