Introduction to Scientific Computing Gauss-Seidel Method. Power ...
Introduction to Scientific Computing Gauss-Seidel Method. Power ...
Introduction to Scientific Computing Gauss-Seidel Method. Power ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Institute of <strong>Scientific</strong> <strong>Computing</strong>Technische Universität BraunschweigProf. Hermann G. Matthies, PhDDr. Alexander LitvinenkoWinter Term 2009-2010January 14, 2010<strong>Introduction</strong> <strong>to</strong> <strong>Scientific</strong> <strong>Computing</strong><strong>Gauss</strong>-<strong>Seidel</strong> <strong>Method</strong>. <strong>Power</strong> method.Assignment 11Exercise 1: Linear two-step methodConsider the linear two-step method(12 points)x n+2 + 4x n+1 − 5x n = h · (4f n+1 + 2f n ) (1)(a) Show that this method is consistent. Which order of consistency has the method ? (4 points)(b)Implement this method and solve the ODE˙u = uin the interval [0,1] with different step sizes h.u(0) = 1(2)(4 points)(c) Explain the numerical results (convergence). (4 points)Exercise 2: <strong>Gauss</strong>-<strong>Seidel</strong> <strong>Method</strong>Depending on the real valued parameter α we have a matrix A defined as( )1 αA =−α 2(12 points)and b = (b 1 ,b 2 ) ⊤ an arbitrary (but given) vec<strong>to</strong>r. For solving the system of equations we use the<strong>Gauss</strong>-<strong>Seidel</strong> method.(a) For which values of α does this method converge in general (using an arbitrary starting vec<strong>to</strong>r)and for which values does it diverge in general?(6 points)(b) Let b = (1,2) ⊤ . Solve the system of equations Ax = b numerically using the <strong>Gauss</strong>-<strong>Seidel</strong>method for α = − 3 2 + β100, β = 0,1,... ,300. Plot the numerical error and the number of iterationsvs. the different values of alpha.(6 points)Exercise 3: <strong>Power</strong> method (power iteration)(14 points)Sometimes it is very important <strong>to</strong> compute only the largest eigenvalue of a large matrix (withoutcomputing all other eigenvalues). The power method (or power iteration) performs this task.(a) Implement this method as a MATLAB procedure. (6 points)(b)Generate a 100*100 matrix in MATLAB and use your procedure <strong>to</strong> compute the largest eigenvalue.Use also MATLAB “eigs” procedure <strong>to</strong> check yourself. Pay attention that the power method
works not for all matrices.(6 points)(c) Compare computing times. (2 points)