0% found this document useful (0 votes)
23 views27 pages

301

Uploaded by

boharot359
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views27 pages

301

Uploaded by

boharot359
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Ex : 1 Apply the Gauss seidal iterative method to find out

the solution of given simultaneous linear equations.


20X + Y - 2Z = 17 ….(i)
3X + 20Y - Z = -18 ….(ii)
2X - 3Y + 20Z = 25…..(iii)
In eqn. (i)
|20| > |1| + |-2| => 20 > 3
From eqn. (i)
X = (17 – Y + 2Z) ….(iv)
20
 In eqn. (ii)
|20| > |3| +|-1| => 20 > 4
From eqn. (ii)
Y = (-18 – 3X + Z) ….(v)
20
 In eqn. (iii)
|20| > |2| + |-3| => 20 > 5
From eqn. (iii)
Z = (25 – 2X + 3Y) ….(vi)
20

 Put X = X1 , Y = 0 , Z = 0 in eqn. (iv)


X1 = (17 – 0 + 2(0))
20

= 17
20
X1 = 0.85

 Put Y = Y1 , X = X1 , Z = 0 in eqn. (v)


Y1 = (-18 – 3X1 + 0)
20
= (-18 – 3*0.85 + 0)
20
Y1 = -1.0275

 Put Z = Z1 , X = X1 , Y = Y1 in eqn. (vi)


Z1 = (25 – 2 X1 + 3 Y1)
20
Z1 = (25 – 2 * 0.85 + 3 * -1.0275)
20
Z1 = 1.0109

 Put X = X2 , Y = Y1 , Z = Z1 in eqn. (iv)


X2 = (17 – Y1 + 2 Z1)
20
= (17 – (-1.0275) + 2 * 1.0109)
20
X2 = 1.0024

 Put Y = Y2 , X = X2 , Z = Z1 in eqn. (v)


Y2 = (-18 – 3 X2 + Z1)
20
= (-18 – 3 * 1.0024 + 1.0109)
20
Y2 = -0.9998

 Put Z = Z2 , X = X2 , Y = Y2 in eqn. (vi)


Z2 = (25 – 2 X2 + 3 Y2)
20
= (25 – 2 * 1.0024 + 3 * -0.9998)
20
Z2 = 0.9998
 Put X = X3 , Y = Y2 , Z = Z2 in eqn. (iv)
X3 = (17 – Y2 + 2 Z2)
20
= (17 – (-0.9998) + 2 * 0.9998)
20
X3 = 0.9999

 Put Y = Y3 , X = X3 , Z = Z2 in eqn. (v)


Y3 = (-18 – 3 X3 + Z2)
20
= (-18 – 3 * 0.9999 + 0.9998)
20
Y3 = -1.0000
 Put Z = Z3 , X = X3 , Y = Y3 in eqn. (vi)
Z3 = (25 – 2 X3 + 3 Y3)
20
= (25 – 2 * 0.9999 + 3 * -1.0000)
20
Z3 = 1.0000

 Put X = X4 , Y = Y3 , Z = Z3 in eqn. (iv)


X4 = (17 – Y3 + 2 Z3)
20
= (17 – (-1.0000) + 2 * 1.0000)
20
X4 = 1.0000
 Put Y = Y4 , X = X4 , Z = Z3 in eqn. (v)
Y4 = (-18 – 3 X4 + Z3)
20
= (-18 – 3 * 1.0000 + 1.0000)
20
Y4 = -1.0000
 Put Z = Z4 , X = X4 , Y = Y4 in eqn. (vi)
Z4 = (25 – 2 X4 + 3 Y4)
20
= (25 – 2 * 1.0000 + 3 * -1.0000)
20
Z4 = 1.0000
 We get , X3 = X4
Y3 = Y4 and
Z3 = Z4
 Therefore , The solution is
X=1
Y = -1
Z=1
Ex : 2 Solve using Gauss seidal method.
5X + 2Y + Z = 12 …..(i)
X + 4Y + 2Z = 15 ….(ii)
X + 2Y + 5Z = 20 ….(iii)
In eqn. (i)
|5| > |2| + |1| => 5 > 3
From eqn. (i)
X = (12 – 2Y – Z) …..(iv)
5
 in eqn. (ii)
|4| > |1| + |2| => 4 > 3
From eqn. (ii)
Y = (15 – X – 2Z) …..(v)
4

 In eqn. (iii)
|5| > |1| + |2| => 5 > 3

From eqn. (iii)


Z = (20 – X – 2Y) ……(vi)
5
X1 = 2.4 Y1 = 3.15 Z1 = 2.26
X2 = 0.688 Y2 = 2.448 Z2 = 2.8832
X3 = 0.85516 Y3 = 2.09736 Z3 = 2.992224

X4 = 0.9627 Y4 = 2.0132 Z4 = 3.0021


X5 = 0.9943 Y5 = 2.0003 Z5 = 3.0010
X6 = 0.9996 Y6 = 1.9996 Z6 = 3.0002
X7 = 1.0000 Y7 = 1.9999 Z7 = 3.0000
X8 = 1.0000 Y8 = 2.0000 Z8 = 3.0000
Ex : 3 Solve using Gauss seidal method.
8X + 2Y - 2Z = 8
X - 8Y + 3Z = -4
2X + Y + 9Z = 12
Ans : X = 1 , Y = 1 , Z = 1

