Você está na página 1de 21

II/IV B.

Tech Mathematical Methods (13BS201) Chapter-2


Page 1

Finite Differences and Interpolation
Suppose we are given the following values of y = f(x) for a set of values of x :
x : x
0
x
1
x
2
x
n

y : y
0
y
1
y
2
y
n

The process of finding the values of y corresponding to any value of x=x
i
between x
0
and x
n
is
called interpolation.
The technique of estimating the value of a function for any intermediate value of the
independent variable is called interpolation.
The technique of estimating the value of a function outside the given range is called
extrapolation.
The study of interpolation is based on the concept of differences of a function.
Suppose that the function y=f(x) is tabulated for the equally spaced values x = x
0
,
x
1
=x
0
+h, x
2
=x
0
+2h, , x
n
=x
0
+nh giving y = y
0
, y
1
, y
2
, , y
n
. To determine the values of
f(x) and f '(x) for some intermediate values of x, we use the following three types of
differences
1. Forward differences
2. Backward differences
3. Central differences
Forward differences: The forward differences are defined and denoted by f(x)=f(x+h)- f(x),
y
0
= y
1
y
0

y
1
= y
2
y
1

y
2
= y
3
y
2

.
y
r
= y
r+1
y
r

.
y
n-1
= y
n
y
n-1

These are called the first forward differences and is the forward difference operator.

Similarly the second forward differences are defined by

2
y
r
= y
r+1
y
r
.
In general

p
y
r
=
p-1
y
r+1

p-1
y
r
,
p
th
forward differences.
The forward differences systematically set out in a table called forward difference table.
Value of
x
Value of
y
1
st
diff.

2
nd
diff.

2

3
rd
diff.

3

4
th
diff.

4

5
th
diff.

5

x
0
y
0

Chapter-2
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 2

y
0

x
1
y
1

2
y
0

y
1

3
y
0

x
2
y
2

2
y
1

4
y
0

y
2

3
y
1

5
y
0

x
3
y
3

2
y
2

4
y
1

y
3

3
y
2

x
4
y
4

2
y
3

y
4

x
5
y
5


Backward Differences: The backward differences are defined and denoted by f(x)= f(x)- f(x- h),
y
1
= y
1
y
0

y
2
= y
2
y
1

y
3
= y
3
y
2

.
y
r
= y
r
y
r-1

.
y
n
= y
n
y
n-1.

These are called the first backward differences and is the backward difference operator.

Similarly the second backward differences are defined by
2
y
r
= y
r
y
r-1
.
In general
p
y
r
=
p-1
y
r

p-1
y
r-1
,
p
th
backward differences. The backward differences systematically set out in a table called
backward difference table.
Value of
x
Value of
y
1
st
diff.

2
nd
diff.
2

3
rd
diff.
3

4
th
diff.
4

5
th
diff.
5

x
0
y
0

y
1

x
1
y
1

2
y
2

II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 3

y
2

3
y
3

x
2
y
2

2
y
3

4
y
4

y
3

3
y
4

5
y
5

x
3
y
3

2
y
4

4
y
5

y
4

3
y
5

x
4
y
4

2
y
5

y
5

x
5
y
5


Example#1. Evaluate
(i) tan
-1
x
(ii) (e
x
log 2x)
(iii)
2
cos 2x
Sol. From the definition of forward differences f(x) = f(x+h) f(x).
(i) Let f(x) = tan
-1
x, then
tan
-1
x = tan
-1
(x+h) - tan
-1
x
= .
1
tan
) ( 1
tan
2
1 1
x hx
h
x h x
x h x

(ii)
. 2 log ) 1 ( ) 1 log(
2 log ) ( log
2 log 2 log 2 log ) ( 2 log
2 log ) ( 2 log ) 2 log (
x e
x
h
e e
x e e
x
h x
e
x e x e x e h x e
x e h x e x e
h h x
x h x h x
x h x h x h x
x h x x

(iii)
2
cos 2x =

[ cos 2x]
=

[ cos 2(x+h) cos 2x]
= cos 2(x+h)

cos 2x
= cos 2(x+2h) cos 2(x+h) [cos 2(x+h) ) cos 2x]
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 4

= 2 cos (2x+3h) sin h + 2 sin(2x+h) sin h
= 2 sin h [sin(2x+3h) sin(2x+h) ]
= 2 sin h [2 cos(2x+2h)sin h]
= 2 sin
2
h cos 2(x+h).
Example#2. Evaluate the following, with interval of difference being unity
(i)
2
(ab
x
) (ii)
n
e
x
Sol. From the definition of forward differences f(x) = f(x+h) f(x).
(i) (ab
x
) = a b
x
= a(b
x+1
b
x
) = ab
x
(b 1)

2
(ab
x
) = [ (ab
x
)]
= ab
x
(b 1) = a(b 1) (b
x
)
= a(b 1) (b
x+1
b
x
)
= a(b 1)
2
b
x
.
(ii) e
x
= e
x+1
e
x
= e
x
(e 1)

2
e
x
= [e
x
] = [e
x+1
e
x
]= (e 1)e
x

