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

7

Uploaded by

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

7

Uploaded by

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

98 NUMERICAL ANALYSIS

⇒ 501 − 5 × 461 + 10 y3 − 10 × 421 + 5 × 391 − 363 = 0

⇒ 10 y3 − 4452 = 0

⇒ y3 = 445.2
The population of the district in 1911 is 445.2 lakh.
Example 4.3 Interpolate the missing entries
x 0 1 2 3 4 5
y = f(x) 0 – 8 15 – 35

Solution Given y0 = 0, y1 = ?, y2 = 8, y3 = 15, y4 = ?, y5 = 35. Three values are known. Let us assume that
y = f(x) is a polynomial of degree 3.

Δ4 y0 = 0 ⇒ b E − 1g 4
y0 = 0

dE 4
i
− 4 E 3 + 6 E 2 − 4 E + 1 y0 = 0

∴ y4 − 4 y3 + 6 y2 − 4 y1 + y0 = 0

∴ y4 − 4 × 15 + 6 × 8 − 4 y1 − 0 = 0

∴ y4 − 4 y1 = 12 (1)

and Δ5 y0 = 0 ⇒ b E − 1g y
5
0 =0

⇒ dE 5
− 5E 4 + 10 E 3 − 10 E 2 + 5E − 1 y0 = 0 i
⇒ y5 − 5 y4 + 10 y3 − 10 y2 + 5 y1 − y0 = 0

⇒ 35 − 5 y4 + 10 × 15 − 10 × 8 + 5 y1 − 0 = 0

⇒ y4 − y1 = 21 (2)
Solving (1) and (2), we get
y1 = 3, y4 = 24 .

4.4 NEWTON’S FORWARD INTERPOLATION FORMULA


Let y = f(x) be a function which takes the values y0, y1, y2, …, yn corresponding to the (n + 1) values
x0, x1, x2, …, xn of the independent variable x. Let the values x be equally spaced, i.e.,
xr = x0 + rh, r = 0, 1, 2, ..., h
where h is the interval of differencing. Let φ( x ) be a polynomial of the nth degree in x taking the
same values as y corresponding to x = x0, x1, …, xn, then, φ( x ) represents the continuous function
y = f(x) such that f(xr) = φ(xr) for r = 0, 1, 2, …, n and at all other points f ( x ) = φ( x ) + R ( x ) where
R(x) is called the error term (Remainder term) of the interpolation formula. Ignoring the error term
let us assume
bg bg b g b gb g
f x ≈ φ x ≈ a0 + a1 x − x0 + a2 x − x0 x − x1 + ... + an x − xo x − x1 ... x − xn − 1 b gb g d i
(3)
the constants a0, a1, a2, …, an can be determine as follows.
INTERPOLATION WITH EQUAL INTERVALS 99

Putting x = x0 in (3) we get


b g b g
f x0 ≈ φ x0 = a 0

⇒ y0 = a 0
putting x = x1 in (3) we get
b g b g b g
f x1 ≈ φ x1 = a0 + a1 x1 − x0 = y0 + a1h

∴ y1 = y0 + a1h

y1 − y0 Δy 0
⇒ a1 = = .
h h
Putting x = x2 in (3) we get
b g b g b g b
f x2 ≈ φ x2 = a0 + a1 x2 − x0 a2 x2 − x0 x2 − x1 gb g
∴ y2 = y 0 +
Δy0
h
b2hg + a b2hgbhg 2

⇒ y2 = y 0 + 2 b y − y g + a d 2h i
1 0 2
2

y2 − 2 y1 + y0 Δ2 y0
⇒ a2 = =
2h 2 2! h 2
Similarly by putting x = x3, x = x4 ..., x = xn in (3) we get

Δ3 y0 Δ4 y0 Δn y0
a3 = , a 4 = , ..., a n =
3! h 3 4! h 4 n! h n
putting the values of a0, a1, …, an in (3) we get

bg bg
f x ≈ φ x = y0 +
Δy0
h
b
x − x0 +
Δ2 y0
2! h 2
g
x − x0 x − x1 + b gb g
Δ3 y0
3! h 3
b gb
x − x0 x − x1 x − x2 + ... + gb g
Δn y0
n! h n
b gb
x − x0 x − x1 x − xn − 1 gd i (4)

x − x0
Writing u = , we get x − x0 = uh
h

x − x1 = x − x0 + x0 − x1

b g b
= x − x0 − x1 − x0 g b
= uh − h = u − 1 h g
100 NUMERICAL ANALYSIS

Similarly b g
x − x2 = u − 2 h

