0% found this document useful (0 votes)
4 views

M2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

M2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

(U4)Newton's forward

#Use Newton's forward Interpolation


Formula and given table of values Formula
year 1891 1901 1901 1920 1931
population 46 66 81 93 101 Yp = Yo + _
P.∆Yo
in thousands 1!
find population in the year 1895. 2
p(p-1).∆ Yo
Given X = 1895 + 2!
P = X - Xo 1895 - 1891
h
= 10
= 0.4
p(p-1)(p-2).∆3 Yo
+
Xo = first number in X table
h = difference in X values 3!
Forward difference Table 4
p(p-1)(p-2)(p-3).∆ Yo
X Y ∆ ∆2 ∆3 ∆4 +
Yo 4!
Xo
1891 46 ∆Yo substitute all values we get Y =54.45
2
20 ∆ Yo
3 here X = 1895 ..which is in
1901 66 ∆ Yo interval {1891,1906}
-5
∆4 Yo
so Y also between corresponding
15 2 X values {46,66} = 54.45
1911 81 -3 -3
12 -1
1921 93 -4
8

1931 101
(U3)Bisection method (U3)Newton Raphson
3 let F(X) = X3- 3x -5=0
#Solve X - X - 1 = 0 Using
Step1:- substitute x=0,1,2... in f(x)
Bisection method until Values of two consecutive f(x)
3 have different signs.
Let F(X) = X - X - 1
Step1:- substitute x=0,1,2... in f(x) F(0) = -5 (-ve)
until Values of two consecutive f(x) F(1) = -7 (-ve)
have different signs. F(2) = -3 (-ve)
F(0) = -1 (-ve) F(3) = 13 (+ve)
F(1) = -1 (-ve)
Root lies between 2 & 3
F(2) = 5 (+ve)
let X0 = ___ = _____ = 2.5
a+b 2+3
Root lies between a=1 & b=2
2 2
Using Newton Raphson Method

Step 3 :- Draw the Table

| | | |
a+b
a b X = 2 F(Xn) sign of
(-ve) (+ve) n
F(Xn)
1 2 1.5 0.875 +ve
sign is +ve so replace b(+ve) with
Xn(1.5) in next line
1 1.5 1.25 -0.296 -ve
sign is -ve so replace a(-ve) with
Xn(1.25) in next line Put n=1 , we get X2,
1.25 1.5 1.375 0.224 +ve put n=2 , we get X3
Do this process until two
stop when two Xn values are equal consecutive values are equal
(U4)Newton's backward
X 0.30 0.40 0.50 0.60 0.70
F(X) 0.6179 0.6554 0.6915 0.7257 0.7580
From the following values compute F(0.63)
given X = 0.63

The Backward difference Table


To find ∇(Nabla) values we do
[ lower value of Y - upper value of Y ]
2 3
X Y ∇ ∇ ∇ ∇4
0.30 0.6179

0.0375
0.40 0.6554 -0.0014
-0.0005
0.0361
0.50 0.6915 -0.0019 0.0005
0.0342 0
4
0.60 0.7257 -0.0019 ∇ Yn
0.0323 3
∇ Yn
2
0.70 0.7580 ∇ Yn
Xn ∇Yn
Yn 2
P = X -Xn
____ ________
YP = Yn + P.∇Yn + P(P+1).∇ Yn
h 1! 2!
3
P = 0.63 - 0.70 + P(P+1)(P+2).∇ Yn + P(P+1)(P+2)(P+3).∇4 Yn
0.10
P = -0.7 3! 4!
(U5)Trapezoidal rule, Simpson's 1/3 & 3/8 th rule
1)Trapezoidal rule formula Example problem
b h
∫F(X)dx = 2 [ (Yo + Yn)
a
+ 2(Y1 + Y2 + Y3 +..... + Yn-1 ) ]

Where h= b - a , n = no. of intervals


n
2)Simpson's 1/3Rd formula
b
h
∫ F(X)dx = 3 [ (Yo + Yn) + 2(Y2 + Y4...)
a + 4( Y1 + Y3+...) ]
b-a
Where h = n , n = no. of intervals

