Sie sind auf Seite 1von 7

# Final Exam Review

Topics Included

## Dense Linear Systems

Gaussian Elimination LU Decomposition Matrix and Vector Norms Condition Number

Matrix Factorizations
Symmetric Positive Denite - Cholesky Linear Least Squares Orthogonal Matrices adn QR Factorization

## Householder transformation Givens rotation Gram-Schmidt Eigenvalue Problem

Computation of Eigenvalue Eigenvector pairs by hand Similarity Transformation QR Algorithm for Computation of Eigenvalues (proof not required) Power iteration for Eigenvector computation Inverse iteration for Eigenvector computation

## Nonlinear Root Finding

Convergence rate computation Bisection method Regula Falsi Secant Method Fixed point iterations Newtons method - scalar valued functions

Polynomial Interpolation
Computation of interpolation for given basis - e.g., Monomial basis Newton interpolation Lagrange interpolation Piecewise interpolation Spline interpolation

## Numerical Differentiation and Integration

Error bounds with Taylor series Computation of approximate derivatives with Taylor series Hand calculation with Richardson extrapolation Trapezoid rule Quadrature through method of undetermined coefcients Gaussian quadrature hand calculation Page 1 of 7

## Final Exam Review

Differential Equations
Stability of system of equations Error analysis for numerical schemes Order of accuracy of methods Methods : Forward Euler, Trapezoid, Heun Methods : Backward Euler, RK methods, Adams methods

## Iterative Methods for Linear Systems

Splitting a matrix Jacobi/Gauss-Siedel Sucessive Over Relaxation Methods Steepest Descent Method

Practise Problems This exam will focus on numericals - approximately 75 % will consist of numericals with the rest being conceptual questions. This review will hence focus on numericals, please refer books such as Heath, Watkins etc. for conceptual material. Dense Linear Solve

## Solve the following system with GE and back substitution: vw = 3

2u + 4v w = 1 2u + 5v 4w = 2
Apply GE with back substitution: 2 x1 x2 = 0

x1 + 2 x2 x3 = 0 x2 + x3 = 1
GE with back substitution: 4 x2 3 x3 = 3 x1 + 7 x2 5 x3 = 4 x1 + 8 x2 6 x3 = 5 Consider the following system: 4x 8y + 5z = b1 4x 7y + 4z = b2 3x 4y + 2z = b3
Solve for ba = [100] T and bb = [010] T and bc = [001] T at one time be performing GE on an augmented matrix of the form [ A|ba |bb |bc ]. Find angles , , and such that

## 2sin cos + 3tan = 3 4sin + 2cos 2tan = 2 6sin 3cos + tan = 9

where 0 2 and 0 2 and 0 . Page 2 of 7

## Attempt to solve the sytem with GE:

x1 + 3 x2 2 x3 = 1 x1 + 4 x2 3 x3 = 0 x1 + 5 x2 4 x3 = 0 2 2 Perform an LU decomposition on the following matrix: 1 3 3 7 2 1 2 9 LU the following matrix: 4 1 8 5 24 1 2 3 LU decomposition for rank decient matrix: 2 4 6 7 1 9
Matrix Factorizations

4 1 5

1 2 1 Find the Cholesky decomposition of the following symmetric matrix: 2 8 4 1 4 11 1 2 2 Find the Cholesky decomposition of: 2 8 0 2 0 24 1 1 1 2 x 1 1 1 1 1 x2 = Use Cholesky factorization to nd the least squares solution: 0 1 1 1 x3 0 1 1 2 1 1 1 1 x 1 1 1 1 1 x2 = Use Cholesky factorization to nd the solution to the least squares problem: 1 0 1 1 x3 0 1 1 1 T T Use Householder transformation to transform a = [1 2 2] to [c 0 0] . 1 1 1 1 2 4 Compute the QR factorization by Householder transformation: 1 3 9 1 4 16 3 2 3 x1 Compute least squares solution by Householder transformation: 0 3 = 5 x2 4 4 4 1 1 1 1 2 4 3 and y = [1 1.5 3 6] T . Minimize c R in || Ac y||with: A = 1 3 9 1 4 16 Zero the second element of x = [11/2] T using Givens rotation. 3 2 6 7 1 Use Givens rotation to set a3,3 = 0 by a rotation of rows 2 and 3 when A = 0 0 5 0 0 12 3 0 1 1 Use Givens rotation to nd the QR decomposition of A = 1 2 3 1 1 1 0.8147 0.0975 0.1576 0.9058 0.2785 0.9706 Use Givens rotation to compute the QR factorization of A = 0.1270 0.5469 0.9572 0.9134 0.9575 0.4854 0.6324 0.9649 0.8003 Page 3 of 7

## Final Exam Review

