100% found this document useful (1 vote)
451 views103 pages

Dr. Nirav Vyas Numerical Method 2 PDF

The document discusses numerical methods for finite differences. It introduces forward, backward, and central difference operators (denoted by Δ, ∇, and δ) for approximating the derivatives of a function y=f(x) given discrete data points. The differences are organized into tables. Higher-order differences are defined recursively in terms of lower-order differences. Notationally, the differences are the same across the three methods - only the operator symbols change. Alternative notations for the discrete function values are also discussed.

Uploaded by

Ashoka Vanjare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
451 views103 pages

Dr. Nirav Vyas Numerical Method 2 PDF

The document discusses numerical methods for finite differences. It introduces forward, backward, and central difference operators (denoted by Δ, ∇, and δ) for approximating the derivatives of a function y=f(x) given discrete data points. The differences are organized into tables. Higher-order differences are defined recursively in terms of lower-order differences. Notationally, the differences are the same across the three methods - only the operator symbols change. Alternative notations for the discrete function values are also discussed.

Uploaded by

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

Numerical Methods - Finite Differences

Dr. N. B. Vyas
Department of Mathematics,
Atmiya Institute of Tech. and Science,
Rajkot (Guj.)
niravbvyas@gmail.com

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The constant difference between two consecutive values of x is
called the interval of differences and is denoted by h.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The constant difference between two consecutive values of x is
called the interval of differences and is denoted by h.
The operator defined by
y0 = y1 y0

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The constant difference between two consecutive values of x is
called the interval of differences and is denoted by h.
The operator defined by
y0 = y1 y0
y1 = y2 y1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The constant difference between two consecutive values of x is
called the interval of differences and is denoted by h.
The operator defined by
y0 = y1 y0
y1 = y2 y1
.......
.......
yn1 = yn yn1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The constant difference between two consecutive values of x is
called the interval of differences and is denoted by h.
The operator defined by
y0 = y1 y0
y1 = y2 y1
.......
.......
yn1 = yn yn1
is called Forward difference operator.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The first forward difference is yn = yn+1 yn

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The first forward difference is yn = yn+1 yn


The second forward difference are defined as the difference of
the first differences.
2 y0 = (y0 ) = (y1 y0 ) = y1 y0
= y2 y1 (y1 y0 ) = y2 2y1 + y0
2 y1 = y2 y1
2 yi = yi+1 yi
In general nth forward difference of f is defined by
n yi = n1 yi+1 n1 yi

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Forward Difference Table:
x y
x0 y0

2 y

3 y

4 y

5 y

y0
2 y0

x1 y1

3 y0

y1
2 y1

x2 y2

4 y0
3 y1

y2
2 y2

x3 y3

5 y0
4 y1

3 y2

y3
2 y3

x4 y4
y4
x5 y5

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The operator satisfies the following properties:


1 [f (x) g(x)] = f (x) g(x)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The operator satisfies the following properties:


1 [f (x) g(x)] = f (x) g(x)
2 [cf (x)] = cf (x)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The operator satisfies the following properties:


1 [f (x) g(x)] = f (x) g(x)
2 [cf (x)] = cf (x)
3 m n f (x) = m+n f (x), m, n are positive integers
4 Since n yn is a constant, n+1 yn = 0 , n+2 yn = 0, . . .
i.e. (n + 1)th and higher differences are zero.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Backward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Backward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The operator defined by
y1 = y1 y0

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Backward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The operator defined by
y1 = y1 y0
y2 = y2 y1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Backward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The operator defined by
y1 = y1 y0
y2 = y2 y1
.......
.......
yn = yn yn1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Backward difference
Suppose that a function y = f (x) is tabulated for the equally
spaced arguments x0 , x0 + h, x0 + 2h, ..., x0 + nh giving the
functional values y0 , y1 , y2 , ..., yn .
The operator defined by
y1 = y1 y0
y2 = y2 y1
.......
.......
yn = yn yn1
is called Backward difference operator.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The first backward difference is yn = yn yn1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The first backward difference is yn = yn yn1


