Chapter 5
Roots of Equations
Lecture 5.4
Books: (1)
Numerical Methods for Engineer and Scientists, by Joe D, Hoffman, McGraw Hill Publication(ii) Numerical Method by Faires and Burden
(iii) Elemental Numerical Analysis, An Algorithm approach by S.D Conte and Carl de Boor, McGraw Hill Publication
Roots of simultaneous linear equation:
Here we shall discuss about the solution of simultaneous linear equation.
One physical example of this static
spring-mass
system as shown in fig.
It consist of masses m1 to m3
Having weight W1 to W3 and interconnected by springs having
Masses are supported by the forces F1 to F3 which are equal to the weight W1 to W3 so the system is in static equilibrium.
To solve above system we assume:
K1 = 40 N/m, K2 = K3 = K4 = 20 N/m, K5 = 90 N/m
And solution of above system
The system of linear equation are of following form:
Constant coefficients of unknown variables Unknown variables
System of linear algebraic Eqns. arise in many problems e.g.
In electric networks
Fitting approximating functions
We can solve the Eq. Using either Direct elimination method
e.g. Gauss elimination method, Gauss Jordan method, matrix inverse method and Doolittle factorization
And
Iterative methods
Three row operations mostly used:
(i) Any row (equation) may be multiplied by a constant
to scale, if necessary
(ii) The order of rows may be interchanged (pivoting).
This step is used to prevent the division by zero
and to reduce the round off errors
(iii) Any row (equation) can be replaced by a weighted
linear combination of that row (Eq.) with any other row
(Eq.) (used to perform elimination process) .
Gauss Elimination method: It involve two steps
Matrix in upper triangular form
Example: Consider set of linear eqns
---(1)
The elimination involve
(i) The normalizing the Eq. Above the element to be eliminated By the element immediately above the element to be eliminated (known as Pivot element)
(ii) Multiply the normalized eqn by the element to be eliminated
Above operations to the example are summarized below
---(2)
Note that, in above, we want the elimination of elements -20 (in 2nd and 3rd row) of 1st column. So we normalized row R1
By dividing it by 80 and multiply result with -20 and then subtract This result from R2.
And after operation we get,
Now we have to eliminate the element below major diagonal in the second columns so we have to apply follwing operation
---(4)
And we will get
---(5)
Now we have to do back substitution to get the roots.
In present case, we get x3 from last row of Eq. (5) and put it in 2nd row of same Eq. And we get the value of x
2 and
Then put these values of x3 and x2 in 1st row of same eq. To get
x1.
Thus in this way we obtained the roots of our set of Eqns. (1).
It may be noted that we need not to write the roots xj and we can simply write the constant coefficient matrix A and augmenting it with column vector b and then performing the row operations and finally back substitution.
For the last discussed example (Eq. 1) we can write
Multiple b vectors: If we have multiple b vectors corresponding to given A then simply augment these with A.
Example: Suppose we have two vectors b1 and b2
---(1)
After performing elimination we get
---(2)
And finally the roots are
Pivoting: The element on the major diagonal are known as pivot Element.
If first pivot element or any subsequent pivot element ai,i becomes Zero then we need to modify the elimination procedure
discussed so for.
It maybe noted that, there may not be zero on major diagonal
in the original matrix A, but these can arise during the elimination procedure.
To get rid of above problem, we interchange the Eqns (row) or variables (column) before applying elimination so that the element of largest
magnitude is on major diagonal.
This process is called pivoting.
Interchanging both rows and columns is called full pivoting.
Pivoting also help in reducing the round off errors. Since pivot element is used as divisor And larger the magnitude of divisor smaller will be the error.
Example: Solve following Ax = b with partial pivoting
Sine the 1st element on the major diagonal is zero so we need
pivoting. Note that the element of largest magnitude is 4 in 2nd
row, So we interchange 2nd and 1st row and then apply the
So, we apply the operations
And result is,
Now note that we have no zero on major diagonal. But the element of Largest magnitude is in 3rd row. Now interchange 2nd and 3rd rows
And then apply the elimination. Note that we cannot interchange 1st and 2nd row. So apply the pivoting only with the rows below the
So, we need to apply following process
And we get
Solution is