x − x3 = bu − 3g h
L
b
x − xn −1 = u − n + 1 h g
Equation (4) can be written as

bg
φ x = y0 + u
b
Δy0 u u − 1 2
+
g
Δ y0 + ... +
b
u u − 1 ... u − n + 1 ng b
Δ yo .
g
1! 2! n!
The above formula is called Newton’s forward interpolation formula.
Note:
1. Newton forward interpolation formula is used to interpolate the values of y near the beginning of a set of
tabular values.
2. y0 may be taken as any point of the table, but the formula contains only those values of y which come
after the value chosen as y0.
Example 4.4 Given that

12500 = 111.8034, 12510 = 111.8481

12520 = 111.8928, 12530 = 111.9375

find the value of 12516 .


Solution The difference table is

x y= x Δy Δ2 y
12500 x0 111.8034 y0
0.0447 Δy0
12510 111.8481 0 Δ2 y0
0.0447
12520 111.8928 0
0.0447
12530 111.9375

We have x0 = 12500, h = 10 and x = 12516

x − x0 12516 − 12510
u= = = 1.6
h 10
from Newton’s forward interpolation formula

u bu − 1g
bg
f x = y0 + u Δy0 +
2!
Δ y + ...
2
0

⇒ f b12516g = 1118034
. + 16
. × 0.0447 + 0 + ...
INTERPOLATION WITH EQUAL INTERVALS 101

= 1118034
. + 0.07152 = 11187492
.

∴ 12516 = 11187492
. .
Example 4.5 Evaluate y = e2x for x = 0.05 using the following table
x 0.00 0.10 0.20 0.30 0.40
y = e2x 1.000 1.2214 1.4918 1.8221 2.255

Solution The difference table is

x y = e2 x Δy Δ2 y Δ3 y Δ4 y
0.000 1.0000
0.2214
0.10 1.2214 0.0490
0.2704 0.0109
0.20 1.4918 0.0599 0.0023
0.3303 0.0132
0.30 1.8221 0.0731
0.4034
0.40 2.2255

We have x0 = 0.00, x = 0.05, h = 0.1.

x − x0 0.05 − 0.00
∴ u= = = 0.5
h 0.1
Using Newton’s forward formula

bg
f x = y0 + u Δy0 +
b
u u −1 gΔ y
2
0 +
b
u u−1 u−2 gb gΔ y 3
0 +
b gb
u u−1 u−2 u−3 gb gΔ y
4
0 + ...
2! 3! 4!

b g
f 0.05 = 10000
. + 0.5 × 0.2214 +
b
0.5 0.5 − 1 g b0.0490g + 0.5b0.5 − 1gb0.5 − 2g b0.0109g +
2 6

b gb
0.5 0.5 − 1 0.5 − 2 0.5 − 3 gb g b0.0023g
24
= 1000
. + 01107
. − 0.006125 + 0.000681 − 0.000090 = 1105166
.

b g
∴ f 0.05 ≈ 1052
. .
Example 4.6 The values of sin x are given below for different values of x. Find the value of sin 32°
x 30° 35° 40° 45° 50°
y = sin x 0.5000 0.5736 0.6428 0.7071 0.7660

Solution x = 32° is very near to the starting value xo = 30°. We compute sin 32° by using Newton’s forward
interpolation formula.
102 NUMERICAL ANALYSIS

The difference table is

x y = sin x Δy Δ2 y Δ3 y Δ4 y

30° 0.5000
0.0736
35° 0.5736 –0.0044
0.0692 –0.005
40° 0.6428 –0.0049 0
0.0643 –0.005
45° 0.7071 –0.0054
0.0589
50° 0.7660

x − x0 32° − 30°
u= = = 0.4 .
h 5

We have y0 = 0.5000, Δy0 = 0.0736, Δ2 y0 = − 0.0044, Δ3 y0 = − 0.005


putting these values in Newton’s forward interpolation formula we get

bg
f x = y0 + uΔy0 +
b
u u−1 gΔ y
2
0 +
b
u u−1 u−2 gb gΔ y 3
0 + ...
2! 3!

⇒ f(32°) = 0.5000 + 0. 4 × 0. 0736 +


b0.4g b0.4 − 1g b−0.0044g + b0.4gb0.4 − 1gb0.4 − 2g b− 0.0005g
2 6
f(32°) = 0.5000 + 0.02944 + 0.000528 – 0.00032 = 0.529936 = 0.299.
Example 4.7 In an examination the number of candidates who obtained marks between certain limits were as follows:
Marks 30–40 40–50 50–60 60–70 70–80
No. of Students 31 42 51 35 31