The second backward difference are obtain by the difference
of the first differences.
2 y2
2 y3
2 yn

= (y2 ) = (y2 y1 ) = y2 y1
= y2 y1 (y1 y0 ) = y2 2y1 + y0
= y3 y2
= yn yn1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

The first backward difference is yn = yn yn1


The second backward difference are obtain by the difference
of the first differences.
2 y2
2 y3
2 yn

= (y2 ) = (y2 y1 ) = y2 y1
= y2 y1 (y1 y0 ) = y2 2y1 + y0
= y3 y2
= yn yn1

In general nth backward difference of f is defined by


n yi = n1 yi n1 yi1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Backward Difference Table:
x y
x0 y0

2 y

3 y

4 y

5 y

y1
2 y2

x1 y1

3 y3

y2
2 y3

x2 y2

4 y4
3 y4

y3
2 y4

x3 y3

5 y5
4 y5

3 y5

y4
2 y5

x4 y4
y5
x5 y5

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2
.......
.......
yn 1 = yn yn1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2
.......
.......
yn 1 = yn yn1
2

is called Central difference operator.


Similarly, higher order central differences are defined as
2 y1 = y 3 y 1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2
.......
.......
yn 1 = yn yn1
2

is called Central difference operator.


Similarly, higher order central differences are defined as
2 y1 = y 3 y 1
2
2
2 y2 = y 5 y 3
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2
.......
.......
yn 1 = yn yn1
2

is called Central difference operator.


Similarly, higher order central differences are defined as
2 y1 = y 3 y 1
2
2
2 y2 = y 5 y 3
2
2
.......
3 y 3 = 2 y2 2 y1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central difference
The operator defined by
y 1 = y1 y0
2
y 3 = y2 y1
2
.......
.......
yn 1 = yn yn1
2

is called Central difference operator.


Similarly, higher order central differences are defined as
2 y1 = y 3 y 1
2
2
2 y2 = y 5 y 3
2
2
.......
3 y 3 = 2 y2 2 y1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Central Difference Table:
x y
x0 y0

2y

3y

4y

5y

y 1
2

x1 y1

2 y1
3y 3

y 3
2

x2 y2

3y

y 5
2

x3 y3

2 y3

x4 y4

5
2

4 y2
5y 5
4 y3

3y 7

y 7
2

2 y2

2 y4

y 9
2

x5 y5

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Alternative notations for the function y = f (x).

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Alternative notations for the function y = f (x).


For two consecutive values of x differing by h.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Alternative notations for the function y = f (x).


For two consecutive values of x differing by h.
yx = yx+h yx = f (x + h) f (x)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Alternative notations for the function y = f (x).


For two consecutive values of x differing by h.
yx = yx+h yx = f (x + h) f (x)
yx = yx yxh = f (x) f (x h)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

NOTE:
From all three difference tables, we can see that only the
notations changes not the differences.
y1 y0 = y0 = y1 = y 1
2

Alternative notations for the function y = f (x).


For two consecutive values of x differing by h.
yx = yx+h yx = f (x + h) f (x)
yx = yx yxh = f (x) f (x h)
yx = yx+ h yx h = f (x + h2 ) f (x h2 )
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Evaluate the following. The interval of difference being h.


1 n ex

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Evaluate the following. The interval of difference being h.


1 n ex
2 logf (x)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Evaluate the following. The interval of difference being h.


1 n ex
2 logf (x)
3 (tan1 x)

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Evaluate the following. The interval of difference being h.


