2016 Numerical Analysis Midterm Exam  
When is the best time to have the midterm exam?
Tuesday Oct 25th 16:30 -- 18:30 [see note]  0% of the voters. 0% of the votes.    0
Thursday Oct 27th 16:30 -- 18:30 [see note]  35% of the voters. 25% of the votes.    6
Tuesday Nov 1st 16:30 -- 18:30 [see note]  24% of the voters. 17% of the votes.    4
Thursday Nov 3rd 16:30 -- 18:30  71% of the voters. 50% of the votes.    12
Friday Nov 4th 14:00 -- 16:00  6% of the voters. 4% of the votes.    1
Friday Nov 4th 16:30 -- 18:30  0% of the voters. 0% of the votes.    0
Friday Nov 4th 18:00 -- 20:00  6% of the voters. 4% of the votes.    1
Poll ended at 6:03 pm on Tuesday October 18th 2016. Total votes: 24. Total voters: 17.
Thursday November 3rd 2016
16:30 — 18:30


NO NOTES OR BOOKS; ANSWER ALL 4 QUESTIONS; ALL QUESTIONS HAVE EQUAL VALUE.
10.25.16
Question #1
Consider the function $f=\sin(x)$ with $x$ in radians. Find the root $f=0$ for the initial interval $\frac{1}{2}\pi \le x \le \frac{3}{2} \pi$ using the bisection method. Do so in two different ways:
(a)  By hand, with enough iterations to yield a root accurate to at least 4 significant digits. How many iterations are needed to find a root accurate to at least 4 significant digits?
(b)  With a C code that starts as follows:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>

double f(double x){
  double ret;
  ret=sin(x);
  return(ret);
}

int main(void){
Question #2
Consider the system of equations $AX=B$ with $A$ equal to: $$ A=\left[ \begin{array}{ccc} -2 & 2 & -1 \\ 6 & -6 & 7 \\ 3 & -8 & 4 \end{array} \right] $$ and $B$ equal to: $$ B=\left[ \begin{array}{c} -1 \\ -7 \\ -6 \end{array} \right] $$ Find $X$ using partial pivoting (by hand).
Question #3
Consider a real number stored with 5 bytes. Bit #1 is reserved for the sign, while bits #2 to #10 are reserved for the biased exponent, and bits #11 to #40 are related to the significand. Do the following:
(a)  Find the minimum and maximum possible exponent $p$
(b)  Find the smallest possible positive number
(c)  Find the largest possible number
(d)  Find the smallest possible positive subnormal number
Question #4
Consider the following non-linear system of equations: $$ x_2 x_1 x_3 = 5 $$ $$ \frac{1}{2}x_1^2 + \frac{1}{2}x_2^2 = 100 $$ $$ x_2 + x_3 =0 $$ Do the following:
(a)  Find $x_1$, $x_2$, and $x_3$ using Newton's method using the initial conditions $x_1=0$, $x_2=1$, and $x_3=1$. Do so by hand and solve the first 2 iterations only.
(b)  Using the results obtained in (a) estimate the order of convergence of the method.
Answers
1.  13.
2.  2, $\frac{1}{4}$, $-\frac{5}{2}$.
3.  255, -254, $3.454 \times 10^{-77}$, $1.15792089 \times 10^{77}$, $3.217\times 10^{-86}$.
4.  4.91244, 51.125, -51.125, 0.1, -1.1, -1.18.
12.26.16
PDF 1✕1 2✕1 2✕2
$\pi$