Find the number of candidates whose scores lie between 45 and 50.
Solution Fist of all we construct a cumulative frequency table for the given data.
Upper limits of the class intervals 40 50 60 70 80
Cumulative frequency 31 73 124 159 190

The difference table is

x y Δy Δ2 y Δ3 y Δ4 y
marks cumulative
frequencies

40 31
42
50 73 9
51 –25
INTERPOLATION WITH EQUAL INTERVALS 103

60 124 –16 37
35 12
70 159 –4
31
80 190

we have x 0 = 40, x = 45, h = 10


x − x0 45 − 40
u= = = 0.5
h 10
and y0 = 73, Δy0 = 42, Δ2 y0 = 9, Δ3 y0 = − 25, Δ4 y0 = 37.
From Newton’s forward interpolation formula

bg
f x = y0 + u Δy0 +
b
u u−1 gΔ y 2
0 +
b gb
u u−1 u −2 gΔ y 3
0 +
b gb
u u−1 u−2 u−3 gb gΔ y
2
0 + ...
2! 3! 4!

b g b gb g b0.5gb2−0.5g × 9 + b0.5gb0.5 −61gb0.5 − 2g b−25g +


∴ f 45 = 31 + 0.5 42 +

b0.5gb0.5 − 1gb0.5 − 2gb0.5 − 3g × b37g


24
= 31 + 21 − 1125
. − 15625
. − 14452
. = 47.8673

b
= 48 approximately g
∴ The number of students who obtained marks less than 45 = 48, and the number of students who scored marks
between 45 and 50 = 73 – 48 = 25.
Example 4.8 A second degree polynomial passes through the points (1, –1), (2, –1), (3, 1), (4, 5). Find the
polynomial.
Solution We construct difference table with the given values of x and y

x y Δy Δ2 y Δ3 y

1 –1
0
2 –1 2
2 0
3 1 2
4
4 5

We have x0 = 1, h = 1, y0 = − 1, Δy0 = 0, Δ2 y0 = 2,

u=
x − x0
h
b
= x −1. g
104 NUMERICAL ANALYSIS

From Newton’s forward interpolation we get

bg
y = f x = y0 + u Δy0 +
b
u u −1 gΔ y
2
0 + ...
2!

bg b g
⇒ f x = −1 + x − 1 ⋅ 0 +
b x − 1gb x − 1 − 1g ⋅ 2
2

∴ f b x g = x − 3x + 1.
2

Note: There may be polynomials of higher degree which also fit the data, but Newton’s formula gives us the
polynomial of least degree which fits the data.

4.5 NEWTON–GREGORY BACKWARD INTERPOLATION FORMULA


Newton’s forward interpolation formula cannot be used for interpolating a value of y near the end
of a table of values. For this purpose, we use another formula known as Newton–Gregory backward
interpolation formula. It can be derived as follows.
Let y = f(x) be a function which takes the values y0, y1, y2, …, yn corresponding to the values
x0, x1, x2, …, xn of the independent variable x. Let the values of x be equally spaced with h as the
interval of differencing, i.e.,
Let xr = x0 + rh, r = 0, 1, 2, …, n
bg
Let φ x be a polynomial of the nth degree in x taking the same values as y corresponding to
bg b g b g
x = x0, x1, …, xn, i.e., φ x represents y = f(x) such that f xr = φ xr , r = 0, 1, 2, ..., we may
bg
write φ x as

bg bg b g b gd
f x ≈ φ x = a0 + a1 x − xn + a2 x − xn x − xn − 1 + i
... + a b x − x g d x − x i ... b x − x g
n n n −1 1
(5)

Putting x = xn is (5) we get

b g b g
f xn ≈ φ xn = a0 .

⇒ yn = a 0 .
Putting x = xn – 1 in (5) we get

d i d i d
f xn − 1 ≈ φ xn − 1 = a0 + a1 xn − 1 − xn i
⇒ y n − 1 = y n + a1 − h b g
⇒ a1 h = yn − yn −1 = Δyn

∇yn
⇒ a1 =
1! h
Putting x = xn – 2, we get
INTERPOLATION WITH EQUAL INTERVALS 105

d i d i d i d
f xn − 2 ≈ φ xn − 2 = a0 + a1 xn − 2 − xn + a2 xn − 2 − xn xn − 2 − xn − 1 id i
Fy
= y +G
− yn − 1 I b− 2hg + a b− 2hgb− hg
⇒ y n−2
H n
n

