Ceng 375 Numerical Computing
Midterm
July 18, 2005 09.00-11.00
Good Luck!
1 (20 Pts) Consider the function:

\begin{displaymath}
f(x) = 5x-e^{-x}
\end{displaymath}

i
Show that this function has a simple root in the interval $0 < x < 1$
ii
Estimate this root using two iterations of the Secant Method.
iii
Estimate the error in your answer to part ii.
2 (25 Pts)Consider the function:

\begin{displaymath}
f(x) = cos(x)- 2x=0
\end{displaymath}

iv
Use two iterations of Newton s method to estimate the root of this function between $x = 0.0$ and $x = 1.0$
v
Estimate the error in your answer to part i.
vi
Approximately how many iterations of the bisection method would have been required to achieve the same error?
3 (30 Pts) Solve this system by Gaussian elimination with pivoting

\begin{displaymath}
\left[
\begin{array}{rrrr}
1 &-2 &4&6\\
8 &-3 &2&2\\
-1 &10 &2&4\\
\end{array} \right]
\end{displaymath}

vii
How many row interchanges are needed?
viii
Repeat without any row interchanges. Do you get the same results?
ix
You could have saved the row multipliers and obtained a $LU$ equivalent of the coefficient matrix. Use this $LU$ to solve but with right-hand sides of $[1,-3,5]^T$
4 (25 Pts) Consider solving the following linear system by the Jacobi method.

\begin{displaymath}
\begin{array}{r}
4x_1+x_2=5\\
x_1+5x_2=6\\
\end{array}\end{displaymath}

x
Write down the Jacobi iteration formula for this problem given initial guess $x^{(0)}= 0$.
xi
Assume that the error (vector) at iteration $k$ is denoted by $e^{(k)}$ and that $\vert\vert e^{(0)}\vert\vert=1$. How many iterations do we need before $\vert\vert e^{(k)}\vert\vert\leq 10^{-4}$ ?


2006-09-28