1/72.7 Solution of systems of linear equationsOur goal in this section is to develop methods for solving a system of nlinear equations with nunknowns. 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 ⎪⎩⎪⎨⎧−=++=+−=++353042732zyxzyxzyxor ⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡−=⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡−307531412321321xxxwhere x1=x, x2=y, and x3=z Shorthand notation: bxArr=Equation (*) A- nx ncoefficient matrix xr- vector of n unknowns, i.e., (x1, x2,…, xn) br- known RHS vector, i.e., (b1, b2,…, bn) Why do we need to “complicate” things by using vectors and matrices? For some mathematical models in engineering, ncan 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 xr: (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 nof any size, but the number of operations increases as nincreases; (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., xnew=g(xold) -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).
has intentionally blurred sections.
Sign up to view the full version.