= (e 1) e
x
(e 1) = (e 1)
2
e
x
.
Similarly
2
e
x
= (e 1)
2
e
x
,
3
e
x
= (e 1)
3
e
x
, and
n
e
x
= (e 1)
n
e
x
.
Differences of a Polynomial:
Let f(x) = a
0
x
n
+ a
1
x
n-1
+ a
2
x
n-2
+ + a
n-1
x + a
n
be an nth degree polynomial in x, then
f(x) = f(x+h) f(x)
= a
0
[(x+h)
n
x
n
] + a
1
[(x+h)
n-1
x
n-1
]+ a
2
[(x+h)
n-2
x
n-2
]+ + a
n-1
[x+h-x]
= a
0
n h x
n-1
+ a
11
x
n-2
+ a
21
x
n-2
+ + a
n-1
h,
where a
11
, a
12
, are new constant coefficients. Thus, the first difference of a polynomial of nth
degree is a polynomial of degree n-1.
Similarly

2
f(x) = [f(x)]
= a
0
n h [(x+h)
n-1
x
n
] + a
11
[(x+h)
n-2
x
n-2
]+ a
21
[(x+h)
n-3
x
n-3
]+ + a
n-2, 1
[x+h-x]
= a
0
n(n 1) h
2
x
n-2
+ a
12
x
n-3
+ a
22
x
n-4
+ + a
n-2,1
h,
where a
12
, a
12
, are new constant coefficients. Thus, the second difference of a polynomial of
nth degree is a polynomial of degree n-2.
Continuing this process, for the nth difference, we get a polynomial of degree zero i.e.

n
f(x) = a
0
n(n 1) (n 2) 3.2.1. h
n
= a
0
n! h
n

which is a constant.
From the above discussion, we have the following results:
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 5

The differences of a polynomial of the n
t h
degree are constant and all higher order
differences are zero.
If the nth differences of a function tabulated at equally spaced intervals are constant, then
the function is a polynomial of degree n (It is important in numerical analysis as it
enables as to approximate a function by a polynomial).
Example#3. Evaluate
10
[(1-ax)(1-bx
2
)(1-cx
3
)(1-dx
4
)].
Sol. Taking interval of difference h = 1.

10
[(1-ax)(1-bx
2
)(1-cx
3
)(1-dx
4
)] =
10
[abcd x
10
+ k
1
x
9
+ k
2
x
8
+ + 1]
= abcd
10
(x
10
) + k
1

10
(x
9
)+ k
2

10
(x
8
) + +
10
(1),
where k
1
, k
2
, are constant coefficients. Since
10
(x
n
) = 0 for n < 10, we have

10
[(1-ax)(1-bx
2
)(1-cx
3
)(1-dx
4
)] = abcd
10
(x
10
) = abcd 10!.
Factorial Notation: A product of the form x(x 1) (x 2) (x r +1) is denoted by [x]
r
and is
called a factorial. In particular,
[x] = x, [x]
2
= x(x 1) , [x]
3
= x(x 1) (x 2), [x]
n
= x(x 1) (x 2) (x n +1).
If the interval of difference is h, then
[x]
n
= x(x h) (x 2h) (x (n 1)h).
The factorial notation is of special utility in the theory of finite differences. It helps in finding the
successive differences of a polynomial directly by simple rule of differentiation ([x]
r
as x
r
).
To express a polynomial of nth degree in the factorial notation, we use the following two steps
1. Arrange the coefficients of the powers of x in descending order, replacing missing
powers by zeros.
2. Using detached coefficients divide by x, x 1, x 2, x (n 1) successively.
Example#4. Express f(x) = 2x
3
3x
2
+ 3x 10 in a factorial notation and hence find all
differences.
Sol. Let f(x) = A[x]
3
+ B[x]
2
+ C[x] + D. Then
x
3
x
2
x

1 2 -3 3 -10 = D
_ 2 -1

2 2 -1 2 = C
_ 4
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 6


3 2 3 = B
_

2 = A

Hence f(x) = 2[x]
3
+ 3[x]
2
+ 2[x] 10. Therefore,
f(x) = 6[x]
2
+ 6[x] + 2

2
f(x) = 12 [x] + 6

3
f(x) = 12.
Other Difference Operators:
(1) Shift operator : Shift operator E is the operation of increasing the argument x by h so that
E f(x) = f(x+h), E
2
f(x) = f(x+2h),
E
n
f(x) = f(x+nh).
The inverse operator E
-1
is defined by
E
-1
f(x) = f(x- h).
Similarly
E
-n
f(x) = f(x- nh).
(2) Averaging operator : Averaging operator is defined by the equation
f(x) = [f(x + h/2) + f(x - h/2)].
In the difference calculus, and E are regarded as the fundamental operators and ,
and can be expressed in terms of these.

Relations Between the Operators :
1. = E 1
2. = 1 E
-1

3. = E
1/2
E
-1/2

4. = [E
1/2
+ E
-1/2
]
5. = E = E = E
1/2

6. E = e
hD
.
Example#1. Determine the missing values in the following table:
x 45 50 55 60 65
y 3 ? 2 ? -2.4
Sol. Let p and q be the missing values in the given table, then the difference table is as follows:
x y y
2
y
3
y
45 3
p 3
50 p 5 2p
2 p 3p + q 9
55 2 p + q 4
q 2 3.6 p 3q
60 q 0.4 2q
2.4 q
65 -2.4
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 7

