Ceng 375 Numerical Computing
Final Exam Jan 18, 2011 11.30-14.00
Write your name and student ID to each paper. Answer all questions. Good Luck!

  1. (10pts) Choose only two questions. Each question is 5 points
    i
    Describe the general working of a bracketing method. What are the assumptions for this family of methods?
    ii
    Describe truncation and round-off errors. Give example.
    iii
    Why do we need pivoting while solving sets of equations by elimination methods? Can we skip pivoting and under which circumstances?
    iv
    What does singularity mean for a matrix? Make a comparison of singular and nonsingular matrices.
    v
    What are the differences between the interpolation and curve fitting?
  2. (5 pts) Derive the Newton's method formula using a Taylor series expansion.
  3. (25 pts) For the given data points;

    \begin{displaymath}
\begin{array}{rr}
x & y \\ \hline
2.1 & -12.4 \\
4.1 & 7.3 \\
7.1 & 10.1 \\
\end{array}\end{displaymath}

    1. (10 pts) Write out the Lagrangian polynomial from this table
      vi
      confirm that it reproduces the $y$'s for each $x$-value.
      vii
      interpolate with it to estimate $y$ at $x=3$.
      viii
      extrapolate with it to estimate $y$ at $x=8$.
    2. (10 pts) Suppose in previous item that the $y$-value for $x=4.1$ is mistakenly entered as $7.2$ rather than $7.3$. Repeat the previous item with this incorrect value. How much difference does this make?
    3. (5 pts) Expand the Lagrangian polynomials in the previous items (a & b) to get the quadratics in the form $ax^2+bx+c$. How different are the values for $a$, $b$, and $c$?
  4. Choose only two questions.
    1. (20pts) Following system is given.

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

      ix
      (10 pts) Solve this system by Gaussian elimination with pivoting (use five significant digits of precision). How many row interchanges are needed?
      x
      (10 pts) You could have saved the row multipliers and obtained a $LU$ equivalent of the coefficient matrix. Use this $LU$ to solve with right-hand sides of $[-3,7,-2]^T$

    2. (20pts) 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}

      xi
      (5 pts) Write down the Jacobi iteration formula for this problem given initial guess $x_1^{(0)}= 0.1,~~x_2^{(0)}= 0.1$.
      xii
      (10 pts) Assume that the error vector at iteration $k$ is denoted by $e^{(k)}$. How many iterations do we need before $\vert\vert e^{(k)}\vert\vert\leq 10^{-4}$ ?
      xiii
      (5 pts) Repeat with Gauss-Seidel method. Compare with Jacobi method.

    3. (20pts) Least Squares Method
      xiv
      (10 pts) A function $f_{app}(x)$ is to be used as an approximation to a set of data $(x_i, f_i)$ with $i = 0, 1, 2,\ldots,N$. Suppose further that the function $f_{app}(x)$ depends on two parameters $a$ and $b$. Provide full details of how the parameters $a$ and $b$ can be determined.
      xv
      (10 pts) Using the result of the previous item, obtain the normal equations for the function $f_{app}(x)= a+b\sqrt{x}$. Do not attempt to solve these equations.
  5. Choose only two questions.
    1. (20pts) Write the expression to economize the the Maclaurin series for $e^{2x}$ with the precision 0.08 by using Chebyshev polynomials. Do not perform the calculations.

    2. (20pts) Fourier Series
      xvi
      (10 pts) Find the Fourier coefficients for $f(x)=x^4$ if it is periodic and one period extends from $x=-2$ to $x=2$. Do not evaluate the integrals.
      xvii
      (10 pts) Write the Fourier series expansion for this function up to $3^{rd}$ term.

    3. (20pts) Consider the function $f(x)=x^4$;
      xviii
      (5 pts) Fill the following table within the five digit accuracy
      $x_i$ $f_i$
      0.00000 0.00000
         
         
         
         
         
      1.20000  
      xix
      (2.5 pts) Approximate $\int_0^{1.2} f(x)$dx using the Composite Trapezoidal Rule and a step size of $h = 0.2$.
      xx
      (2.5 pts) Approximate $\int_0^{1.2} f(x)$dx using the Composite Trapezoidal Rule and a step size of $h = 0.4$.
      xxi
      (10 pts) Estimate the error in your answers;
      • Find the exact value of the integral simply by integrating the given function. Then, find the errors for parts ii and iii.
      • Also use the global error formula to find the errors for parts ii and iii.
      • Analyze and compare these error values.


Cem Ozdogan 2011-09-28