Suppose W = span{ x1 , x2 } where x1 = [1 1 0] T and x2 = [2 2 3] T . Use Gram-Schmidt to nd and orthogonal basis for W . Suppose W = span{ x1 , x2 , x3 } with x1 = [1 2 3 0] T and x2 = [1 2 0 0 ] T and x3 = [1 0 0 1] T is a subspace of R4 . Find an orthogonal basis for W . 1 2 Use Gram-Schmidt to nd the QR factorization for A = 1 2 0 3 Use Gram-Schmidt to nd an orthonormal basis for the subspace in R4 spanned by the following vectors: [1 1 1 1] T , [1 4 4 1] T and [4 2 2 0] T . 3 2 Use Gram-Schmidt to nd the QR factorization of A = 0 3 . 4 4 Eigenvalues and Eigenvectors 1 2 What is the characteristic polynomial of 3 4 1 1 1 What is the characteristic polynomial of 2 3 4 0 1 1 1 3 What are the eigenvalues of 0 3 Find a 2 2 matrix that has only the eigenvalue zero, but does have two linearly independent eigenvectors. 0 1 1 1 Find eigenvalues and eigenvectors for the following matrices: and 2 3 0 1 0 1 1 Find eigenvalues and eigenvectors of the following matrix: 1 0 1 1 1 0 0 1 Find eigenvalues and eigenvectors of 1 0 When does the QR algorithm converge to a diagonal matrix? Why do shifts help in convergence of the QR algorithm? 2 12 Compute six iterations of the power method to approximate the dominant eigenvector of A = 1 5 with an initial approximation of x0 = [1 1] T . Rayleigh Quotient: If x is an eigenvector of a matrix A, then the corresponding eigenvalue is given by = Ax x xx

Use the results from the previous example to approximate the dominant eigenvalue of A.

4 5 to three decimal places. Look up reference books to 6 5 determine the rate of convergence of the power method. 4 10 Predict the rate of convergence(qualitatively) of the power method for A = 7 5 Nonlinear Root Finding Calculate the dominant eigenvalue of A = Find a root of f ( x ) = cos( x ) cos(3x ) using the bisection method. Find a root of f ( x ) = x4 4x3 + 12 to withing 1e-2 with a = 1 and b = 2. If a = 0.1 and b = 1.0 how many steps of the bisection methods are needed to determine the root with an 8 error of at most 1 2 10 ? Two of the four zeroes of f ( x ) = x4 + 2x3 7x2 + 3 are positive. Find them correct to two signnicant digits with Newtons method. Using a calculator, observe the slowness of Newtons method for f ( x ) = ( x 1)8 , with x0 = 1.1. Provide a satisfactory explanation for this slowness. Page 4 of 7

## Using the Newton iteration dened by x n +1 = 1 2 xn + R xn

what does xn converge to? What is Newtons method for determining the reciprocal of the square root of a positive number? Perform two iterations to approximate 1/ 5 with x0 = 1 and x0 = 1. Consider the following separate procedures:

( a ) x n +1 = ( b ) x n +1

1 r 2 xn 2 3 xn 1 1 = xn + 2 xn

Do they converge for any nonzero initial point? If so, to what values? If Newtons method is used on f ( x ) = x3 x + 1 and x0 = 1, what will x1 be? If Newtons method is used on f ( x ) = x5 x3 + 3 and if xn = 1, what is xn+1 . For what starting values will Newtons method converge for the function x2 /(1 + x2 )? Calculate an approximate value of 43/4 using one step of the secant method with x0 = 3 and x1 = 2. If we use the secant method on f ( x ) = x3 2 x + 2 starting with x0 = 0 and x1 = 1, what is x2 ? If the secant method is used on f ( x ) = x5 + x3 + 3 and if xn2 = 0 and xn1 = 1 what is xn ? Using the bisection method, Newtons method, and the secant method, nd the largest positive root correct to three decimal places of x3 5 x + 3 = 0. (All roots are in [3, 3])

Interpolation

Find an interpolating polynomial for x = [1, 2, 2.5, 3, 4] and y = [1, 1/3, 3/32, 4/3, 25]. Given the data x = [0, 1, 2, 4, 6] and y = [1, 9, 23, 93, 259], use Newton interpolating polynomial and nd an approximation for f (4.2). The polynomial p( x ) = x4 x3 + x2 x + 1 has the following values:x = [2, 1, 0, 1, 2, 3] with p( x ) = [31, 5, 1, 1, 11, 61]. Find a polynomial q( x ) that takes these values: x = [2, 1, 0, 1, 2, 3] and q( x ) = [31, 5, 1, 1, 11, 30]. (This can be done with little work). The polynomial p( x ) = 2 ( x + 1) + x ( x + 1) 2x ( x + 1)( x 1) interpolates the rst four points in the table (-1; 2);(0; 1);(1; 2); (2;-7);(3; 10). By adding one additional term to p, nd the polynomial that interpolates the whole table. Find the periodic cubic spline that interpolates the data: (0,0), (1/2,1), (1,0). Find the natural cubic spline that interpolates the data: {(1, 1), (2, 1/2), (3, 1/3), (4, 1/4)}.
Numerical Differentiation and Integration

Using Taylor series, establish the error term for the formula f (0) Derive the approximation formula f (x) 1 [4 f ( x + h) 3 f ( x ) f ( x + 2h)] 2h 1 [ f (2h) f (0)] 2h