1 n ex
2 logf (x)
3 (tan1 x)
4 2 cos2x

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);
If yx is the function f (x), then

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);
If yx is the function f (x), then
Eyx = yx+h ;

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);
If yx is the function f (x), then
Eyx = yx+h ;
E 1 yx = yxh ;

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);
If yx is the function f (x), then
Eyx = yx+h ;
E 1 yx = yxh ;
E n yx = yx+nh ;
Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences
Other Difference Operator
1. Shift Operator E:
E does the operation of increasing the argument x by h so that
Ef (x) = f (x + h);
E 2 f (x) = E(Ef (x)) = Ef (x + h) = f (x + 2h);
E 3 f (x) = f (x + 3h);
E n f (x) = f (x + nh);
The inverse operator E 1 is defined as
E 1 f (x) = f (x h);
E n f (x) = f (x nh);
If yx is the function f (x), then
Eyx = yx+h ;
E 1 yx = yxh ;
E n yx = yx+nh ;
Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

2. Averaging Operator :
It is defined as



1
h
h
f (x) =
f x+
+f x
;
2
2
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

2. Averaging Operator :
It is defined as



1
h
h
f (x) =
f x+
+f x
;
2
2
2
i
1h
i.e. yx =
yx+ h + yx h ;
2
2
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

2. Averaging Operator :
It is defined as



1
h
h
f (x) =
f x+
+f x
;
2
2
2
i
1h
i.e. yx =
yx+ h + yx h ;
2
2
2
3. Differential Operator D:

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

2. Averaging Operator :
It is defined as



1
h
h
f (x) =
f x+
+f x
;
2
2
2
i
1h
i.e. yx =
yx+ h + yx h ;
2
2
2
3. Differential Operator D:
It is defined as

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

2. Averaging Operator :
It is defined as



1
h
h
f (x) =
f x+
+f x
;
2
2
2
i
1h
i.e. yx =
yx+ h + yx h ;
2
2
2
3. Differential Operator D:
It is defined as
d
f (x) = f 0 (x);
Df (x) =
dx

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2
1
1
1
4 = {E 2 + E 2 }
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2
1
1
1
4 = {E 2 + E 2 }
2
1
5 = E = E = E 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2
1
1
1
4 = {E 2 + E 2 }
2
1
5 = E = E = E 2
6 E = ehD

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2
1
1
1
4 = {E 2 + E 2 }
2
1
5 = E = E = E 2
6 E = ehD
7 (1 + )(1 ) = 1

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

Relation between the operators


1 =E1
2 = 1 E 1
1

3 = E 2 E 2
1
1
1
4 = {E 2 + E 2 }
2
1
5 = E = E = E 2
6 E = ehD
7 (1 + )(1 ) = 1
8 = = 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

9 1+

2 2



1 2 2
= 1+
2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences


1 2 2
9 1+
= 1+
2
1
10 2 = 1 + 2
4
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences


1 2 2
9 1+
= 1+
2
1
10 2 = 1 + 2
4
1
1
11 E 2 = +
2
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

9
10
11
12



1 2 2
1+
= 1+
2
1
2 = 1 + 2
4
1
1
E2 = +
2
1
1
E 2 =
2
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

9
10
11
12
13



1 2 2
1+
= 1+
2
1
2 = 1 + 2
4
1
1
E2 = +
2
1
1
E 2 =
2r
1 2
2
= + 1+
2
4
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

9
10
11
12
13
14



1 2 2
1+
= 1+
2
1
2 = 1 + 2
4
1
1
E2 = +
2
1
1
E 2 =
2r
1 2
2
= + 1+
2
4
1
1
= E 1 +
2
2
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Finite Differences

9
10
11
12
13
14



1 2 2
1+
= 1+
2
1
2 = 1 + 2
4
1
1
E2 = +
2
1
1
E 2 =
2r
1 2
2
= + 1+
2
4
1
1
= E 1 +
2
2
2 2

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

To estimate the value of a function near the beginning a table,


the forward difference interpolation formula in used.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

To estimate the value of a function near the beginning a table,


the forward difference interpolation formula in used.
Let yx = f (x) be a function which takes the values
yx0 , yx0 +h , yx0 +2h , . . . corresponding to the values
x0 , x0 + h, x0 + 2h, . . . of x.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

To estimate the value of a function near the beginning a table,


the forward difference interpolation formula in used.
Let yx = f (x) be a function which takes the values
yx0 , yx0 +h , yx0 +2h , . . . corresponding to the values
x0 , x0 + h, x0 + 2h, . . . of x.
Suppose we want to evaluate yx when x = x0 + ph, where p is
any real number.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

To estimate the value of a function near the beginning a table,


the forward difference interpolation formula in used.
Let yx = f (x) be a function which takes the values
yx0 , yx0 +h , yx0 +2h , . . . corresponding to the values
x0 , x0 + h, x0 + 2h, . . . of x.
Suppose we want to evaluate yx when x = x0 + ph, where p is
any real number.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yx0 +ph = f (x0 + ph) = E p yx0 = (1 + )p y0

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yx0 +ph = f (x0 + ph) = E p yx0 = (1 + )p y0

p(p 1) 2 p(p 1)(p 2) 3
+
+ ... y0
= 1 + p +
2!
3!


Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Forward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yx0 +ph = f (x0 + ph) = E p yx0 = (1 + )p y0

p(p 1) 2 p(p 1)(p 2) 3
+
+ ... y0
= 1 + p +
2!
3!


p(p 1) 2
p(p 1)(p 2) 3
y0 +
y0 + ...
2!
3!
is called Newtons forward interpolation formula.
yx = y0 + py0 +

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Example

Ex. For the data construct the forward difference formula. Hence,
find f (0.5).
x
f(x)

-2
15

-1
5

Dr. N. B. Vyas

0
1

1
3

2
11

3
25

Numerical Methods - Finite Differences

Example

Ex. The population of the town in decennial census was as given


below estimate the population for the year 1895.
Year:
Population(in thousand):

1891
46

Dr. N. B. Vyas

1901
66

1911
81

1921
93

1931
101

Numerical Methods - Finite Differences

Example

Ex. Estimate the value of production for the year 1984 using
Newtons forward method for the following data:
Year:
Production:

1976
20

Dr. N. B. Vyas

1978
27

1980
38

1982
50

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

To estimate the value of a function near the end of a table, the


backward difference interpolation formula in used.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

To estimate the value of a function near the end of a table, the


backward difference interpolation formula in used.
Let yx = f (x) be a function which takes the values
yx0 , yx0 +h , yx0 +2h , . . . corresponding to the values
x0 , x0 + h, x0 + 2h, . . . of x.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

To estimate the value of a function near the end of a table, the


backward difference interpolation formula in used.
Let yx = f (x) be a function which takes the values
yx0 , yx0 +h , yx0 +2h , . . . corresponding to the values
x0 , x0 + h, x0 + 2h, . . . of x.
Suppose we want to evaluate yx when x = xn + ph, where p is
any real number.

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yxn +ph = f (xn + ph) = E p yxn = (1 )p yn

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yxn +ph = f (xn + ph) = E p yxn = (1 )p yn



p(p + 1) 2 p(p + 1)(p + 2) 3
= 1 + p +
+
+ ... yn
2!
3!

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Gregory - Newton Backward Interpolation Formula

Let it be yp . For any real number n, we have defined operator E


such that E n f (x) = f (x + nh).
yx = yxn +ph = f (xn + ph) = E p yxn = (1 )p yn



p(p + 1) 2 p(p + 1)(p + 2) 3
= 1 + p +
+
+ ... yn
2!
3!
p(p + 1) 2
p(p + 1)(p + 2) 3
yn +
yn + ...
2!
3!
is called Newtons backward interpolation formula
yx = yn + pyn +

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Example

Ex. Using Newtons backward difference interpolation, interpolate at


x = 1 from the following data.
x
f(x)

0.1
1.699

0.2
1.073

0.3
0.375

Dr. N. B. Vyas

0.4
0.443

0.5
1.429

0.6
2.631

Numerical Methods - Finite Differences

Example

