Programming Assignment Two

Your work should be presented in the form of a typed report using clear and properly punctuated English. Where appropriate include full program listings and output. If you choose to work in a group of two, please turn in independently prepared reports.


\hangindent\parindent
\item{2a.} 
Consider the functions
$$\eqalign{
f_1(x)&=x^3-3.7x^2+6.25x-4.069,\cr
f_2(x)&=x^x-6+2x,\cr
f_3(x)&=\sin x-e^{-x},\cr
f_4(x)&=x^2+4\sin x,\hbox{ and}\cr
f_5(x)&=3x-\cos x-1.\cr
}$$
Write a program to approximate
the smallest real $x$ such that
$f_n(x)=0$
for each of these functions.
You may employ the interval bisection method,
the method of false position, the secant method
or Newton's method.
Use each method at least once.
\bigskip
\hangindent\parindent
\item{b.}
What are the advantages and disadvantages of each 
of the above methods?
For each equation
explain why you solved it using the particular method you did.
\bigskip
\hangindent\parindent
\item{c.}
Compute the residual $f_n(x^*)$
for each approximation $x^*$ found above.
How should the residual depend on the 
difference between $x^*$ and
the true solution $x$?


Last updated: Tue Sep 10 11:03:56 PDT 2002