1 2 and show that its error term is of the form 3 h f ( ) Derive the following two formulas

f (x) f (x)

1 [ f ( x + 2h) f ( x 2h)] 4h

## Final Exam Review

Consider the integral 0 e x dx. Divide the interval [0, 1] into n uniform partitions. Apply the trapezoid rule for n = 1, 2, 4. Does the error converge as n increases? Repeat the previous problem with Simpsons rule. Consider
2 1

dx / x3 . What is the result of using the trapezoid rule with partition points 1, 1.5000, and 2?
5

If the trapezoid rule is used with h = 0.01 to compute 2 sin( x )dx, what numerical value will the absolute error not exceed? Give the best answer based on the error formula. 4 Perform an analysis similar to the previous problem, by taking 201 equally spaced points for 0 cos( x3 )dx Approximate x f ( x )dx for the following ( xi , yi ) data: (1,0), (5/4,8), 3/2,7), (7/4,6), (2,5) Obtain the following expressions for the midpoint rule error terms for one interval, n unequal intervals, and n uniform intervals respectively:
a+h a b a b a 2

f ( x )dx h f
n 1

1 a+ h 2 1 xi + hi 2

f ( x )dx

i =0

hi f
n 1 i =0

f ( x )dx h

1 f a + (i + ) h 2

Suppose that the function 2 1 + x2 is known only at x1 = 1, x2 = 0 and x3 = 1. Interpolate the function with a natural cubic spline and approximate the integral 2dx 11 = 1 + x2 . Compare the result with Simpsons rule. f (x) =
Ordinary Differential Equations

Is the following system of ODEs stable? y1 = y1 + y2 y2 = 2y2 Consider the ODE y = 5y with y(0) = 1. Is this ODE stable? With a stepsize h = 0.5, is Forward Euler stable? Compute the numerical solution at t = 0.5 with the Forward Euler method. Is Backward Euler stable for this ODE and stepsize? Compute the solution for t = 0.5 using Backward Euler. With an inital value of y(0) = 1 at t = 0 and a stepsize of h = 1, compute the approximate solution for y at t = 1 using the (a) Forward Euler method and (b) Backward Euler method. Use Heuns method to solve the IVP y = y + t + 1/2 with y(0) = 1 in the interval [0, 1] with a stepsize h = 0.1. Compare your answers with a MATLAB simulation of this ODE. Consider the IVP y = y for t 0 with y(0) = 1 and y (0) = 2. (a) Express this as an equivalent rst order system. (b) What are the corresponding initial conditions for the system variables? (c) Is the system stable? (d) Perform one step of Forward Euler with h = 0.5. (e) Is Forward Euler stable for this stepsize? (f) Is Backward Euler stable for this stepsize? For the IVP x = x2 et + x with x (0) = 1 and x (0) = 2 calculate an approximate value for x (0.1) using one step of the Taylor series method. Consider the IVP y = y2 with y(0) = 1. Use backward Euler to compute the solution at t = 0.1 with stepsize h = 0.1. Use Forward Euler as a predictive guess for the Newton iteration (predictor) and the nonlinear solution of backward Euler with this initial guess is the corrector. Solve the IVP x = tx2 with x (0) = 2 at t = 0.2 using one step of the second order Runge Kutta method. Consider the IVP x = (tx )3 ( x /t)2 with x (1) = 1. Take one steo of the Tayloer series method of order 2 with h = 0.1 and Runge-Kutta method of order 2 to recompute x (1.1). Compare your answers. Page 6 of 7

## Iterative Solutions for Sparse Systems

Let

3 1 A= 2 4 1 1

1 1 3

and b = [2, 2, 5] T . Will Jacobi iterations converge for the solution of Ax = b? If so, apply the Jacobi iteration to get three digits of the solution, starting with [1, 1, 0] T . Apply the Jacobi method to solve

5 x1 2 x2 + 3 x3 = 1

3 x1 + 9 x2 + x3 = 2 2 x1 x2 7 x3 = 3
with initial guess [0, 0, 0] T upto three decimal points. Use Gauss Siedel for solving

## 10x1 x2 + 2x3 x1 + 11x2 x3 + 3x4 2x1 x2 + 10x3 x4 3 x2 x3 + 8 x4

starting with [0 0 0 0] T and performing three iterations. Consider the linear system

=6 = 25 = 11 = 15

## 9x1 + x2 + x3 = b1 2x1 + 10x2 + 3x3 = b2 3x1 + 4x2 + 11x3 = b3

Starting with x = [0 0 0] T , compare the result after three iterations of the Jacobi and Gauss-Siedel methods for (a) b = [16 44 59] T and (b) b = 0 7 7] T Consider the linear system:

10x1 + x2 = 12 x1 + 10x2 = 21

Starting with x = [0 0] T , apply Gauss-Siedel for upto three iterations and the Successive Over Relaxation method for three iterations with = 1.1. Compare your results with the true solution of the system.

Page 7 of 7