3)Simpson's 3/8th formula


b
3h[ (Yo + Yn) + 2(Y3 + Y6.....)
∫ F(X)dx = 8
a + 3( Y1 + Y2 + Y4...) ]
b-a
Where h = n , n = no. of intervals

Table making
After finding h value make a
table for 'X' starting with 'a'
value and increase with 'h' upto '
b'. and calculate corresponding '
Y' values using function given in
question by substituting 'X'
values
(U3)
(U3)Iteration method
Gauss Jacobi (or) Gauss siedel
#Let F(X) = X 3- X- 11 Let, 20X + Y- 2Z = 17 ............eq(1)
3X + 20Y - Z= -18 ...........eq(2)
Step1:- substitute x=0,1,2...
2X - 3Y + 20Z = 25 ............eq(3)
in f(x) until Values of two In question the eq(1) has
consecutive f(x) have different X-coefficient is bigger than
Y&Z -coefficients ... similarly
signs.
Y&Z- coefficients are bigger than
F(0) = -11 (-ve)
remaining coefficients in eq(2)&(3)
F(1) = -11 (-ve) here bigger coefficients are same ,i.e 20
F(2) = -5 (-ve) in another questions they are not same
F(3) = 13 (+ve) but we do same process
Root lies between 2 & 3 #Given system of equations are
a+b 2+3 Diagonally dominance
let X 0 = 2 = 2 = 2.5
1
By using Iteration method => from eq(1) , X =
20
[17 - Y + 2Z ]
•Find the 'X' value from
highest power term in F(X).
F (Yn,Zn )= 1 [17 - Yn+ 2Zn ] = X n ....eq(4)
X 20 |
1
3 => From eq(2), Y =
20
[ -18 - 3X + Z ]
=> X - X - 11 = 0
3
=> X = X + 11
1/3
1
F (X n ,Zn ) = 20 [-18 - 3X n+ Zn] = Yn ...eq(5)
Y |
=> X = (X + 11) 1
=> From eq(3), Z = [ 25 - 2X + 3Y ]
1/3 20
Q(X) = ( X+11 )
Now,
Z
1
_
|
....eq(6)
F ( Xn , Yn ) =20[ 25 - 2Xn+ 3Yn] = Zn

=>Initial approximations(Xo=0 ,Yo =0 ,Zo =0)


for X1 = Q(X1 )
For 1st approximations
for, X2 = Q(X2 ) X1= F ( Y , Z ) = 0.85
For,X3 = Q(X3 )........... X
° °
Y = F ( X , Z ) = -0.9
1 Y ° °
stop the process when two Z = FZ ( X , Y ) = 1.25
° °
Xn values are equal find approximations until two approximations are equal
(U4) Lagrange's interpolation

(1) 5 Variables
Xo,X1,X2,X3,X4 are 5 'x' variables

(X - X1).(X - X2).(X - X3).(X - X4) .Yo


Y(X)=
(Xo - X1).(Xo - X2).(Xo - X3)(Xo - X4)
(X - Xo).(X - X2).(X - X3).(X - X4) .Y1
+ (X1 - Xo).(X1 - X2).(X1 - X3).(X1 - X4)

(X - Xo).(X - X1).(X - X3).(X - X4) .Y2


+
(X2 - Xo).(X2 - X1).(X2 - X3).(X2 - X4)
(X - Xo).(X - X1).(X - X2).(X - X4) .Y3
+ (X3 - Xo).(X3 - X1).(X3 - X2).(X3 - X4)
(X - Xo).(X - X1).(X - X2).(X - X3) .Y4
+ (X4 - Xo).(X4 - X1).(X4 - X2).(X4 - X3)

(2) 4 Variables
Xo,X1,X2,X3 are 4 'x' variables
(X - X1).(X - X2).(X - X3).Yo
Y(X)= (Xo - X1).(Xo - X2).(Xo - X3)
(X - Xo).(X - X2).(X - X3).Y1
+ (X1 - Xo).(X1 - X2).(X1 - X3).
(X - Xo).(X - X1).(X - X3).Y2
+ (X2 - Xo).(X2 - X1).(X2 - X3)