Since three entries are given, the function y can be represented by a second degree polynomial.
Therefore,
3
y
0
= 0 and
3
y
1
= 0. Thus 3p + q 9 = 0 and 3.6 p 3q = 0. Solving these
equations, we get p = 2.925 and q = 0.225.
Example#2. Determine the missing values in the following table without using difference table.
x 45 50 55 60 65
y 3 ? 2 ? -2.4
Sol. Given that y
0
= 3, y
2
= 2 and y
4
= -2.4 and missing values be taken as y
1
= p and y
3
= q.
Since three entries are given, the function y can be represented by a second degree polynomial.
Therefore,
3
y
0
= 0 and
3
y
1
= 0.
(E 1)
3
y
0
= 0 (E 1)
3
y
1
= 0
(E
3
3E
2
+ 3E 1)y
0
= 0 (E
3
3E
2
+ 3E 1)y
1
= 0
y
3
3y
2
+ 3y
1
y
0
= 0 y
4
3y
3
+ 3y
2
y
1
= 0
q 3(2)+ 3p 3 = 0 -2.4 3q + 3(2) p = 0
3p + q 9 = 0 3.6 p 3q = 0.
Solving these equations, we get p = 2.925 and q = 0.225.

Newtons Forward Interpolation Formulae:
Let the function y=f(x) take the values y
0
, y
1
, y
2
, corresponding to the values x
0
, x
1
, x
2
,
of x. Suppose it is required to evaluate f(x) for x=x
0
+ph, p is any real number.
For any real number p, we have defined E such that
E
p
f(x) = f(x
0
+ph)
y
p
= f(x
0
+ph) = E
p
f(x
0
)= (1+)
p
y
0

= [1+p+p(p-1)/2!
2
+ p(p-1)(p-2)/3!
3
+] y
0

= y
0
+ p y
0
+ p(p-1)/2!
2
y
0
+ p(p-1)(p-2)/3!
3
y
0
+
It is called Newtons forward interpolation formulae.

Newtons Backward Interpolation Formulae:
Suppose it is required to evaluate f(x) for x=x
n
+ph, where p is any real number.
E
p
f(x) = f(x
n
+ph)
y
p
= f(x
n
+ph) = E
p
f(x
n
)= (1- )
-p
y
n

= [1+p +p(p+1)/2!
2
+ p(p+1)(p+2)/3!
3
+] y
n

= y
n
+ p y
n
+ p(p+1)/2!
2
y
n
+ p(p+1)(p+2)/3!
3
y
n
+
It is called Newtons backward interpolation formulae.

Choice of Newtons Interpolation formulae:
Newtons forward interpolation formulae is used for interpolating the values of y near the
beginning of a set of tabulated values and extrapolating values of y a little backward of
y
0
.
Newtons backward interpolation formulae is used for interpolating the values of y near
the end of a set of tabulated values and also extrapolating values of y a little ahead of y
n
.

Example#1. The table gives the distances in nautical miles of the visible horizon for the given
heights in feet above the earths surface :
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 8

x=height 100 150 200 250 300 350 400
y=distance 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when (i) x= 218 ft. (ii) x= 410 ft.
Sol. The difference table is
x y
2

3

4

100 10.63
2.4
150 13.03 -0.39
2.01 0.15
x
0
=200 15.04 -0.24 -0.07
1.77 0.08
250 16.81 -0.16 -0.05
1.61 0.03
300 18.42 -0.13 -0.01
1.48 0.02
350 19.90 -0.11
1.37
x
n
=400 21.27
(i) If we take x
0
=200, then y
0
=15.04, y
0
=1.77,
2
y
0
=-0.16,
3
y
0
=0.03,
4
y
0
=-0.01.
Since x=218, step length h=50 and p=(x-x
0
)/h =18/50 = 0.36.
By Newtons forward interpolation formula, we have
y(218) = y
0
+ p y
0
+ p(p-1)/2!
2
y
0
+ p(p-1)(p-2)/3!
3
y
0
+ p(p-1)(p-2)(p-3)/4!
4
y
0

= 15.04 + 0.36 (1.77) + 0.36(0.36-1)/2 (-0.16)+ 0.36(0.36-1)(0.36-2)/6 (0.03)
+ 0.36(0.36-1)(0.36-2)(0.36-3)/24 (-0.01)
=15.04+0.6372+0.0184+0.0018+ 0.00041 = 15.69741
15.7 nautical miles.
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 9

(ii) If we take x
n
=400, then y
n
=21.27, y
n
=1.37,
2
y
n
=-0.11,
3
y
n
=0.02,
4
y
n
=-0.01.
Since x=410, step length h=50 and p=(x-x
n
)/h =10/50 = 0.2.
By Newtons backward interpolation formula, we have
y(410) = y
n
+ p y
n
+ p(p+1)/2!
2
y
n
+ p(p+1)(p+2)/3!
3
y
n
+ p(p+1)(p+2)(p+3)/4!
4
y
n

