Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

MTH 510

Assignment # 2

Fall 2015

DUE (at the beginning of your Lab): (Tues) Oct. 13 - (Mon) Oct. 19
1. Consider the function
f (x) = x cos (x2 ) + 1.
(a) Use Matlab to graph f (x) and use the graph to estimate the value of the smallest
positive root. As part of your answer, include a printout of the graph.
(b) Do three iterations of the Bisection method (by hand) to estimate the root of f (x) on
the interval [1.7, 2.5]. At each iteration, give the maximum true error of the estimate of the
root.
(c) How many iterations would be required in part (b) to ensure that the true error is less
than 106 ?
(d) Use the bisection method in Matlab to check your result in (c). As part of your answer,
include a printout or write-up of the commands and/or m-functions used in MATLAB, and
of the output generated. Indicate clearly the approximate value of the root, as well as the
approximate percent relative error associated with your estimate of the root justifying that
the true error fits the criterion prescribed in (c).
2. Determine the root of
f (x) = 3 ln x + x3
(a) using Newtons method (by hand) with x0 = 0.6 until you have at least 3 significant
figures. As part of your answer, include the value of |a | at each iteration.
(b) using the secant method (with Matlab) with x0 = 0.3 and x1 = 0.6 until you have
at least 10 significant figures. Include a printout or write-up of the commands and/or mfunctions used in MATLAB, and of the output generated. Indicate clearly the approximate
value of the root, as well as the approximate percent relative error associated with your
estimate of the root.
3. Use Gaussian elimination with partial pivoting and backward substitution (by hand) to
compute the solution of
x2 + 4x3 = 1
2x1

+ 2x3 = 2

x1 5x2 x3 = 1

You might also like