|
Home Systems of Linear Equations and Problem Solving Solving Quadratic Equations Solve Absolute Value Inequalities Solving Quadratic Equations Solving Quadratic Inequalities Solving Systems of Equations Row Reduction Solving Systems of Linear Equations by Graphing Solving Quadratic Equations Solving Systems of Linear Equations Solving Linear Equations - Part II Solving Equations I Summative Assessment of Problem-solving and Skills Outcomes Math-Problem Solving:Long Division Face Solving Linear Equations Systems of Linear Equations in Two Variables Solving a System of Linear Equations by Graphing Ti-89 Solving Simultaneous Equations Systems of Linear Equations in Three Variables and Matrix Operations Solving Rational Equations Solving Quadratic Equations by Factoring Solving Quadratic Equations Solving Systems of Linear Equations Systems of Equations in Two Variables Solving Quadratic Equations Solving Exponential and Logarithmic Equations Solving Systems of Linear Equations Solving Quadratic Equations Math Logic & Problem Solving Honors Solving Quadratic Equations by Factoring Solving Literal Equations and Formulas Solving Quadratic Equations by Completing the Square Solving Exponential and Logarithmic Equations Solving Equations with Fractions Solving Equations Solving Linear Equations Solving Linear Equations in One Variable Solving Linear Equations SOLVING QUADRATIC EQUATIONS USING THE QUADRATIC FORMULA SOLVING LINEAR EQUATIONS |
Solving Linear Equations3.0 Gaussian Elimination Last time we looked at computing the stresses in a simple truss. To solve for
the a. It works for most reasonable problems The major drawback is that it can suffer from the accumulation of round off 3.1 Upper Triangular Form (Forward Sweep) We can illustrate how it works with the following set of equations.
We would like to solve this set of equations for X1 , X2 , and X3 . We can
rewrite the
We want to multiply the first equation by some factor so that when we
subtract
Subtracting the first equation in 3.3 from the second equation in 3.3 then
replacing the
We do the same thing for the third row by multiplying the first row by a31 /
a11
We can reduce the complexity of the terms symbolically by substituting new
Now multiply the second row by b32/b22 and subtracting it from the third row.
Again we simplify by substituting in for the complex terms.
This is what we call upper triangular form. We started at the first equation
and 3.2 Backward Sweep We can solve each equation of the upper triangular form by moving through the
This is called back substitution and the process as a whole is called the
backward 3.3 Equation Normalization You can see from the equations that it is very important for the diagonal In fact, there will be fewer problems with accumulated round off error if the
If a11 is small compared to a22 then we could end up with Small – large And loose the value of small (a22) altogether. a. Normalize the rows so that the largest term in the
equation is 1. Diagonal dominance can usually be improved by moving the
rows or the columns Moving both rows and columns is called full pivoting and
it is the best method for Before we can perform either full or partial pivoting, we
must normalize the rows.
We normalize each row of the equations by dividing through
by the largest term in
3.4 Partial Pivoting Now we can move the equations around (partial pivoting) so
that the ones are on
These are the equations we solve using Gaussian elimination. 3.5 Overall Process The overall process becomes This algorithm can be written into very compact and
efficient computer The following program reads a data file containing a
matrix defining a set of Four functions are used to solve the equations. They are:
These routines are very short and efficient. // gauss.C - This program tests a series of routines that
solve multiple #include <fstream.h> // ROUTINES void baksub (double a[100][100], double b[100], double
x[100], int m); void main (void) // Open the file and read the input data. The equations in
the file are input.open ("gauss.dat"); gauss (a, b, x, size); // print out the results // Here are a series of routines that solve multiple
linear equations void normal (double a[100][100], double b[100], int m) { void pivot (double a[100][100], double b[100], int m) // This routine does the forward sweep to put the matrix
in to upper void forelm (double a[100][100], double b[100], int m) void baksub (double a[100][100], double b[100], double
x[100], int m)
|
|||||||||