TMA4125 Matematikk 4N Spring 2017

Similar documents
Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Solving Linear Systems of Equations

Next topics: Solving systems of linear equations

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Linear Equation Systems Direct Methods

Numerical Methods for Chemical Engineers

A LINEAR SYSTEMS OF EQUATIONS. By : Dewi Rachmatin

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Gaussian Elimination without/with Pivoting and Cholesky Decomposition

Numerical Linear Algebra

CS 323: Numerical Analysis and Computing

MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Math Computation Test 1 September 26 th, 2016 Debate: Computation vs. Theory Whatever wins, it ll be Huuuge!

Numerical Methods - Numerical Linear Algebra

MIDTERM 1 - SOLUTIONS

The Solution of Linear Systems AX = B

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

Matrix Factorization Reading: Lay 2.5

Applied Linear Algebra in Geoscience Using MATLAB

30.3. LU Decomposition. Introduction. Prerequisites. Learning Outcomes

Matrix decompositions

LINEAR SYSTEMS (11) Intensive Computation

Y = ax + b. Numerical Applications Least-squares. Start with Self-test 10-1/459. Linear equation. Error function: E = D 2 = (Y - (ax+b)) 2

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

ANSWERS. E k E 2 E 1 A = B

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

SOLVING Ax = b: GAUSS-JORDAN ELIMINATION [LARSON 1.2]

1 Number Systems and Errors 1

Examination paper for TMA4110 Matematikk 3

Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4

DonnishJournals

CPE 310: Numerical Analysis for Engineers

MATH 3511 Lecture 1. Solving Linear Systems 1

Chapter Practice Test Name: Period: Date:

Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems

Matrix decompositions

Eigenvalue and Eigenvector Homework

lecture 2 and 3: algorithms for linear algebra

MA2501 Numerical Methods Spring 2015

Numerical Analysis: Solutions of System of. Linear Equation. Natasha S. Sharma, PhD

Introduction to Mathematical Programming

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

Cheat Sheet for MATH461

Chapter 12: Iterative Methods

Introduction to Applied Linear Algebra with MATLAB

Solving Linear Systems

Lecture 10b: iterative and direct linear solvers

EBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal

Solving Ax = b w/ different b s: LU-Factorization

A = 3 1. We conclude that the algebraic multiplicity of the eigenvalues are both one, that is,

LINEAR ALGEBRA: NUMERICAL METHODS. Version: August 12,

Iterative Methods. Splitting Methods

Solving Linear Systems

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

MODEL ANSWERS TO THE THIRD HOMEWORK

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Chapter 4. Solving Systems of Equations. Chapter 4

22A-2 SUMMER 2014 LECTURE 5

Math 308 Practice Final Exam Page and vector y =

Numerical Linear Algebra

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Matrix Solutions to Linear Equations

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

Computational Methods. Systems of Linear Equations

Problem 1: Solving a linear equation

Methods for the Solution

1. Solve each linear system using Gaussian elimination or Gauss-Jordan reduction. The augmented matrix of this linear system is

30.5. Iterative Methods for Systems of Equations. Introduction. Prerequisites. Learning Outcomes

Systems of Linear Equations

Solving Linear Systems of Equations

Chapter 1. Vectors, Matrices, and Linear Spaces

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

MTH 464: Computational Linear Algebra

Lecture 11. Fast Linear Solvers: Iterative Methods. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico

7.6 The Inverse of a Square Matrix

lecture 3 and 4: algorithms for linear algebra

4 Elementary matrices, continued

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

Review Questions REVIEW QUESTIONS 71

1.Chapter Objectives

Linear Algebraic Equations

Introduction Linear system Nonlinear equation Interpolation

Applied Linear Algebra

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

Scientific Computing

MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 3 - EIGENVECTORS AND EIGENVALUES

Elementary Linear Algebra

9. Iterative Methods for Large Linear Systems

1 GSW Sets of Systems

12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

MATH 220 FINAL EXAMINATION December 13, Name ID # Section #

Linear Algebraic Equations

Elementary Matrices. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Here is an example of a block diagonal matrix with Jordan Blocks on the diagonal: J

Transcription:

Norwegian University of Science and Technology Institutt for matematiske fag TMA15 Matematikk N Spring 17 Solutions to exercise set 1 1 We begin by writing the system as the augmented matrix.139.38.3 6. 1.1 5.1.5 5.1 1.58.888 1.85 7. We begin by reducing all the terms in the first column below the diagonal to zero. Using partial pivoting, the term of greatest magnitude in the first column is 1.1, from the second row. We therefore swap this with the first row, giving 1.1 5.1.5 5.1.139.38.3 6. 1.58.888 1.85 7. The second row R then becomes mr 1 + R, where m =.139 1.1 =.115, working to 3 significant figures. Similarly, as 1.58 1.1 =.131, the third row is replaced with.131r 1 + R 3. Our augmented matrix is now 1.1 5.1.5 5.1.33.31 6.1. 1.9 6.35 We now do elimination on the second column. Here.33 is greater in magnitude than., so the second row is the pivot row. It remains to compute m =..33 =.681. Then the third row is replaced with.681r + R 3, giving 1.1 5.1.5 5.1.33.31 6.1 3.9 1.5 We now perform back substitution: x 3 = 1.5 3.9 = 3.1. We then have.3x = 6.95 6.1 =.85 x =.66 1.1x 1 = 13.6 + 1.5 + 5.1 = 6.96 x 1 =.575 We first write the equations in matrix form: 1 3 x 1 7 1 x = 1 1 x 3 March, 17 Page 1 of 5