Ex. The table gives the distance in nautical miles of the visible
horizon for the given heights in feet above the earths surface.
Find the value of y when x=390 ft.
Height(x):
Distance(y):

100
10.63

150
13.03

200
15.04

Dr. N. B. Vyas

250
16.81

300
18.42

350
19.90

400
21.47

Numerical Methods - Finite Differences

Stirlings Interpolation Formula

To estimate the value of a function near the middle a table, the


central difference interpolation formula in used.
Let yx = f (x) be a functional relation between x and y.
If x takes the values x0 2h, x0 h, x0 , x0 + h, x0 + 2h, . . . and
the corresponding values of y are y2 , y1 , y0 , y1 , y2 . . . then we
can form a central difference table as follows:

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Stirlings Interpolation Formula

1st
dif f erence

2nd
dif f erence

3rd
dif f erence

x0 2h y2
y2 (= y3/2 )
x0 h

2 y2 (= 2 y1 )

y1

3 y2 (= 3 y1/2 )

y1 (= y1/2 )
x0

2 y1 (= 2 y0 )

y0

x0 + h

y1

x0 + 2h

y2

3 y1 (= 3 y1/2 )

y0 (= y1/2 )
2 y0 (= 2 y1 )
y1 (= y3/2 )

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Stirlings Interpolation Formula

The Stirlings formula in forward difference notation is

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Stirlings Interpolation Formula

The Stirlings formula in forward difference notation is




y0 + y1
p2
yp = y0 + p
+ 2 y1
2
2!

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Stirlings Interpolation Formula

The Stirlings formula in forward difference notation is




y0 + y1
p2
yp = y0 + p
+ 2 y1
2
2!
 3

2
2
3
p(p 1 ) y1 + y2
p2 (p2 12 ) 4
+
+
y2 + . . .
3!
2
4!

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Example

Ex.
Using Stirlings formula find y35
x:
y:

10
600

20
512

Dr. N. B. Vyas

30
439

40
346

50
243

Numerical Methods - Finite Differences

Example

Ex. The function y is given in the table below:


Find y for x=0.0341
x:
y:

0.01
98.4342

0.02
48.4392

Dr. N. B. Vyas

0.03
31.7775

0.04
23.4492

0.05
18.4542

Numerical Methods - Finite Differences

Central Difference
Gausss Forward interpolation formula:

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Central Difference
Gausss Forward interpolation formula:

Pn (x) = y0 + py0 +

(p + 1)p(p 1) 3
p(p 1) 2
y1 +
y1 +
2!
3!

(p + 1)p(p 1)(p 2) 4
y2 + ...
4!

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Central Difference
Gausss Forward interpolation formula:

Pn (x) = y0 + py0 +

(p + 1)p(p 1) 3
p(p 1) 2
y1 +
y1 +
2!
3!

(p + 1)p(p 1)(p 2) 4
y2 + ...
4!
Gausss Backward interpolation formula:

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Central Difference
Gausss Forward interpolation formula:

Pn (x) = y0 + py0 +

(p + 1)p(p 1) 3
p(p 1) 2
y1 +
y1 +
2!
3!

(p + 1)p(p 1)(p 2) 4
y2 + ...
4!
Gausss Backward interpolation formula:

Pn (x) = y0 + py1 +

p(p + 1) 2
(p + 1)p(p 1) 3
y1 +
y2 +
2!
3!

(p + 2)(p + 1)p(p 1) 4
y2 + ...
4!

Dr. N. B. Vyas

Numerical Methods - Finite Differences

Example

Ex. Estimate the value of y(2.5) using Gausss forward formula given
that:
x:
y:

1
1

Dr. N. B. Vyas

2
4

3
9

4
16

Numerical Methods - Finite Differences

Example

Ex. Interpolate by means of Gausss backward formula the


population for the year 1936 given the following table:
Year :
Population(in 1000s):

1901
12

Dr. N. B. Vyas

1911
15

1921
20

1931
27

1941
39

1951
52

Numerical Methods - Finite Differences

You might also like