Homework 2 Solutions
Math 471, Fall 2006
Friday, September 15, 2006
Friday, September 22, 2006
Include a cover page
Clearly label all plots using
command to compare multiple plots
Include printouts of all Matlab code, labeled with your name, date, section, etc.
Here is an example of two MATLAB scripts which, together, allow you to pass a pass a function into your
code. This allows you to reuse your code for other functions.
function p=bisection(myfun, a, b, nmax),
for n = 1 : nmax,
p(n) = (a+b)/2;
(Rootfnding and Optimization)
) is di±erentiable on [
]. Discuss how you might use a root²nding method to identify
a local extremum of
) inside [
Roots of the derivative give possible locations of local extrema.