Ex : 4 Solve using Gauss seidal method.


X + 2Y + Z = 0
3X + Y - Z = 0
X - Y + 4Z = 3
Ans : X = 0.33 , Y = 0.44 , Z = 0.55
Ill conditioned system
• When there is a very small change in the co efficient of
the system.
• It may produce large changes in the solution.
• Such systems are said to be Ill conditioned systems.
Ex : X + 5Y = 17 ….(i)
1.5X + 7.501Y = 25.503 ….(ii)
• The solution of these equations can be easily calculated.
i.e. X = 2 and y = 3
• Let there be a very small change in eqn. (ii) such that
Ex : X + 5Y = 17 ….(i)
1.5X + 7.501Y = 25.5 ….(ii)
• In eqn. (ii) , the constant term is changed by
the value 0.003.
• Then the solution of these equations would be
X = 17 and Y = 0.
• A very small change in the number makes the
system Ill conditioned.
Disadvantages of Direct Method
(i) If the co efficient of variables are zero then
we cannot find the solution using direct
method.
(ii) The computational effort is approximately
2n3/3 arithmetic operations in each
elimination step.
(iii) The rounding error may be quite large
particularly for ill conditioned equations.
Advantages of Iterative Method
(i) Computational effort is approximately 2n2 arithmetic
operations per iteration.
(ii) Another important advantage of iterative method is
small rounding error.
• Thus , for Ill conditioned system an iterative method is
a good choice.
(iii) In Gauss seidal method , we set Xi to the newly
calculated value of the iterate stored in temp. Instead
if we set
Xi = Xi + w (temp – Xi)
• If w = 1 then temp replacing Xi and if w = 0 then Xi
replacing Xi.
Interpolation
• Let Y = f(X) be a function , which take the values Y0 , Y1 ,
Y2 , ….. , Yn corresponding to the values of independent
variables X0 , X1 , X2 , ….. , Xn of X.
• Then the process of finding value of function Y = f(X)
corresponding value of X in between interval [X0 , Xn] is
called interpolation.
• And the process of finding values of function Y = f(X)
corresponding value of independent variable X outside
of interval [X0 , Xn] is called extrapolation.
• There are five methods :
(i) Lagrange's interpolation formula
(ii) Lagrange's inverse interpolation formula
(iii) Newton’s forward difference interpolation
formula
(iv) Newton’s Backward difference interpolation
formula
(v) Newton’s divided difference interpolation
formula
• When difference is equal :
(i) Newton’s forward difference interpolation formula
(ii) Newton’s Backward difference interpolation
formula

X X0 X1 X2 … …. …. Xn
Y Y0 Y1 Y2 … … … Yn

X 1 2 3 … …. …. 10
Y=f(X) Y0 Y1 Y2 … … … Yn
• Newton’s forward difference interpolation formula
 If the point for which the value of function is to be
interpolated lies in the upper half of the table. Then
forward difference interpolation formula will give better
approximation to the value of function.
• Newton’s Backward difference interpolation formula
 If the point lies in the lower half then the backward
difference interpolation formula will give better
approximation.
 But if the point lies somewhere in the middle of the
table then any one will work better.
• When difference is unequal :
(i) Lagrange's interpolation formula
(ii) Newton’s divided difference interpolation formula
(iii) Lagrange's inverse interpolation formula
Lagrange's interpolation formula
• In order to derive a general formula for lagrangian
interpolation , we consider a second order polynomial of
type
Y(X) = a1 (X – X2)(X – X3) + a2 (X – X1)(X – X3) +
a3 (X – X1)(X – X2) …. (i)
• Passing through the points (X1 , Y1) , (X2 , Y2) and
(X3 , Y3).
• Where a1 , a2 , a3 are unknown constants whose values
are determined as follows :
• At X = X1 ,
Y(X1) = a1 (X1 – X2)(X1 – X3) = Y1
a1 = Y1
(X1 – X2)(X1 – X3)
• At X = X2 ,
Y(X2) = a2 (X2 – X1)(X2 – X3) = Y2
a2 = Y2
(X2 – X1)(X2 – X3)
• At X = X3 ,
Y(X3) = a3 (X3 – X1)(X3 – X2) = Y3
a3 = Y3
(X3 – X1)(X3 – X2)
• Put the values of a1 , a2 , a3 in eqn. (i)
Y(X) = Y1 * (X – X2)(X – X3) +
(X1 – X2)(X1 – X3)
Y2 * (X –X1)(X –X3) +
(X2 – X1)(X2 – X3)
Y3 * (X – X1)(X – X2)
(X3 – X1)(X3 – X2)
Y(X) = Y1 (X – X2)(X – X3) +
(X1 – X2)(X1 – X3)
Y2 (X – X1)(X – X3) +
(X2 – X1)(X2 – X3)
Y3 (X – X1)(X – X2)
(X3 – X1)(X3 – X2)
• Using the product and summation , the above
expression can be written as

• In general ,
Lagrange’s Inverse Interpolation Formula
• If Y is an independent variable and X as a function of Y
then ,

• This formula is known as the Lagrange’s inverse


interpolation formula.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy