Homework 3
Due date: Dec. 11, 1998
- (10%)
Exercise P4.5 (page 147)
- (20%)
Exercise P5.1 (page 164)
- (15%)
Exercise P5.4 (page 165)
- (20%)
Construct the code for a MATLAB function called
bisect,
which takes an arbitrary function,
fname,
and an interval known to contain a root,
x0 and
x1,
and returns a root to a tolerance
tol.
The calling grammar of
bisect should be something like this:
root = bisect('fname', x0, x1, tol);
- (5%)
Use the above function to find the root of
x3-2x-5=0 when the tolerance is 10-6 and
the initial interval is [0, 3].
- (20%)
Exercise P6.1 (page 177)
- (10%)
Exercise P6.3 (page 178)