h
JK 2

⇒ y n − 2 = yn − 2 yn + 2 yn − 1 + d 2h i a
2
2

yn − 2 yn − 1 + y n − 2 ∇ 2 yn
⇒ a2 = 2
=
2h 2! h 2

similarly putting x = xn − 3 , x = xn − 4 , ..., x = xn − 5 , ... we get

∇ 3 yn ∇ 4 ∇y n ∇ n yn
a3 = 3
, a4 = 3
, ..., an =
3! h 4! h n! h n
substituting these values in (5)

bg bg
f x ≈ φ n = yn =
∇yn
h
b
x − xn +
∇ 2 yn
2! h 2
g
x − x n x − xn − 1 + b gd i
∇ 3 yn
3! h 3
x − b
x n x − x ngd
− 1 x − x n − 2 + ... id
+
∇ n yn
n!h n
i
x − xn x − xn − 1 ... x − x1 b gd i b g
(6)
x − xn
writing u = we get x − xn = uh
h

b g b g
∴ x − xn − 1 = x − xn + xn − xn − 1 = uh + h = u + 1 h

⇒ x − xn − 2 = b u + 2g h, ..., b x − x g = b u + x − 1g h
1

∴ The equation (6) may be written as

bg bg
f x ≈ φ x = yn +
u ∇yn u u + 1 2
+ ∇ yn +
b
u u+1 u+2 3 g
∇ yn +
b gb g
b gb g b g
1! 2! 2!
u u + 1 u + 2 ... u + n − 1 n
... + ∇ yn .
n!
The above formula is known as Newton’s backward interpolation formula.
Example 4.9 The following data gives the melting point of an alloy of lead and zinc, where t is the temperature in
degrees c and P is the percentage of lead in the alloy.
P 40 50 60 70 80 90
t 180 204 226 250 276 304

Find the melting point of the alloy containing 84 per cent lead.
Solution The value of 84 is near the end of the table, therefore we use the Newton’s backward interpolation formula.
The difference table is
106 NUMERICAL ANALYSIS

P t ∇ ∇2 ∇3 ∇4 ∇5
40 184
20
50 204 2
22 0
60 226 2 0
24 0 0
70 250 2 0
26 0
80 276 2
28
90 304

We have xn = 90, x = 84, h = 10, t n = yn = 304, ∇t n = ∇yn = 28, ∇ yn = 2, and


2

fh = fh

∇ yn = ∇ 4 yn = ∇5 yn = 0,
3

x − xn 84 − 90
u = = = − 0. 6.
h 10
From Newton’s backward formula

b g
f 84 = t n + u ∇t n +
b
u u +1 g∇ t
2
n + ...
2

b g
f 84 = 304 − 0.6 × 28 +
b− 0.6gb− 0.6 + 1g 2
2
= 304 − 16.8 − 0.24 = 286.96 .

b g
Example 4.10 Calculate the value of f 7.5 for the table

x 1 2 3 4 5 6 7 8
f(x) 1 8 27 64 125 216 343 512

Solution 7.5 is near to the end of the table, we use Newton’s backward formula to find f(7.5).

x y ∇y ∇2 y ∇3 y ∇4 y ∇5 y

1 1
7
2 8 12
19 6
3 27 18 0
37 6 0
4 64 24 0
(Contd.)
INTERPOLATION WITH EQUAL INTERVALS 107

61 6 0
5 125 30 0
91 6 0
6 216 36 0
127 6
7 343 42
169
8 512

We have xn = 8, x = 7.5, h = 1, yn = 512, ∇yn = 169, ∇ 2 yn = 42, ∇ 3 yn = 6,

x − xn 7.5 − 8
∇ 4 yn = ∇5 yn = ... = 0 u= = = − 0.5.
h 1
∴ we get

bg
f x = yn + u ∇yn +
b
uu+1 g∇ y 2
n +
b gb
u u+1 u+2 g∇ y3
n + ...
2! 3!

b g b gb g b−0.5gb−20.5 + 1g b42g + b−0.5gb−0.5 +61gb−0.5 + 2g b6g


f 7.5 = 512 + −0.5 165 +

= 512 − 84.5 − 5.25 − 0.375


= 42187
. .

4.6 ERROR IN THE INTERPOLATION FORMULA


Let the function f(x) be continuous and possess continuous derivatives of all orders with in the
interval [x0, xn] and let f(x) denote the interpolating polynomial. Define the auxiliary function F(t) as
given below

b g b g b g m b g b gr bbxt −− xx gbgbxt −− xx gg ...... bbtx−− xx gg