(X - Xo).(X - X1).(X - X2).Y3


+
(X3 - Xo).(X3 - X1).(X3 - X2).
(U3)False position Method
F(X) = XLogX - 1.2
Step1:- substitute x=0,1,2... in f(x) until Values of two
consecutive f(x) have different signs.
F(0) = not defined
F(1) = -1.2 (-ve)
F(2) = -0.5979(-ve)
F(3) = 0.2313(+ve)
Root lies between 2 & 3
In false position method
X(n-2).F(X(n-1)) - X(n-1).F(X(n-2))
X n=
F(X(n-1)) - F(X(n-2))
Xn-2 Xn-1
F(X n-2 ) F(Xn-1) Xn F(Xn) sign of
(-ve) (+ve) F(Xn)
X o= 2 X1 = 3 -0.5979 0.2313 X2=2.7210 -0.0171 -Ve

2.7210 3 -0.0171 0.2313 2.7402 -0.0003 -Ve

stop the process when two Xn values are equal

Secant method

It is same as the false position method .....


but we did not check about the sign of
F(Xn) ,,.. we go according to formula
(U4)Newton divide difference
(Q) X= 4 ,5 ,7,10 ,11, 13 F(X) = 48 , 100, 294, 900, 1210 , 2028
Then,Find F(8).
Divide difference Table
X F(X) ∆F(X) ∆2 F(X) ∆3 F(X) ∆4 F(X)

Xo =4 , F(Xo) =48
X1=5, ∆F(Xo)=52
Formula
X2=7 , ∆2 F(Xo) = 15
F(X) = F(Xo) + ( X- Xo ).[∆F(Xo)]
X3=10, ∆3F(Xo) = 1
X4=11, 4 2
∆ F(Xo) = 0
+ ( X - Xo ).( X - X1 ). [ ∆ F(Xo)]
X5=13
3
In question X=8 +(X-Xo).(X-X1).(X-X2).[∆ F(Xo)]

+(X-Xo).(X-X1).(X-X2).(X-X3).[∆4F(Xo)]
(U5) RUNGE-KUTTA METHOD (U5) Taylor's method
# 4TH Order Let (Xo,Yo) = initial conditions given
in question
K1 = h . F( Xo, Yo )

Y1 = Yo + h.Yo' +
2
K2 = h . F[ Xo + (h/2) , Yo + (K1/2) ] h .Yo
__ ''
K3 = h . F[ Xo + (h/2) , Yo + (K2/2) ] 2!
K4 = h . F[ Xo + h , Yo + K3 ] 3 IV 4
o + h .Yo
h .Y'''
+ __
K = 1/6 [ K1 + 2(K2) + 2(K3) + K4 ] 3! 4!
Y1 = Y(Xo) = Yo + K Y' = 1st differentiation
(Xo,Yo) = initial conditions Y'' = 2nd differentiation
given in question Y''' = 3rd differentiation
IV
h = X1 - Xo Y = 4th differentiation
h = X1 - Xo
#2nd order
K1 = h . F( Xo, Yo ) (U5)Picard's Method
K2 = h . F[ Xo + h , Yo + K1 ] F( X,Y ) = function given in question
dy/dx = F(X,Y)
Y1 = Yo + 1/2 ( K1 + K2 )
X
n
(U5)Euler's method ∫
Y (X)= Yo + F ( X ,Y(n-1)) dx
Xo
Take ,F(X,Y) = dy/dx , h = X1 -Xo
Put n=1 ,(1st approximation)
Yn+1 = Yn + h.F( Xn ,Yn ) we get Y
(1)
(1)
Put n=0 , we get Y1 put n=2 ,and substitute Y value
(2) (2)
in Y , we get Y (2nd approximation)
Put n=1 , we get Y2
If Cubic power of X obtained then that
approximations we can calculate Y1 value

You might also like