Solutions to exercise set 1 Following Doolittle s method, we know that the first row of U is the first row of A, so u 1 = (, 1, 3). The first column of L is the first column of A divided by the first element of u 1, namely. We have accordingly l 1 = (1,, 1) T. We then compute A l 1 u 1 = 1 8 1 We now repeat the procedure on ( ) 1 8 A 1 =, 1 the matrix obtained from the above by deleting the first row and first column. This gives u = (1, 8) and hence l = (1, 1) T. Then ( ) A 1 l u = 6 Deleting the first row and column gives A = 6, from which we have u 3 = 6 and l 3 = 1. Collecting the l i and u i gives 1 1 3 L = 1, U = 1 8 1 1 1 6 To solve the equation Ax = b, we solve first Ly = b, in this case 1 7 1 y = 1 1 1 1 Back substitution gives y 1 = 7, y = 8, y 3 = 1. We then solve Ux = y, i.e. 1 3 7 1 8 x = 8 6 1 This time back substitution gives x 3 = 3.5, x =, x 1 = 1.75. 3 We apply Cholesky s method to A = 1 13 13 1 First, we take find the square root of the element in the top left of the matrix a11 = =. The first column of L is then the first column of A divided by this number, i.e. l 1 = (, 1, 1) T. We then form A l 1 l1 T = 9 1 1 March, 17 Page of 5

Solutions to exercise set 1 We then repeat the procedure on A 1 = ( 9 ) 1 1 We have a 1 1 = 3, and hence l = (3, ) T, leading to ( ) A 1 l l T = We find A =, and hence l 3 = =. Collecting the l i, we have L = 1 3 1 a) We first write the equations in the form x 1 = x x 3 x = x 1 x 3 + 1 x 3 = 1 ( x 1 x ) The Gauss-Seidel iteration comes from replacing the terms on the right above the diagonal with x (m) (the old values), and those below the diagonal with x (m) (the new values). Replacing the terms on the left with gives 1 = x (m) x (m) 3 = 1 x (m) 3 + 1 3 = 1 ( x(m+1) 1 ) To describe the iteration in matrix form, we first write the equations in matrix form Ax = b, that is 1 1 1 1 x = 1 1 1 We then write the matrix in the form A = L + D + U, where 1 1 L =, D = 1, U = 1 1 1 (Note that the L and U are not the same as those coming from an LU factorization, this is the much simpler additive decomposition where the L simply consists of the elements of A below the diagonal etc.) The Gauss-Seidel iteration is then (L + D) = Ux (m) + b, see Kreyszig.3 for a discussion. Multiplying both sides by (L + D) 1 gives = (L + D) 1 Ux (m) + v, March, 17 Page 3 of 5

Solutions to exercise set 1 where v = (L + D) 1 b. The matrix C asked for in the question is then C = (L + D) 1 U. In this case 1 (L + D) 1 = 1, 1.5.5.5 which can be found by Gauss-Jordan elimination (see Kreyszig.1). It follows that 1 (L + D) 1 U = 16 3 6 1 (Note that is possible to save time by evaluating (L + D) 1 U directly without evaluating (L + D) 1 first; for instance try forming the large augmented matrix of (L + D) and U and then reducing the L + D part to the identity, just as you would to find the inverse but with U on the right instead of I. In matlab this is implemented as ). b) The characteristic polynomial det(c λi) of the above matrix is λ 3 15λ + λ = λ(λ 15λ + ) It follows that the eigenvalues are and the roots of λ 15λ +, which by the quadratic formula are λ = 15 ± 17 The larger of these is approximately 1.87, which is much greater than 1. c) Swapping the first and the second rows gives the system 1 1 1 1 1 x = 1 1 This matrix is diagonally dominant, and hence we will have convergence. d) The Gauss-Seidel scheme is 1 = 1 ( x(m) x (m) 3 + 1) = 1 ( x(m+1) 1 x (m) 3 ) 3 = 1 ( x(m+1) 1 ) We begin with x () = (,, ) T. We then have 1 = 1 ( + 1) =.5 = 1 (.5 ) =.565 3 = 1 (.5 +.565) =.156 March, 17 Page of 5

Solutions to exercise set 1 The second iteration is 1 = 1 (.565.156 + 1) =.3516 e) The Jacobi scheme is The first iteration is hence = 1 (.3516.156 ) =.67 3 = 1 (.3516 +.67) =.1377 1 = 1 ( x(m) x (m) 3 + 1) = 1 ( x(m) 1 x (m) 3 ) 3 = 1 ( x(m) 1 x (m) ) 1 = 1 ( + 1) =.5 The second step is then = 1 ( ) =.5 3 = 1 ( ) = 1 = 1 (.5 +.5 + 1) =.375 = 1 (.5 ) =.565 3 = 1 (.5 +.5) =.15 March, 17 Page 5 of 5