F t = f t −φt − f x −φx
0
0 1

1
n

The function F(t) is continuous in [x0, xn]. F(t) possesses continuous derivatives of all orders
in [x0, xn] and variables for the values t = x, x0, …, xn. Therefore F(t) satisfies all the conditions
of Rolle’s Theorem in each of the subintervals (x0, x1), (x1, x2) … (xn – 1, xn). Hence FI(t) vanishes
at least once in each of the subintervals. Therefore f ′( t ) vanishes at least (n + 1) times in (x0, xn),
f ′′(t ) vanishes at least n times in the interval (x0, xn), …, Fn + 1(t) vanishes at least once in (x0,
xn) say at ξ, where x0 < ξ1 < xn.
The expression (t – x0) (t – x1) … (t – xn) is a polynomial of degree (n + 1) in t and the
coefficient of t = 1.
∴ The (n + 1) the derivative of polynomial is (n + 1)!

bξg − m f b xg − φb xgr b x − x gb xb − x gg ... b x − x g = 0


n+1!
bg
∴ F n +1 ξ = f n +1
0 1 n
108 NUMERICAL ANALYSIS

b g b g fbn + 1bgξ!g b x − x gb x − x g ... b x − x g


n +1
⇒ f x −φx = 0 1 n

If Rb xg denotes the error in the formula then Rb x g = f b x g − φb x g

∴ Rb x g =
bξ g
bn + 1g! b x − x gb x − x g ... b x − x g
n +1
f
0 1 n

But x – x0 = uh ⇒ x – x1 = (u – 1)h, … (x – xh) = (u – n)h where h is the interval of


differencing therefore we can write

bg h n +1 f n +1
bξg ubu − 1gbu − 2g ... bu − ng .
Error R x =
bn + 1g!
1
Using the relation D = Δ
h

1
we get D n +1 ≈ n +1
Δn + 1
h

bξg ≈ Δ n +f b1x g
n +1
n +1
⇒ f
0

The error in the forward interpolation formula is

b g bΔn + y1g! ubu − 1gbu − 2g ... bu − ng


n +1
R x = 0

Similarly by taking the auxiliary function F(t) in the form

bt − x g dt − x i ... bt − x g
b g b g b g m b g b gr b x − x g d x − x i ... b x − x g ,
n n −1 0
F t = f t −φt − f x −φ x
n n −1 0

and proceeding as above we get the error in the Newton backward interpolation formula as

b g b∇n + 1yg! u bu + 1g ... bu + ng


n +1
R x = n
where uh = x − xn .

Example 4.11 Use Newton’s forward interpolation formula and find the value of sin 52° from the following data.
Estimate the error.
x 45° 50° 55° 60°
y = sin x 0.7071 0.7660 0.8192 0.8660
INTERPOLATION WITH EQUAL INTERVALS 109

Solution The difference table is

x y = sin x Δy Δ2 y Δ3 y

45° 0.7071
0.0589
50° 0.7660 –0.0057
0.0532 –0.0007
55° 0.8192 –0.0064
0.0468
60° 0.8660

∴ We have x0 = 45° , x1 = 52° , y0 = 0.7071, Δy0 = 0.0589, Δ2 y0 = − 0.0057 and Δ3 y0 = − 0.0007 ,

x − x 0 52° − 45°
u= = = 1.4 .
h 5°
From Newton’s formula

y = u0 + u Δy0 +
b
u u−1 gΔy 2
0 +
b
u u−1 u−2 gb gΔy 3
0 + ...
2! 3!

b g
∴ f 52 = 0.7071 + 14
. × 0.0589 +
b14. gb14. − 1g × b−0.0057g + b14. gb14. − 1gb14. − 2g b−0.0007g
2 6
= 0.7071 + 0.8246 − 0.001596 + 0.0000392 = 0.7880032

∴ sin 52° = 0.7880032

b gb
u u − 1 u − 2 ... u − ng b gΔ n +1
Error =
bn + 1g y0

taking n = 2 we get

Error =
b
u u−1 u −2 gb gΔy 3
0 =
b14. gb14. − 1gb14. − 2g b−0.0007g = 0.0000392 .
3! 6

Exercise 4.1

1. Find the missing figures in the following table


x 0 5 10 15 20 25
y 7 11 – 18 – 32

2. Estimate the production of cotton in the year 1985 from the data given below
Year (x) 1981 1982 1983 1984 1985 1986 1987
Production (y) 17.1 13.0 14.0 9.6 – 12.4 18.2

You might also like