numerical analysis - pitscollege.weebly.com€¦ · unit -1 numerical analysis 18/04/2017 submitted...
TRANSCRIPT
![Page 1: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/1.jpg)
Syllabus
Numerical Analysis: Finite differences - Forward backward and central difference. Newton’s forward and backward differences interpolation formulae. Sterling’s formulae, Lagrange’s interpolation formula. Solution of non-linear equations in one variable by Newton Raphson and Simultaneous algebraic equation by Gauss and Regula Falsi method. Solution of simultaneous equations by Gauss elimination and Gauss Seidel methods. Fitting of curves (straight line and parabola of second degree) by method of least squares.
UNIT -1
Numerical Analysis
18/04/2017
Submitted by: Ms. Laxmi Peepliwal (Electrical Branch)
Submitted to : Mr. Amit Sharma (Department of Mathematics)
![Page 2: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/2.jpg)
� Interpolation -
Interpolation lies at the heart of numerical analysis. Generally we come across situations where we wish to find some unknown values with the help of given set of observation.
Example- We are given that the number of school going children in 1970,1980, 1990, 2000, 2010…….. Then the process of finding the desired figure is known as Interpolation.
� Definition of Interpolation (Mathematically) -
The technique or method of estimating unknown values from a given set of observation is known a Interpolation .
Mathematically, let x=a , a+h ,a+2h , ………., a+nh
Y=f(x)=f(a) , f(a+h) , f(a+2h) , ………., f(a+nh) Then the method of finding f(m), for x=m is known as interpolation & where m lies outside this range , it is known as extrapolation. Example- X 0 5 10 15 20 Y 7 11 19 23 27 That the method of finding f(3) , f(7) , f(17) with the help of given data is known as interpolation & that of finding f(22) or f(-0.5) is known as extrapolation.
� Assumption For Interpolation –
![Page 3: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/3.jpg)
1- These should be no sudden jump of falls during the interval in the value of the function that is the the value of the function f(x) should be in an increasing or decreasing order.
2- The length of the interval must be uniform .
3- When we apply the calculus of finite differences the function must be capablr of being expressed in o polynomial form.
� Methods Of Interpoltion-
1) Method of graph 2) Method of curve fitting 3) Method of finite differences
Finite Difference Caluculas -
The study of finite difference calculus has become very important
due to its wide applications in everyday life .
It deals with the change in the value of the function y (dependent
variable) due to change in x (independent variable).
Let y=f(x)
X a a+h a+2h -----------
Y=f(x) f(a) f(a+h) f(a+2h) ----------
First difference of f(x) at x=a is denoted by ∆f(a)
∆f(a) = f(a+h) – f(a)
First difference of f(x) at x= a +h is
![Page 4: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/4.jpg)
∆f(a+h) = f(a+2h) – f(a+h) & so on
∆f(a+h) - ∆f(a) = ∆2 f(a) is known as second difference of f(x) at x=a
i.e.
∆f(a) = f(a+h) – f(a)
∆2f(a)=∆f(a+h)- ∆f(a)
∆3f(a)=∆2f(a+h)-∆2f(a)
…………………………………….
∆nf(a)=∆nf(a+h)-∆n-1f(a)
The operator ∆ is known as forward difference operator for a given function f(x) .
Forward Difference – Table –
x Y=f(x) ∆y ∆2y ∆3y ∆4y ∆5y
X0 Y0
∆y0
X1 Y1 ∆2y0
∆y1 ∆3y0
X2 Y2 ∆2y1 ∆4y0
∆y2 ∆3y1 ∆5y0
X3 Y3 ∆2y2 ∆4y1
∆y3 ∆3y2
X4 Y4 ∆2y3
![Page 5: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/5.jpg)
∆y4
X5 Y5
Question.. - Form the Forward Difference table for the following data.
X -1 0 1 2 3 4 5
Y -13 -7 -1 11 35 77 143
Solution -
x Y=f(x) ∆y ∆2y ∆3y ∆4y ∆5y ∆6y -1 -13 6 0 -7 0 6 6 1 -1 6 0 12 6 0 2 11 12 0 0 24 6 0 3 35 18 0 42 6 4 77 24 66 5 143
Fundamental Theorem of Finite Differences –
If f(x) = a0 xn +a1x
n-1+a2xn-2+…………..+ an , a0 ≠0 is an nth degree
polynomial then the nth differences of f(x) is ∆nf(x) =a0hn
![Page 6: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/6.jpg)
Where ‘h’ is interval of differencing and ∆n+1 f(x) =0
Question - Evaluate ∆6[(ax-1)(bx2-1)(cx3-1)] ; h=1
Solution- ∆6[(ax-1)(bx2-1)(cx3-1)]
= ∆6[abcx6 – bcx5 – acx4 + (ab+c)x3 + bx2 + ax – 1]
= ∆6(abcx6) - ∆6(bcx4)-∆6(acx4)+∆6[(c-ab)x3]+∆6(bx2)+∆6(ax)- ∆6
= abc.1.6!
= 720 abc
( Ans)
Question - Evaluate ∆tan-1x
Solution- tan-1(x+h)-tan-1x
{ F(x)=f(x+h)-f(x) }
{tan-1a – tan-1b =tan-1(���)
(���) }
= tan-1 �� ��
�(�� ).�
=tan-1
�� ���∗� …………………………..( Ans.)
![Page 7: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/7.jpg)
� Factorial Notation of A Function (Factorial Function or Generalized Power) – The product of n consecutive factors , the first of which s equal to x and each , subsequent factor is h less than the preceding that is Xn=x(x-h)(x-2h)(x-3h)-----------------[x-(n-1)h] Where h is some fixed constant is known as factorial function or generalized power.
Differences of Factorial Function- ∆x(n)=(x+h)(n)-x(n) = [(x+h)(x)(x-h)(x-2h)------(x-(n-1)h)] = -[x(x-h)(x-2h)-----(x-(n-1)h)] =x(x-h)(x-2h)------(x-(n-2)h)[x+h-x+(n+1)h] =x(x-h)(x-2h)-----(x-(n-2)h)(nh) ∆x(n)=nh(x)(n-1) ∆2x(n)=∆(∆x(n)=∆(nhx(n-1)=nh∆x(n-1)=n(n-1)h2x(n-2) ∆nx(n)=[n(n-1)(n-2)(n-3)------------3.2.1]hn.1 ∆nx(n)=n!hn
Question- Express x3-2x2+x-1 into a factorial polynomial. Hence find ∆4f(x)=0
∆nx
(n)=n!h
n
![Page 8: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/8.jpg)
Solution- Let F(x)= x3-2x2+x-1 Ax(3)+Bx(2)+Cx(1)D ………(A) X3-2x2+x-1=A(x)(x-1)(x-2)+B(x)(x-1)+Cx+D …(i) Put x=0; then -1=D Put x=1; then C+D=-1 C=>0 Put x=2; then 2B+2C+D =>1=>B=1 Comparing the cofficient of x3 on both side of equation 1. , we get. A=1 Hence from equation A. f(x)=x(3)+x(2)-1 ∆f(x)=∆[x(3)+x(2)-1] = ∆x(3)∆x(2)+∆(1) = 3x(2)+2x(1) ∆2f(x)=∆[3x(2)+2x(1)] =6x(1)+2x(0)=6x(1)+2 ∆3f(x)=6(x)(0)=6
∆4f(x)=0 (Ans.)
� Properties Of Forward Difference
Operator – 1. ∆C=0-0=0 ; where C is constant.
![Page 9: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/9.jpg)
2. ∆(af(x)+bg(x)=a∆f(x)+b∆g(x) 3. ∆n(∆mf(x)=∆m+n[f(x)]= ∆n+m[f(x)] 4. ∆[f(x) g(x)]=f(x+h)∆g(x)+g(x)∆f(x)
5. ∆ �(�)�(�) =
�(�)∆�(�)��(�)∆�(�)�(�� )�(�)
6. ∆ex=ex+h-ex=ex(en-1)
7. ∆logx =log(x+h)-logx = log ��
� =log[1+ �]
8. ∆sin(ax+b)=2sin� � sin[ax+b+ah+
��]
Backward Difference Operator- The first backward difference of a function y=f(x) whose tabulated values are (x0,y0) (x1,y1)…….(xn,yn) are y1-y0,y2-y1,……..yn,yn-1 and denoted by ∇y1,∇y2……….∇yn
In general ∇yk=yk-yk-1
Backward Difference Table-
x y=f(x) ∇y ∇2y ∇3y ∇4y ∇5y ∇6y X0 Y0 ∇y0 X1 Y1 ∇2yo ∇y1 ∇3y0 X2 Y2 ∇2y1 ∇4y0 ∇y2 ∇3y1 ∇5y0
![Page 10: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/10.jpg)
x3 Y3 ∇2y2 ∇4y1 ∇6y0
∇y3 ∇3y2 ∇5y1 X4 Y4 ∇2y3 ∇4y2 ∇y4 ∇4y3 X5 Y5 ∇2y4 ∇y5 X6 Y6
� Other Difference Operator- 1. Shift Operator(E)-
E(f(x))=f(x+h) E2(f(x))=E(E(f(x))=E[f(x+h)]=f(x+2h) En(f(x))=f(x+nh) E-1(f(x))=f(x-h) E-n(f(x))=f(x-nh)
2. Average Operator(�)-
�(f(x))=�[f [� +
�]f(x- �)
3. �[f(x)]=f(x+ �)-f(x-
�)
4. ∆f(x)=f(x+h)-f(x) 5. ∇f(x)=f(x)-f(x-h)
![Page 11: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/11.jpg)
Relation between Difference Operators-
1. ∆=E-1 2. ∇=1-E-1 3. E=ehD 4. �=E1\2-E-1\2
5. �=�(E1\2+E-1\2)
6. ∆=� �2+�√1+�2\4
7. �2=1+�2\4
Sterling’s Interpolation Formula- Y=y0+u
Newton Gregory Forward Interpolation Formula:
Y=y0+u∆y0+�(��)
�! ∆2y0+�(��)(���)
�! ∆3y0+……………
….+�(��)………[��( �)]
! ∆ny0
Where u =���!
![Page 12: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/12.jpg)
Question - The values of a function y=f(x) at some points are given in the following table.
X 0 1 2 3 4 5 6
Y=f(x) 176 183 197 205 215 223 231
Find the value of function y=f(x) at x=0.2
Solution - x0=0 , x=0.2
u=���!
= !.��!
= 0.2
x Y=f(x) ∆y ∆2y ∆3y ∆4y ∆5y ∆6y 0 176 7 1 183 7 14 -13 2 197 -6 -21 8 -8 -33 3 205 -2 -12 -51 10 -4 18 4 215 -2 6 8 -2 5 223 0 8 6 231
![Page 13: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/13.jpg)
Y=176+0.2*7+!.�(!.��)
�! *7+!.�(!.��)(!.���)
�! -
13+!.�(!.��)(!.���)(!.���)
"! *-21 +!.�(!.��)(!.���)(!.���)(!.��")
#! *-33
+ !.�(!.��)(!.���)(!.���)(!.��")(!.��#)
$! *-51
Y=176+1.4-0.56-0.624+0.7056-0.168+1.041
Y=176.75 ………(Ans)
Newton Gregory Backward Interpolation formula-
Y=yn+u∇yn+�(��)
�! ∇2yn+�(��)(���)
�! ∇3yn+……………..
Where u= ���
Question- Find the approximate function given by the table and hence find f(2.5)
X 0 1 2 3
Y 1 3 7 13
Solution- xn = 3 , x=2.5
u=���!
= ���
=x-3
![Page 14: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/14.jpg)
x Y=f(x) ∇y ∇2y ∇3y 0 1 2 1 3 2 4 0 2 7 2 6 3 13
Y=13+(x-3)6+(���)(����)
�! *2+(���)(����)(�����)
�! *0
Y=13+6x-18+(���)(���)
�! *2
Y=13+6x-18+x2-2x-3x+6
Y=x2+x+1
Now put x=2.5
Y=(2.5)2+2.5+1
Y=9.75 …………………(Ans.)
Lagrange’s Interpolation formula for unequal spaced points-
![Page 15: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/15.jpg)
Y=(���)(����)……….(��� )
(�!��)(�!���)………….(�!�� ) y0 + (���!)(����)……………(��� )
(���!)(����)………………(��� )
y1+ …………………… + (���!)(���)…..(��� �)
(� ��!)(� ��)(� ���)…..(� �� �� �)
yn
Lagrange’s inverse interpolation formula-
X=(%�%)(%�%�)……….(%�% )
(%!�%)(%!�%�)………(%!�% ) x0 + (%�%!)(%�%�)……….(%�% )
(%�%!)(%�%�)………(%�% ) x1 +
……………+ (%�%!)(%�%)…………(%�% �)
(% �%!)(% �%)……………(% �% �) xn
Question- Given the following pairs of values of x&y
X 5 6 7 11
Y 12 13 14 16
Interpolation the value of y at x=10
Solution-
Y=(!�$)(!�&)(!�)
(#�$)(#�&)(#�) *12 + (!�#)(!�&)(!�)
($�#)($�&)($�) *13
+(!�#)(!�$)(!�)
(&�#)(&�$)(&�) *14 + (!�#)(!�$)(!�&)(�#)(�$)(�&) *16
Y="∗∗(�)∗�
�∗�"∗�$ + #∗∗�∗��∗��∗�# +
#∗"∗�∗""∗�∗�� +
#∗"∗∗$$∗#∗�
![Page 16: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/16.jpg)
Y=�"'��" -
$## +
�'!�" +
��!$!
Y=2-4.33+11.66+5.33
Y=14.66 …………(Ans).
� Fitting of Curves (Straight line &
Parabola of Second Degree ) By method of least Squares-
Fitting of Straight Lines-
Working Rule- 1. Let the line to be fitted be y=a+bx 2. Form the normal equations
∑ )=na+b∑ � ∑ �)=a∑ �+b∑ �2
3. Solve the two normal equations to get the values of a&b.
Question- Fit a Straight line to the following data-
X 1 2 3 4 6 8
![Page 17: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/17.jpg)
Y 2.4 3 3.6 4 5 6
Solution- Let the lne to be fitted is y=a+bx ……………1.
By the principle of least squares, we get the normal equations as.
∑ )=na+b∑ �
∑ �)=a∑ �2
X y x2 xy
1 2.4 1 2.4
2 3 4 6.0
3 3.6 9 10.8
4 4 16 16.0
6 5 36 30.0
8 6 64 48.0
∑ 24 ∑ 24 ∑ 130 ∑ 113.2
24=6a+24b ………………..(i).
113.2=24a+130b ……………………(ii).
From equation (i) and (ii) . Now the equation 1 can be multiply by 4, we get
Now the values of a,b,c are-
a=1.976
b=0.505
![Page 18: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/18.jpg)
Best fitted straight line-
Y=1.976+0.505x ……………………(Ans)
Fitting of Parabola- WORKING RULE-
1) Let to parabola to be fitted be y=a+bx+cx2 ……………(i) 2) From the normal equation
∑ )=na +b∑ �2 +c∑ �3 ∑ �) = a∑ �+b∑ �2+c∑ �3 ∑ �2y=a∑ �2+b∑ �3+c∑ �4
3).. Solve the normal equation to get a,b & c and substitude n equation(i).
Question- Fit a parabola of second degree to the following data
X 0 1 2 3 4
Y 1 1.8 1.3 2.5 6.3
Solution - Let the parabola to be fitted be-
Y=a+ bx+ cx2
By the method of least squares the three normal equations are –
∑ )=na+b∑ �+c∑ �2
∑ �)=a∑ �+b∑ �2+c∑ �3
![Page 19: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/19.jpg)
∑ �2y=a∑�2+b∑�3+c∑�4
x y X2 X3 X4 xy X2y 0 1 0 0 0 0 0 1 1.8 1 1 1 1.8 1.8 2 1.3 4 8 16 2.6 5.2 3 2.5 9 27 81 7.5 22.5 4 6.3 16 64 256 25.2 100.8
/ �= 10
/ )= 12.9
∑ �2=30 ∑ �3=100 ∑ �4=354 / �)= 37.1
∑ �2y=130.3
12.9=5a+10b+30c …………………(i).
37.1 =10a+30b+100c ………………..(ii).
130.3=30a+100b+354c …………………(iii)
From equation (i)&(ii) , we get.
Now multiply equation (i) by 2 and equation (ii) by 3 , we get.
Then
a=1.42
b=-1.07
c=0.55
Best fitted straight line –
![Page 20: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/20.jpg)
Y=1.42-1.07x+0.55x2 ……………………( Ans.)
� Gauss Seidel Methods- Let us consider a system of equation in three unknowns x,y,z. a1x+b1y+c1z=d1 a2x+b2y+c2z=d2
a3x+b3y+c3z=d3 Rewrite the above equation as –
X=
� [d1-b1y-c1z] ………………..(i)
Y=
�� [d2-a2x-c2z] ………………(ii)
Z=
2� [d3-a3x-b3y] ……………..(iii).
Now,this method can be used to above equation if – a1>b1+c1
b2>a2+c2 c3>a3+b3 Now taking y(0) , z(0) as initial values for y,z ,we get- X(1) from equation 1-
X(1)=
� [d1-b1y(0)-c1z
(0)]
Now using x(1),z(0)as initial values for x,z,we get-
![Page 21: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/21.jpg)
Y(1) from equation 2
Y(1)=
�� [d2-a2x(1)-c2
(0)]
Now using x(1),y(1) as initial values for x,y , we get- Z(1) from equation 3
Z(1) = 2�[d3-a3x
(1)-b3y(1)]
Now repeat this rocess taking x(1) , y(1) , z(1) as initial values . This process is repeated till we get the required solution. Question- Solve the following system of equation by Gauss Seidel method. 27x+6y-z=85 6x+15y+2z=72 X+y+54=110 Solution- Now check the condition 27>6+1 15>6+2 54>1+1 These condition is satisfied the equations Given system of equation can be written as
X=1
27[85-6y+z]
![Page 22: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/22.jpg)
Y=1
15[72-6x-2z]
Z=1
54[110-x-y]
Let the initial values be y=0,z=0 First iteration-
X(1)=1
27[85-6(0)+1(0) =3.148
Y(1)= 1
15[72-6(3.148)-2(0)] = 3.5408
Z(1)=1
54[110-3.148-3.5408] = 1.9132
Second iteration-
X(2)=1
27[85-6(3.5408)+1(1.9132)] = 2.4321
Y(2)=1
15[72-6(2.4322)-2(1.9132)] = 3.5720
Z(2)=1
54[110-2.4322-3.572] = 1.9259
Third iteration-
X(3)= 1
27[85-6(3.572)+(1.9259)] = 2.4257
![Page 23: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/23.jpg)
Y(3)=1
15[72-6(2.4257)-2(1.9259)] = 3.5729
Z(3)=1
54[110-2.457-3.5729] = 1.9259
Fourth iteration-
X(4)=1
27[85-6(3.5729)+(1.9253)] = 2.4254
Y(4)=1
15[72-6(2.4254)-2(1.9253)] = 3.5730
Z(4)=1
54[110-2.4254-3.5731] = 1.9259
Fifth iteration-
X(5)=1
27[85-6(3.5729)+(1.9253)] = 2.4254
Y(5)=1
15[72-6(2.4254)-2(1.9253)] =3.5730
Z(5)=1
54[110-2.4254-3.5731] = 1.9259
………………Ans.
� Gauss Elimination Method- Question- Solve the system of equations by Gauss elimination method.
![Page 24: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/24.jpg)
X1+x2+x3=6
3x1+3x2+4x3=20
2x1+x2+3x3=13
Solution- Given system can be written as-
AX=B
Where
A= 1 1 13 3 42 1 3
, X= �1�2�3
, B 6
2013
Augmented matrix
C= 1 1 1:3 3 4:2 1 3:
62013
R2→R3-3R1 ,
R3→R3-2R1
C~1 1 1:0 0 1:0 −1 1:
621
R2↔R3
C~1 1 1:0 −1 1:0 0 1:
612
Z=2
-Y+Z=1
![Page 25: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/25.jpg)
Y=1
X+Y+Z=6
X+1+2=6
X=3
Now ,
X=3 , y=1 , z= 2 ………………………. (Ans.)
� Newton Raphson Method- When the derivative of f(x) is a simple expression & easily found , the real roots of f(x)=0 can be computed by a process called the Newton Raphson Method.
Working Rule- 1) Denote the function by f(x) . Select two points so that root
lies between these points. 2) Choose the initial approximation ,say x0, sufficiently close to
the root. 3) Differentiate f(x) with respect to x to get f’(x).
4) Apply Newton Raphson formula-
Xn+1=xn-�(� )�,(� )
,n=0,1,2,3………….. To get the root correct to the desired decimal places.
![Page 26: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/26.jpg)
Question- Find by Newton Rahson method a root of root of the equation, X3-3x-5=0 Solution- Let f(x)=x3-3x-5 F(2)=-3 , f(3)=13 Root lies between 2&3. F(2) is much closer to zero ( or f(2)<f(3) ) So we take initial approximate root x0=2 By Newton Raphson formula
Xn+1=xn-�(� )�9(� ) ……………(i)
F’(x)=3x2-3 For n=0 , the first approximate is
X1=x0-�(�:)�9(�!) = 2-
(�3)3(2)2�3
= 2.3333
For n=1, the second approximation is,
X2=x1- �(�)�9(��)
=2.3333-{(2.3333∗2.3333∗2.3333)�3(2.3333)�3}
3(2.3333∗2.3333)�3 =2.2805
For n=2 , the third approximation is ,
X3=x2-�(��)�9(��)
= 2.2805-{2.2805∗2.2805∗2.2805)�3(2.2805)�3}
3(2.2805∗2.2805)�3 = 2.2790
![Page 27: Numerical Analysis - pitscollege.weebly.com€¦ · UNIT -1 Numerical Analysis 18/04/2017 Submitted by: Ms. Laxmi Peepliwal (Electrical Branch) Submitted to : Mr. Amit Sharma (Department](https://reader033.vdocument.in/reader033/viewer/2022060610/60614320cb43744dbf1ec330/html5/thumbnails/27.jpg)
For n=3 , the fourth approximation .
X4=x3-�(��)�9(��)
=2.2790-{2.2790∗2.2790∗2.2790)�3(2.2790)�5}
3(2.2790∗2.2790)�3 =2.2790
…………………….(Ans.)