= 21.27 + 0.2 (1.37) + 0.2(0.2+1)/2 (-0.11) + 0.2(0.2+1)(0.2+2)/6 (0.02)
+ 0.2(0.2+1)(0.2+2)(0.2+3)/24 (-0.01)
=21.27+0.274-0.0132+0.0017- 0.0007 = 21.5318
21.53 nautical miles.
Interpolation with unequal intervals:
The disadvantage for the previous interpolation formulas is that, they are used only for
equal intervals. The following are the interpolation with unequal intervals;
1) Lagranges formula for unequal intervals,
2) Newtons divided difference formula.

Lagranges interpolation formula: If y = f(x) takes the values y
0
, y
1
, y
2
, , y
n
corresponding
to x
0
, x
1
, x
2
, , x
n
, then
, y
) x (x ) x )(x x (x
) x (x ) x )(x x (x

y
) x (x ) x )(x x (x
) x (x ) x )(x x (x
y
) x (x ) x )(x x (x
) x (x ) x )(x x (x
f(x)
n
1 n n 1 n 0 n
1 n 1 0
1
n 1 2 1 0 1
n 2 0
0
n 0 2 0 1 0
n 2 1


which is known as Lagranges formula.
Divided Differences: If (x
0
, y
0
), (x
1
, y
1
), , (x
n
, y
n
) are given points, then the first divided
differences for the argument x
0
, x
1
is defined by
0 1
0 1
1 0
x x
y y
] x , [x .
Similarly
.
x x
y y
] x , [x , ,
x x
y y
] x , [x ,
x x
y y
] x , [x
1 n n
1 n n
n 1 n
2 3
2 3
3 2
1 2
1 2
2 1

The second divided differences for x
0
, x
1
, x
2
is
0 2
1 0 2 1
2 1 0
x x
] x , [x ] x , [x
] x , x , [x .
The third divided differences for x
0
, x
1
, x
2
, x
3
is
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 10

0 3
2 1 0 3 2 1
3 2 1 0
x x
] x , x , [x ] x , x , [x
] x , x , x , [x .
And so on, the nth divided differences for x
0
, x
1
, x
2
, , x
n
is
.
x x
] x , , x , [x ] x , , x , [x
] x , , x , x , [x
0 n
1 - n 1 0 n 2 1
n 2 1 0


All the divided differences systematically set out in a table called divided difference table.

Value
of x
Value
of y
1
st

divided
difference

2
nd

divided
difference
3
rd
divided
difference
4
th
divided
difference
5
th
divided
difference
x
0
y
0

[x
0
,x
1
]
x
1
y
1
[x
0
,x
1
,x
2
]
[x
1
,x
2
] [x
0
,x
1
,x
2
,x
3
]
x
2
y
2
[x
1
,x
2
,x
3
] [x
0
,x
1
,x
2
,x
3
,x
4
]
[x
2
,x
3
] [x
1
,x
2
,x
3
,x
4
] [x
0
,x
1
,x
2
,x
3
,x
4
,x
5
]
x
3
y
3
[x
2
,x
3
,x
4
] [x
1
,x
2
,x
3
,x
4
,x
5
]
[x
3
,x
4
] [x
2
,x
3
,x
4
,x
5
]
x
4
y
4
[x
3
,x
4
,x
5
]
[x
4
,x
5
]
x
5
y
5


Newtons divided difference formula: If y = f(x) takes the values y
0
, y
1
, y
2
, , y
n

corresponding to x
0
, x
1
, x
2
, , x
n
, then
f(x) = y
0
+(x-x
0
)[x
0
, x
1
] + (x- x
0
)(x-x
1
)[x
0
, x
1
, x
2
] + + (x-x
0
)(x- x
1
)(x-x
n-1
)[x
0
, x
1
, x
2
, , x
n
],
which is known as Newtons general interpolation formula with divided differences.

Example#1. Given the values
x : 5 7 11 13 17
f(x): 150 392 1452 2366 5202
Evaluate f(9), using
(i) Lagranges formula
(ii) Newtons divided difference formula.
Sol. Let y = f(x), then from the given data, we have
x
0
= 5, x
1
= 7, x
2
= 11, x
3
= 13, x
4
= 17 and y
0
= 150, y
1
= 392, y
2
= 1452, y
3
= 2366, y
4
= 5202.
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 11

(i) By Lagrnges interpolation formula
. y
) x (x ) ( ) x )(x x (x
) x (x ) ( ) x )(x x (x

y
) x (x ) ( ) x )(x x (x
) x (x ) ( ) x )(x x (x
y
) x (x ) ( ) x )(x x (x
) x (x ) ( ) x )(x x (x

y
) x (x ) ( ) x )(x x (x
) x (x ) ( ) x )(x x (x
y
) x (x ) ( ) x )(x x (x
) x (x ) ( ) x )(x x (x
f(x)
4
3 4 2 4 1 4 0 4
3 2 1 0
3
4 3 2 3 1 3 0 3
4 2 1 0
2
4 2 3 2 1 2 0 2
4 3 1 0
1
n 1 3 1 2 1 0 1
4 3 2 0
0
n 0 3 0 2 0 1 0
4 3 2 1
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x

. 810
5
578
3
2366
3
3872
15
3136
3
50
5202
13) 11)(17 7)(17 5)(17 (17
13) 11)(9 7)(9 5)(9 (9

2366
17) 11)(13 7)(13 5)(13 (13
17) 11)(9 7)(9 5)(9 (9
1452
17) 13)(11 7)(11 8)(11 (11
17) 13)(9 7)(9 5)(9 (9

392
17) 13)(7 11)(7 5)(7 (7
17) 13)(9 11)(9 5)(9 (9
150
17) 13)(5 11)(5 7)(5 (5
17) 13)(9 11)(9 7)(9 (9
f(9)

(ii) The divided difference table is
Value
of x
Value
of y
1
st

divided
difference

2
nd

divided
difference
3
rd
divided
difference
4
th
divided
difference
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202
By Newton divided difference formula
f(x) = y
0
+(x-x
0
)[x
0
, x
1
] + (x- x
0
)(x-x
1
)[x
0
, x
1
, x
2
] +(x-x
0
)(x- x
1
)(x-x
2
)[x
0
, x
1
, x
2
,x
3
]
+ (x- x
0
)(x-x
1
)(x-x
2
)(x- x
3
)[x
0
, x
1
, x
2
,x
3
,x
4
].
f(9) = 150 + (9 5)121 + (9 5) (9 7)24 + (9 5)(9 7)(9 11)1
+ (9 5)(9 7)(9 11)(9 13)0
= 150 + 484 + 192 16 + 0
= 810.

II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 12


Numerical Differentiation:

Mathematically, the derivative represents the rate of change of a dependent variable with respect
to an independent variable. For example, if we are given a function y(t) that specifies an objects
position as a function of time, differentiation provides a means to determine its velocity, as in:

As in following Figure, the derivative can be visualized as the slope of a function.


Numerical differentiation is used when the function y = f(x) is given in tabular form or it
is highly complex. The basic idea in numerical differentiation is to replace the given function y =
f(x) on the interval by an interpolating polynomial P(x) and set f (x) = P(x), f (x) = P
(x) etc. Numerical differentiation is less exact than interpolation.

Numerical differentiation using Newtons forward formula: Suppose y = f(x) is specified in
an interval [a, b] at equally spaced points x
i
= x
0
+ ih (i = 0, 1, , n) (x
0
=a, x
n
=b) by means of
values y
i
= f(x
i
). By Newton forward interpolation formula
. .. y
4!
3) 2)(p 1)(p p(p
y
3!
2) 1)(p p(p
y
2!
1) p(p
y p y f(x) y
0
4
0
3
0
2
0 0
,
where
h
x x
p
0
and h = x
i+1
x
i
, for i = 1, 2, , n. Here p is a function of x and
h
1
dx
dp
.
Rewriting the above equation, we have
. .. y
24
3p 11p 6p p
y
6
2p 3p p
y
2
p p
y p y y(x)
0
4
2 3 4
0
3
2 3
0
2
2
0 0

Differentiating the above equation with respect to x, we have
. ... y
24
6 22p 18p 4p
y
6
2 6p 3p
y
2
1 2p
y
h
1
dp
dy
h
1
dx
dp
dp
dy
dx
dy
0
4
2 3
0
3
2
0
2
0
Again differentiating with respect to x, we get
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 13

. ... y
12
11 18p 6p
y ) 1 ( y
h
1
dx
dy
dp
d
h
1
dx
dp
dx
dy
dp
d
dx
dy
dx
d
dx
y d
0
4
2
0
3
0
2
2 2
2
p
Special case: If the derivative is required to find at a basic tabulated point x = x
i
, then choose
x
0
= x
i
and the formulas become

0
5
0
4
0
3
0
2
0
x x
y
5
1
y
4
1
y
3
1
y
2
1
y
h
1
dx
dy
0

And
. y
6
5
y
12
11
y y
h
1
dx
y d
0
5
0
4
0
3
0
2
2
x x
2
2
0

Numerical differentiation using Newtons backward formula:
In this case we replace y(x) by Newtons backward interpolation formula
. .. y
4!
3) 2)(p 1)(p p(p
y
3!
2) 1)(p p(p
y
2!
1) p(p
y p y y(x)
n
4
n
3
n
2
n n


where
h
x x
p
n
and h = x
i+1
x
i
, for i = 1, 2, , n. Here p is a function of x and
h
1
dx
dp
.
Rewriting the above equation, we have
. .. y
24
3p 11p 6p p
y
6
2p 3p p
y
2
p p
y p y y(x)
n
4
2 3 4
n
3
2 3
n
2
2
0 n

Differentiating the above equation with respect to x, we have
. ... y
24
6 22p 18p 4p
y
6
2 6p 3p
y
2
1 2p
y
h
1
dp
dy
h
1
dx
dp
dp
dy
dx
dy
n
4
2 3
n
3
2
n
2
n
Again differentiating with respect to x, we get
. ... y
12
11 18p 6p
y ) 1 ( y
h
1
dx
dy
dp
d
h
1
dx
dp
dx
dy
dp
d
dx
dy
dx
d
dx
y d
n
4
2
n
3
n
2
2 2
2
p
Special case: If the derivative is required to find at a basic tabulated point x = x
i
, then choose
x
n
= x
i
and the formulas become

n
5
n
4
n
3
n
2
0
x x
y
5
1
y
4
1
y
3
1
y
2
1
y
h
1
dx
dy
n

and
. y
6
5
y
12
11
y y
h
1
dx
y d
n
5
n
4
n
3
n
2
2
x x
2
2
n

Example#1. Compute f(x) and f(x) at (i) x = 16 (ii) x = 15 (iii) x = 24 (iv) x = 25 from the
following table
x 15 17 19 21 23 25
f(x) 3.873 4.123 4.359 4.583 4.796 5.8
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 14

Sol. Let y = f(x), then from the given table x
0
= 15, x
1
= 17, x
2
= 19, x
3
= 21, x
4
= 23, x
5
= 25
and y
0
= 3.873, y
1
= 4.123, y
2
= 4.359, y
3
= 4.583, y
4
= 4.796, y
5
= 5.8. The finite difference table
is
x y y
2
y
3
y
4
y
5
y
15 3.873
0.25
17 4.123 -0.014
0.236 0.002
19 4.359 -0.012 -0.001
0.224 0.001 0.002
21 4.583 -0.011 0.001
0.213 0.002
23 4.796 -0.009
0.204
25 5
(i) Since x = 16 is nearer to the beginning of the table we use Newton forward formula. Here the
step size h = 2. Taking x
0
= 15, then . 5 . 0
2
1
2
15 16
0
h
x x
p
Newton forward formula to compute first derivative of y=f(x) is
. ... y
24
6 22p 18p 4p
y
6
2 6p 3p
y
2
1 2p
y
h
1
dx
dy
0
4
2 3
0
3
2
0
2
0

Substituting x = 16, p = 0.5, y
0
= 0.25,
2
y
0
= 0.014,
3
y
0
= 0.002,
4
y
0
= 0.001,
5
y
0
=0.002,
we have
. (-0.001)
24
6 22(0.5) 18(0.5) 4(0.5)

(0.002)
6
2 6(0.5) 3(0.5)
(-0.014)
2
1 2(0.5)
0.25
2
1
dx
dy
2 3
2
16 x

f(16) = 0.1249375.
Newton forward formula to compute second derivative of y=f(x) is
. ... y
12
11 18p 6p
y ) 1 ( y
h
1
dx
y d
0
4
2
0
3
0
2
2 2
2
p
Substituting the values from the table, we have
. (-0.001)
12
11 18(0.5) 6(0.5)
(0.002) ) 1 5 . 0 ( 0.014 -
2
1
dx
y d
2
2
16
2
2
x

f(16) = -0.0038229.

(ii) Since x = 15 is in the beginning of the table, we use Newton forward formula. Here the step
size h = 2, x = x
0
= 15 and p = 0.
Newton forward formula to compute first derivative of y=f(x) at x = x
0
is
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 15

0
5
0
4
0
3
0
2
0
x x
y
5
1
y
4
1
y
3
1
y
2
1
y
h
1
dx
dy
0

Substituting the values from the table, we have
) (0.002
5
1
(-0.001)
4
1
(0.002)
3
1
(-0.014)
2
1
0.25
2
1
dx
dy
15 x

f(15) = 0.128958.
Newton forward formula to compute second derivative of y=f(x) at x = x
0
is
. y
6
5
y
12
11
y y
h
1
dx
y d
0
5
0
4
0
3
0
2
2
x x
2
2
0

Substituting the values from the table, we have
. (0.002)
6
5
(-0.001)
12
11
0.002 0.014 -
2
1
dx
y d
2
15 x
2
2

f(15) = -0.004229.
(iii) Since x = 24 is nearer to the ending of the table, we use Newton backward formula. Here the
step size h = 2. Taking x
n
= 25, then . 5 . 0
2
1
2
25 24
h
x x
p
n

Newton backward formula to compute first derivative of y=f(x) is
. ... y
24
6 22p 18p 4p
y
6
2 6p 3p
y
2
1 2p
y
h
1
dx
dy
n
4
2 3
n
3
2
n
2
n

Substituting x = 25, p = 0.5, y
n
= 0.204,
2
y
n
= 0.009,
3
y
n
= 0.002,
4
y
n
= 0.001,
5
y
n
=0.002, we have
. ) 001 . 0 (
24
6 22(-0.5) 18(-0.5) 4(-0.5)

) 002 . 0 (
6
2 6(-0.5) 3(-0.5)
) 009 . 0 (
2
1 2(-0.5)
0.204
2
1
dx
dy
2 3
2
25 x

f(24) = 0.09727.
Newton backward formula to compute second derivative of y=f(x) is
. ... y
12
11 18p 6p
y ) 1 ( y
h
1
dx
y d
n
4
2
n
3
n
2
2 2
2
p
Substituting the values from the table, we have
. ) 001 . 0 (
12
11 18(-0.5) 6(-0.5)
) 002 . 0 )( 1 5 . 0 ( 009 . 0
2
1
dx
y d
2
2
24
2
2
x

f(24) = -0.00242708.
(iv) Since x = 25 is in the ending of the table, we use Newton forward formula. Here the step size
h = 2, x = x
0
= 15 and p = 0.
Newton backward formula to compute first derivative of y=f(x) at x = x
n
is
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 16

n
5
n
4
n
3
n
2
0
x x
y
5
1
y
4
1
y
3
1
y
2
1
y
h
1
dx
dy
n
.
Substituting the values from the table, we have
. ) 002 . 0 (
5
1
) 001 . 0 (
4
1
) 002 . 0 (
3
1
) 009 . 0 (
2
1
0.204
2
1
dx
dy
25 x

f (25) = 0.10048
Newton backward formula to compute second derivative of y=f(x) at x = x
n
is
. y
6
5
y
12
11
y y
h
1
dx
y d
n
5
n
4
n
3
n
2
2
x x
2
2
n

Substituting the values from the table, we have
. ) 002 . 0 (
6
5
) 001 . 0 (
12
11
002 . 0 009 . 0
2
1
dx
y d
2
25 x
2
2

f (25) = -0.001833.

Numerical Integration

Integration is the inverse of differentiation. Just as differentiation uses differences to quantify an
instantaneous process, integration involves summing instantaneous information to give a total
result over an interval. Thus, if we are provided with velocity as a function of time, integration
can be used to determine the distance traveled:

According to the dictionary definition, to integrate means to bring together, as parts, into
a whole; to unite; to indicate the total amount Mathematically, definite integration is
represented by
(1)
which stands for the integral of the function f (x) with respect to the independent variable x,
evaluated between the limits x = a to x = b. As suggested by the dictionary definition, the
meaning of Eq. (1) is the total value, or summation, of f (x)dx over the range x = a to b. In fact,
the symbol is actually a stylized capital S that is intended to signify the close connection
between integration and summation.

Geometrically, integration is just finding the area under a curve from one point to another. It is
represented by
b
a
dx x f ) ( , where the numbers a and b are the lower and upper limits of
integration, respectively, the function f is the integrand of the integral, and x is the variable of
integration. Figure 1 represents a graphical demonstration of the concept.

II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 17

Why are we interested in integration: because most equations in physics are differential
equations that must be integrated to find the solution(s). Furthermore, some physical quantities
can be obtained by integration (example: displacement from velocity).
The problem is that sometimes integrating analytically some functions can easily become
laborious. For this reason, a wide variety of numerical methods have been developed to find the
integral.
The process of evaluating a definite integral from a set of tabulated values of the integrand f(x) is
called numerical integration. This process when applied to a function of single variable, is known
as quadrature.
Let dx y(x) I
b
a
, where y(x) takes the values y
0
, y
1
, y
2
, , y
n
for x = x
0
, x
1
, x
2
, , x
n
. Let
us divide the interval (a, b) into n sub- intervals of width h so that x
0
= a, x
1
= x
0
+ h, x
2
= x
0
+ 2h,
, x
n
= x
0
+ nh = b.
Trapezoidal rule : ) y ... y 2(y ) y (y
2
h
y(x)dx
1 - n 2 1 n 0
x
x
n
0
.
Simpsons 1/3
rd
rule :
) y ... y 2(y ) y ... y 4(y ) y (y
3
h
y(x)dx
2 - n 4 2 1 - n 3 1 n 0
x
x
n
0

Simpsons 3/8
th
rule :
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 18

) y ... y 2(y ) y y ... y y y 3(y ) y (y
8
3h
y(x)dx
3 - n 6 3 2 - n 1 - n 5 4 2 1 n 0
x
x
n
0

Problem#1. Compute the integral
6
0
2
1 x
dx
, using (i) Trapezoidal rule (ii) Simpsons 1/3
rd
rule
(iii) Simpsons 3/8
t h
rule and also determine the relative true error.
Sol. Let
2
x 1
1
y(x) and divide the interval (0, 6) into n = 6 subintervals each of length h = 1.
Then, we have the following tabular values.
x 0 1 2 3 4 5 6
y(x) 1 0.5 0.2 0.1 0.0588 0.0385 0.027
(i) Trapezoidal rule
) y ... y 2(y ) y (y
2
h
y(x)dx
1 - n 2 1 n 0
x
x
n
0
.

1.4108.
0.0385) 0.0588 0.1 0.2 2(0.5 ) 027 . 0 (1
2
1

) y y y y 2(y ) y (y
2
h
y(x)dx
5 4 3 2 1 6 0
6
0

(ii) Simpsons 1/3
rd
rule
) y ... y 2(y ) y ... y 4(y ) y (y
3
h
y(x)dx
2 - n 4 2 1 - n 3 1 n 0
x
x
n
0


1.3662.
0.0588) 2(0.2 0.0385) 0.1 4(0.5 0.027) (1
3
1

) y 2(y ) y y 4(y ) y (y
3
h
y(x)dx
4 2 5 3 1 6 0
6
0

(iii) Simpsons 3/8
t h
rule
) y ... y 2(y ) y y ... y y y 3(y ) y (y
8
3h
y(x)dx
3 - n 6 3 2 - n 1 - n 5 4 2 1 n 0
x
x
n
0


. 3571 . 1 2(0.1) ) 0.0385 0.0588 0.2 3(0.5 0.027) (0
8
3

) 2(y ) y y y 3(y ) y (y
8
3h
y(x)dx
3 5 4 2 1 6 0
6
0

II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 19

% 100
value True
value e Approximat - value True
error true relative The .
True value :
. 4056 . 1 0 4056 . 1 ) 0 ( tan ) 6 ( tan ) ( tan
1
1 1
6
0
1
6
0
2
x
x
dx

Relative true error for (i) Trapezoidal rule = %. 3699 . 0 % 100
1.4056
1.4108 - 1.4056

(ii) Simpsons 1/3
rd
rule = %. 803 . 2 % 100
1.4056
1.3662 - 1.4056

(iii) Simpsons 3/8
t h
rule = %. 4504 . 3 % 100
1.4056
1.3571 - 1.4056


Problems
1. Estimate the missing values in the following table
x 45 50 55 60 65
y 3.0 ? 2.0 ? -2.4
2. Express y=2x
3
-3x
2
+3x-10 in factorial notation and hence show that
3
y=12.
3. Given Sin45
0
= 0.7071, Sin50
0
= 0.7660, Sin55
0
= 0.8192, Sin 60
0
= 0.8660, find Sin52
0
, using
Newtons forward formula.
4. From the following table, estimate the number of students who obtained marks between 40
and45
Marks 30-40 40-50 50-60 60-70 70-80
No. of
students
31 42 51 35 31
5. Construct a cubic polynomial which takes the following values:
x 0 1 2 3
f(x) 1 2 1 10
6. The area of a circle of diameter d is given for the following values:
d 80 85 90 95 100
A 5026 5674 6362 7088 7854
Calculate the area of a circle of diameter 105.
7. Given the values
x: 5 7 11 13 17
f(x): 150 392 1452 2366 5202
Evaluate f(9) by using (a) Lagranges formula (b) Newtons divided difference formula.
8. Use Lagranges formula to find the form of f(x) when,
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 20

x: 0 2 3 6
f(x): 648 704 729 792
9. Determine f(x) as a polynomial in x for the following data using Newtons divided difference
formula
x: -4 -1 0 2 5
f(x): 1245 33 5 9 1335
10. Apply Lagranges formula inversely to obtain a root of the equation f(x) = 0 f(30)= -30, f(34)
= -13,f(38) = 3 and f(42)= 18.
15. Given that
x 1.0 1.1 1.2 1.3 1.4 1.5 1.6
y 7.989 8.403 8.781 9.129 9.451 9.750 10.031
find the values of dy/dx and d
2
y/dx
2
at x = 1.1and at x 1.6.
16. Find the first and second derivatives of the function tabulated below, at the point x = 1.1
x: 1.0 1.2 1.4 1.6 1.8 2.0
f(x): 0 0.128 0.544 1.296 2.432 4.00

17. From the following table, find the values of dy/dx and d
2
y/dx
2
at x = 2.03

x: 1.96 1.98 2.00 2.02 2.04
y: 0.7825 0.7739 0.7651 0.7563 0.7473
18. The following data gives the corresponding values of pressure and specific volume of a
superheated steam.
v 2 4 6 8 10
p 105 42.7 25.3 16.7 13

19. From the table below, for each value of x, y is minimum? Also find the value of y

x 3 4 5 6 7 8
y 0.205 0.240 0.259 0.262 0.250 0.224

20. Given that ,
x: 4.0 4.2 4.4 4.6 4.8 5.0 5.2
logx: 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6484
Evaluate by (a) Trapezoidal rule(b) Simpsons 1/3 rule (c) Simpsons
3/8
t h
rule.
21. Use Simpsons 1/3
rd
rule to find dx by taking seven ordinates.
22. The velocity (km/min) of a moped which starts from rest, is given at fixed intervals of time t
(min) as follows:
T 2 4 6 8 10 12 14 16 18 20
V 10 18 25 29 32 20 11 5 2 0
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 21

Estimate approximately the distance covered in 20 minutes.
23. A river is 80 feet wide. The depth d in feet at a distance x feet from one bank is given by the
following table:
x 0 10 20 30 40 50 60 70 80
d 0 4 7 9 12 15 14 8 3
Find approximately the area of the cross-section.
24. A solid of revolution is formed by rotating about the X-axis, the area between the X-axis, the
lines x=0 and x=1 and a curve through the points with the following coordinate:
x 0.00 0.25 0.50 0.75 1.00
y 1.0000 0.9896 0.9589 0.9089 0.8415

Short Answer Questions
1. Evaluate
2
(ab
x
), interval of differences being unity.
2. Show that log f(x)= log{1+f(x)/f(x)}
3. Evaluate
10
[(1-x) (1-2x
2
) (1-3x
3
) (1-4x
4
)], if the interval of differencing is 2.
4. Prove that y
3
= y
2
+ y
1
+
2
y
0
+
3
y
0
.
5. Prove with usual notations that (E
1/2
+ E
-1/2
) (1 + )

= 2 + .
6. Prove with usual notations that
3
y
2
=
3
y
5
.
7. State Newtons forward interpolative formula.
8. Write the relation between and E.
9. Write the relation between , E and
10. Prove with usual notations that (1+)(1-
) = 1

11. State Lagranges Interpolation formula
12. State Newtons divided difference formula
18. By Trapezoidal rule, write the value of dx
19. State Simpsons 3/8 th rule.
20. If f(x) is given by x = 0 0.5 1 1.5 2
f(x) = 0 0.25 1 2.25 4.
Then the value of dx by Simpsons 1/3 rule.

Você também pode gostar