9. Numerical_solution_of_systems_of_linear_

9. Numerical_solution_of_systems_of_linear_ - 2.7 Solution...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1/7 2.7 Solution of systems of linear equations Our goal in this section is to develop methods for solving a system of n linear equations with n unknowns. We will use these methods later in the course since solving ODEs/PDEs often requires solving systems of equations. Recall notations. Consider for example the following system of 3 equations with 3 unknowns = + + = + = + + 3 5 3 0 4 2 7 3 2 z y x z y x z y x or = 3 0 7 5 3 1 4 1 2 3 2 1 3 2 1 x x x where x 1 =x, x 2 =y, and x 3 =z Shorthand notation: b x A r r = Equation (*) A - n x n coefficient matrix x r - vector of n unknowns, i.e., (x 1 , x 2 ,…, x n ) b r - known RHS vector, i.e., (b 1 , b 2 ,…, b n ) Why do we need to “complicate” things by using vectors and matrices? For some mathematical models in engineering, n can get very large (e.g., 1000s) and it is much easier to set up numerical solutions of such problems when the equations are written in the form given by Eq. (*). There are two main approaches to finding x r : (i) Direct methods: Gaussian Elimination is the most common (Math 115) - perform organised raw operations to eliminate unknowns, which is similar to the solution by hand for small n ; - the method is easy to code to handle n of any size, but the number of operations increases as n increases; (ii) Indirect (Iterative) methods: Gauss-Seidel is the most common - the idea is similar to that of the direct iteration method for a single equation, i.e., x new =g(x old ) - can employ relaxation to help convergence There are variations of (i) and (ii) but ideas are similar. We will now consider some examples of (i) and (ii).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2/7 Gaussian Elimination: 4 x 4 example All a i,j and b j are known numbers. Find the four unknowns x, y, z, w. = 4 3 2 1 4 , 4 3 , 4 2 , 4 1 , 4 4 , 3 3 , 3 2 , 3 1 , 3 4 , 2 3 , 2 2 , 2 1 , 2 4 , 1 3 , 1 2 , 1 1 , 1 b b b b w z y x a a a a a a a a a a a a a a a a n = 4 a system of 4 simultaneous equations for 4 unknowns = 4 3 2 1 4 , 4 3 , 4 2 , 4 4 , 3 3 , 3 2 , 3 4 , 2 3 , 2 2 , 2 4 , 1 3 , 1 2 , 1 1 , 1 0 0 0 b b b b w z y x a a a a a a a a a a a a a Step 1 – clear column 1 below the 1,1 a element A changed number is indicated by *. ( ) 2,1 1,1 22 1 new row row a a row =− ( ) 1 3 3 1 , 1 1 , 3 row a a row row new = ( ) 4,1 1,1 44 1 new row row a a row = 4 3 2 1 4 , 4 3 , 4 4 , 3 3 , 3 4 , 2 3 , 2 2 , 2 4 , 1 3 , 1 2 , 1 1 , 1 0 0 0 0 0 b b b b w z y x a a a a a a a a a a a Step 2 – clear column 2 below the 2,2 a element A changed number is indicated by **.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

9. Numerical_solution_of_systems_of_linear_ - 2.7 Solution...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online