{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

9. Numerical_solution_of_systems_of_linear_

# 9. Numerical_solution_of_systems_of_linear_ - 2.7 Solution...

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

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).

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

View Full Document