• No results found

Dr. Anita Pal Assistant Professor

N/A
N/A
Protected

Academic year: 2022

Share "Dr. Anita Pal Assistant Professor"

Copied!
26
0
0

Loading.... (view fulltext now)

Full text

(1)

by

Dr. Anita Pal Assistant Professor

Department of Mathematics

National Institute of Technology Durgapur Durgapur-713209

email: anita.buie@gmail.com

(2)

Chapter 2 Interpolation

Module No. 2

Newton’s Interpolation Methods

(3)

In Lagrange’s interpolation lots of arithmetic calculations are involved. But, this method is applicable for both equal and unequal spaced points. In this module, we discussed about new kind of interpolation methods based on finite differences known as Newton’s interpolations. In these methods, we assumed that the values of x’s are equispaced.

2.1 Newton’s forward difference interpolation formula

Suppose the explicit form of the functiony=f(x) is unknown, but the values ofy at some equispaced points x0, x1, . . . , xn are known. Letyi be the value of f(x) atx=xi and it is known for alli= 0,1,2, . . . , n. If the function is given, then one can calculate such values.

Since the values of x’s are equispaced, thereforexi=x0+ih, i= 0,1, . . . , n, whereh is called the spacing. Thus, we have a set ofn+ 1 points (xi, yi), i= 0,1,2, . . . , n.

Now, the problem is to construct a polynomial, say,φ(x) of degree less than or equal tonwhich passes through the points

yi=φ(xi), i= 0,1, . . . , n. (2.1) Let the polynomialφ(x) be the following form

φ(x) =a0+a1(x−x0) +a2(x−x0)(x−x1) +a3(x−x0)(x−x1)(x−x2) +· · ·+an(x−x0)(x−x1)· · ·(x−xn−1), (2.2) where a0, a1, . . . , an are constants and their values are to be determined using (2.1).

Now, our problem is to find the values ofai’s. To find these values, substitutex=xi in (2.2) according to the order i= 0,1,2, . . . , n.

When x=x0, then φ(x0) =a0, i.e. a0 =y0. When x=x1, then φ(x1) =a0+a1(x1−x0)

i.e. y1 =y0+a1h. Thus, the value of a1 is a1 = y1−y0

h = ∆y0

h . When x=x2,φ(x2) =a0+a1(x2−x1) +a2(x2−x0)(x2−x1)

i.e. y2 =y0+y1−y0

h .2h+a2(2h)(h).

Therefore, a2= y2−2y1+y0

2!h2 = ∆2y0 2!h2 .

(4)

In this way, all ai’s can be determined. In general,an= ∆ny0 n!hn.

By substituting all the values ofai in (2.2), the polynomial φ(x) becomes φ(x) =y0+ (x−x0)∆y0

h + (x−x0)(x−x1)∆2y0

2!h2 +(x−x0)(x−x1)(x−x2)∆3y0

3!h3

+· · ·+ (x−x0)(x−x1)· · ·(x−xn−1)∆ny0

n!hn. (2.3)

This is the interpolating polynomial, but it can be simplified by using the equispaced condition and introducing a suitable variable discussed below.

Let the new variable u be defined as x = x0 +uh. Since xi = x0+ih, therefore, x−xi = (u−i)hfori= 0,1,2, . . . , n.

Using these values the equation (2.3) reduced to φ(x) =y0+ (uh)∆y0

h + (uh)(u−1)h∆2y0

2!h2 + (uh)(u−1)h(u−2)h∆3y0

3!h3 +· · ·+ (uh)(u−1)h(u−2)h· · ·(u−n−1)h∆ny0

n!hn

=y0+u∆y0+u(u−1)

2! ∆2y0+u(u−1)(u−2) 3! ∆3y0

+· · ·+ u(u−1)(u−2)· · ·(u−n−1)

n! ∆ny0. (2.4)

The value of uis obtained by u= x−x0

h for a given value ofx.

This is known as Newton or Newton-Gregory forward difference interpolating polynomial.

Obviously, this interpolation formula also contains some error, and the error is esti- mated in the following.

Error in Newton’s forward interpolation formula

In previous module, it is seen that the error in polynomial interpolation is E(x) = (x−x0)(x−x1)· · ·(x−xn)f(n+1)(ξ)

(n+ 1)!

=u(u−1)(u−2)· · ·(u−n)hn+1f(n+1)(ξ)

(n+ 1)! (using x=x0+uh)

(5)

where ξ is a value of x and it lies between min{x0, x1, . . . , xn, x} and max{x0, x1, . . . , xn, x}.

In terms of forward difference, the value of f(n+1)(ξ) is approximately equal to hn+1n+1y0.

Thus, the error in terms of forward difference is E(x)' u(u−1)(u−2)· · ·(u−n)

(n+ 1)! ∆n+1y0. Let us consider a particular case:

If 0< u <1 then

|u(u−1)|= (1−u)u=u−u2 = 1 4−

1 2 −u

2

≤ 1 4 and

|(u−2)(u−3)· · ·(u−n)| ≤ |(−2)(−3)· · ·(−n)|=n!.

Thus,

|E(x)| ≤ 1 4

n!

(n+ 1)!|∆n+1y0|= 1

4(n+ 1)|∆n+1y0|.

Again,|∆n+1y0| ≤9 in the last significant figure.

Hence,|E(x)| ≤ 9

4(n+ 1) <1 forn >2 and 0< u <1.

This is a very interesting result and indicates that the maximum error in Newton’s forward interpolation is 1, provided u=|(x−x0)/h|<1, i.e. |x−x0|< h.

Example 2.1 Given below is a table of values of the probability integral

y= 2 π

Z x

0

e−x2 dx.

Determine the value of y when the value of x is 0.456.

x : 0.45 0.46 0.47 0.48 0.49

y : 0.475482 0.484656 0.497452 0.502750 0.511668

Solution. Let us first construct the forward difference table as follows:

(6)

x y ∆y ∆2y ∆3y 0.45 0.475482

0.009174

0.46 0.484656 0.003622

0.012796 –0.011120

0.47 0.497452 –0.007498

0.005298 0.011118

0.48 0.502750 0.003620

0.008918 0.49 0.511668

For this problem, x0 = 0.45, x= 0.456, h= 0.01, u= x−x0

h = 0.456−0.45 0.01 = 0.6.

Now,

y(0.456) =y0+u∆y0+u(u−1)

2! ∆2y0+u(u−1)(u−2) 3! ∆3y0

= 0.475482 + 0.6×0.009174 + 0.6(0.6−1)

2 ×0.003622

+0.6(0.6−1)(0.6−2)

6 ×(−0.011120)

= 0.475482 + 0.0055044−0.0008693−0.0006227

= 0.4794944.

Hence, the value ofy when x= 0.456 is 0.479494.

Note 2.1 In general, Newton’s forward difference formula is used to compute the ap- proximate value of f(x) when the value of x is near tox0 of the given table. But, if the value of x is at the end of the table, then this formula gives more error. In this case, Newton’s backward formula is used, discussed below.

2.2 Newton’s backward difference interpolation formula

This is another form of Newton’s interpolation. Let the set of values (xi, yi), i = 0,1,2, . . . , n be given, where yi=f(xi) and xi =x0+ih,h is the spacing.

(7)

We have to construct a polynomial of degree less than or equal to n, which passes through the given points.

Letφ(x) be such a polynomial and it is consider as follows:

φ(x) =a0+a1(x−xn) +a2(x−xn)(x−xn−1) +a3(x−xn)(x−xn−1)(x−xn−2)

+· · ·+an(x−xn)(x−xn−1)· · ·(x−x1). (2.5) Here ai’s are constants and their values are to be determined using the conditions

yi =φ(xi), i= 0,1, . . . , n. (2.6) To find the values ofai’s, we substitute x=xn, nn−1, . . . , x1 in (2.5).

Forx=xn,

φ(xn) =a0, i.e. a0 =yn. For x=xn−1,

φ(xn−1) =a0+a1(xn−1−xn), i.e. yn−1=yn+a1(−h). This givesa1 = yn−yn−1

h = ∇yn

h . When x=xn−2,

φ(xn−2) =a0+a1(xn−2−xn) +a2(xn−2−xn)(xn−2−xn−1)

=yn+yn−yn−1

h (−2h) +a2(−2h)(−h)

That is, yn−2= 2yn−1−yn+a2.2!h2. Hence,a2 = yn−2yn−1+yn−2

2!h2 = ∇2yn

2!h2 . In this manner, all ai’s can be determined. In general,

ak = ∇kyn

k!hk .

Using these values,φ(x) becomes φ(x) =yn+ (x−xn)∇yn

h + (x−xn)(x−xn−1)∇2yn 2!h2 +(x−xn)(x−xn−1)(x−xn−2)∇3yn

3!h3 +· · · +(x−xn)(x−xn−1)(x−xn−2)· · ·(x−x1)∇nyn

n!hn. (2.7)

Since the values of xi’s are equispaced, further simplification is possible. Let v be a new variable defined byx=xn+vh. Note that v is unit less quantity.

(8)

Thus,xi=x0+ihandx=xn+vh. Therefore,x−xn−i= (xn+vh)−(x0+n−ih) = (xn−x0) + (v−n−i)h= (v+i)h, i= 0,1, . . . , n.

Using these results, (2.7) reduces to φ(x) =yn+vh∇yn

h +vh(v+ 1)h∇2yn

2!h2 +vh(v+ 1)h(v+ 2)h∇3yn 3!h3 +· · · +vh(v+ 1)h(v+ 2)h· · ·(v+n−1)h∇nyn

n!hn

=yn+v∇yn+v(v+ 1)

2! ∇2yn+v(v+ 1)(v+ 2)

3! ∇3yn+· · · +v(v+ 1)(v+ 2)· · ·(v+n−1)

n! ∇nyn. (2.8)

This is well known Newton’s backward or Newton-Gregory backward inter- polation formula.

Note 2.2 The Newton’s backward difference interpolation formula is used to compute the value of f(x) whenx is near to xn, i.e. whenx is at the end of the table.

Error in Newton’s backward interpolation formula

The error occur in backward difference interpolation formula is given by E(x) = (x−xn)(x−xn−1)· · ·(x−x1)(x−x0)f(n+1)(ξ)

(n+ 1)!

=v(v+ 1)(v+ 2)· · ·(v+n)hn+1f(n+1)(ξ)

(n+ 1)! , (2.9)

wherev= x−xn

h andξ lies between min{x0, x1, . . . , xn, x} and max{x0, x1, . . . , xn, x}.

Example 2.2 The following table of values of x and f(x) is given.

x : 0.25 0.30 0.35 0.40 0.45 0.50

f(x) : 2.6754 2.8765 2.9076 3.2876 3.3451 3.7139 Use Newton’s backward interpolation formula to determine the value of f(0.48).

Solution. The backward difference table is

(9)

x f(x) ∇f(x) ∇2f(x) ∇3f(x) ∇4f(x) 0.25 2.6754

0.30 2.8765 0.2011

0.35 2.9076 0.0311 –0.1700

0.40 3.2876 0.3800 0.3489 0.5189

0.45 3.3451 0.0575 –0.3225 –0.6714 –1.1903 0.50 3.7139 0.3688 0.3113 0.6338 1.3052 In this problem, xn= 0.50, x= 0.48, h= 0.05, v= x−xn

h = 0.48−0.50

0.05 =−0.4.

Then,

f(0.48) =f(xn) +v∇f(xn)+v(v+ 1)

2! ∇2f(xn)+v(v+ 1)(v+ 2)

3! ∇3f(xn) +v(v+ 1)(v+ 2)(v+ 3)

4! ∇4f(xn)+· · ·

= 3.7139−0.4×0.3688 + −0.4(−0.4 + 1)

2 ×0.3113

+−0.4(−0.4 + 1)(−0.4 + 2)

6 ×0.6338

+−0.4(−0.4 + 1)(−0.4 + 2)(−0.4 + 3)

24 ×1.3052

= 3.7139−0.14752−0.037356−0.040563−0.054296

= 3.43416'3.4342.

Thus,f(0.48) = 3.4342.

Example 2.3 The following table gives the value of x and y.

x : 2 3 4 5 6

f(x) : 5 8 12 20 37

Calculate the value of y at x = 5.5 by considering third degree Newton’s backward in- terpolation polynomial. Again, find the same value by considering the fourth degree polynomial.

Solution. To find a third degree polynomial, we consider last four data and the corre- sponding backward difference table is

(10)

x y ∇y ∇2y ∇3y

3 8

4 12 4

5 20 8 4

6 37 17 9 5

In this problem, xn= 6, x= 5.5, h= 1, v= x−xn

h = 5.5−6

1 =−0.5.

y(5.5) =yn+v∇yn+v(v+ 1)

2! ∇2yn+v(v+ 1)(v+ 2) 3! ∇3yn

= 37−0.5×17 +−0.5(−0.5 + 1)

2 ×9

+−0.5(−0.5 + 1)(−0.5 + 2)

6 ×5

= 37−8.5−1.125−0.3125

= 27.0625.

Now, we consider fourth degree polynomial to calculatey(5.5). The difference table is shown below. The additional calculations are marked by red colour.

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

3 8 3

4 12 4 1

5 20 8 4 3

6 37 17 9 5 2

The value of y(5.5) can be determined by the following formula. Note that there is only one term we have to calculate, other terms are already determined in previous step.

f(0.48) =yn+v∇yn+v(v+ 1)

2! ∇2yn+v(v+ 1)(v+ 2)

3! ∇3yn+v(v+ 1)(v+ 2)(v+ 3) 4! ∇4yn. The value of the last term is

v(v+ 1)(v+ 2)(v+ 3)

4! ∇4yn

= −0.5(−0.5 + 1)(−0.5 + 2)(−0.5 + 3)

4! ×2 =−0.078125.

Thus, the value ofy(5.5) is 27.0625−0.078125 = 26.984375.

(11)

Example 2.4 The upward velocity of a rocket is given below:

t(sec) : 0 10 15 20 25 30

v(t) (m/sec) : 0 126.75 350.50 510.80 650.40 920.25

Determine the value of the velocity att= 26sec using Newton’s backward and forward formulae and compare the results.

Solution. The velocity at t = 0 is zero, and hence it does not give any information.

Therefore, we discard this data.

Using Newton’s backward formula The backward difference table is

t v(t) ∇v ∇2v ∇3v ∇4v

10 126.75

15 350.50 223.75

20 510.80 160.30 –63.45

25 650.40 139.60 –20.70 42.45

30 920.25 269.85 130.25 150.95 108.50 Here,tn= 30, t= 26, h= 5, v= t−tn

h = 26−30

5 =−0.8.

By Newton’s backward formula

v(26) =yn+v∇yn+v(v+ 1)

2! ∇2yn+v(v+ 1)(v+ 2) 3! ∇3yn +v(v+ 1)(v+ 2)(v+ 3)

4! ∇4yn

= 920.25−0.8×269.85 +−0.8(−0.8 + 1)

2 ×(130.25)

+−0.8(−0.8 + 1)(−0.8 + 2)

6 ×150.95

+−0.8(−0.8 + 1)(−0.8 + 2)(−0.8 + 3)

24 ×108.50

= 687.21.

Thus the velocity of the rocket att= 16 sec is 687.21 m/s.

By Newton’s forward formula

Since the Newton’s forward interpolation formula is used when the given value is at the beginning of the table. For this purpose the table is written in reverse order as

(12)

t(sec) : 30 25 20 15 10 0 v(t) (m/s) : 920.25 640.40 510.80 350.50 126.75 0 Here also we discard the last data as it has no importance.

The forward difference table is

t v(t) ∇v ∇2v ∇3v ∇4v

30 920.25

–269.85

25 650.40 130.25

–139.60 –150.95

20 510.80 –20.70 108.50

–160.30 –42.45

15 350.50 –63.45

–223.75 10 126.75

Here t0= 30, t= 26, h=−5, u= t−t0

h = 26−30

−5 = 0.8.

Then

v(26) =y0+u∆v0+u(u−1)

2! ∆2v0+u(u−1)(u−2) 3! ∆3v0 +u(u−1)(u−2)(u−3)

4! ∆4v0

= 920.25 + 0.8×(−269.85) + 0.8(0.8−1)

2 ×(130.25) +0.8(0.8−1)(0.8−2)

6 ×(−150.95) +0.8(0.8−1)(0.8−2)(0.8−3)

24 ×108.50

= 687.21.

Thus, the value of v(16) obtained by Newton’s forward formula is 687.21 which is same as the value obtained by Newton’s backward formula.

From the above example one can conclude that if a problem is solved by Newton’s forward formula, then it can be solved by Newton’s backward formula also.

In the following section, we discuss another interpolation formula called Newton’s divided difference interpolation formula.

(13)

2.3 Divided differences and their properties

Newton’s forward and backward interpolation formulae are deduced from forward and backward difference operators. In this section, another type of difference called divided difference is defined and based on this difference, Newton’s divided interpolation formula is derived.

Lety =f(x) be a function whose explicit form is unknown, but it is known at some values of x, say at x0, x1, . . . , xn. Suppose (xi, yi), where yi = f(xi), i = 0,1, . . . , n are known at n+ 1 points x0, x1, . . . , xn. Like Lagrange’s interpolation, the points x0, x1, . . . , xn are not necessarily equispaced.

The divided differences of different orders are defined below:

Zeroth order divided difference

The zeroth order divided difference for the argument x0 is denoted by f[x0] and is defined by

f[x0] =f(x0).

First order divided difference

The first order divided difference for two arguments x0 and x1 is denoted by f[x0, x1].

This is defined below:

f[x0, x1] = f(x0)−f(x1) x0−x1 .

In general, for the arguments xi and xj, the first order divided difference is f[xi, xj] = f(xi)−f(xj)

xi−xj

. Second order divided difference

For the arguments x0, x1 and x2 the second order divided difference is denoted by f[x0, x1, x2] and is defined below:

f[x0, x1, x2] = f[x0, x1]−f[x1, x2] x0−x2

.

In general, f[xi, xj, xk] = f[xi, xj]−f[xj, xk] xi−xk

.

nth order divided differences

(14)

For then+1 argumentsx0, x1, . . . , xnthe divided difference is denoted byf[x0, x1, . . . , xn], which is defined as

f[x0, x1, . . . , xn] = f[x0, x1, . . . , xn−1]−f[x1, x2, . . . , xn] x0−xn

.

From the definition of first order divided difference it is seen that if the two arguments are equal, then it does not give any definite value. But, there is a meaning, which is discussed below.

2.3.1 Divided differences for equal arguments or divided differences for confluent argu- ments

In the following, it is shown by limiting process, that there is a definite value of divided difference when the arguments are equal. The divided differences for equal arguments is known asconfluent divided differences.

f[x0, x0] = lim

ε→0f[x0, x0+ε] = lim

ε→0

f(x0+ε)−f(x0)

ε =f0(x0),

provided f(x) is differentiable. Thus, f[x0, x0] is nothing but the first order derivative of f(x) at x=x0.

For three arguments, the confluent divided difference is determined as follows:

f[x0, x0, x0] = lim

ε→0f[x0+ε, x0, x0] = lim

ε→0

f[x0+ε, x0]−f[x0, x0] ε

= lim

ε→0

f(x0+ε)−f(x0)

ε −f0(x0) ε

= lim

ε→0

f(x0+ε)−f(x0)−εf0(x0) ε2

0 0 form

= lim

ε→0

f0(x0+ε)−f0(x0)

2ε (by L’Hospital rule)

= f00(x0) 2! . We obtained second order derivative.

Similarly, the confluent divided difference of four arguments isf[x0, x0, x0, x0] = f000(x0) 3! . In general, for (k+ 1) arguments the confluent divided difference is given by

f[

(k+1) times

z }| {

x0, x0, . . . , x0] = fk(x0)

k! . (2.10)

For this relation we can write

(15)

dk

dxkf(x0) =k!f[

(k+1) times

z }| {

x0, x0, . . . , x0]. (2.11) Some interesting properties of divided difference are presented below.

2.3.2 Properties of divided differences

(i) Divided difference of a constant is zero

Letf(x) =c, wherec is an arbitrary constant.

Then f[x0, x1] = f(x0)−f(x1)

x0−x1 = c−c x0−x1 = 0.

(ii) Divided difference of cf(x), c is constant, is the divided difference of f(x) multi- plied by c, i.e. if g(x) =cf(x), then g[x0, x1] =cf[x0, x]

Letg(x) =cf(x).

Therefore,

g[x0, x1] = g(x0)−g(x1)

x0−x1 = cf(x0)−cf(x1)

x0−x1 =cf(x0)−f(x1)

x0−x1 =cf[x0, x1].

(iii) Divided difference is linear Letf(x) =ap(x) +bq(x).

Now,

f[x0, x1] =f(x0)−f(x1)

x0−x1 = ap(x0) +bq(x0)−ap(x1)−bq(x1) x0−x1

=ap(x0)−p(x1)

x0−x1 +bq(x0)−q(x1) x0−x1

=ap[x0, x1] +bq[x0, x1].

This shows that divided difference is a linear operator.

(iv) Divided differences are symmetric The first order divided difference is

f[x0, x1] = f(x0)−f(x1) x0−x1

= f(x1)−f(x0) x1−x0

=f[x1, x0].

(16)

So, it is symmetric. This expression can be written as Also, f[x0, x1] = 1

x0−x1f(x0) + 1

x1−x0f(x1).

The second order difference can also be expressed to the above form. For three arguments

f[x0, x1, x2] = f[x0, x1]−f[x1, x2] x0−x2

= 1

x0−x2

hn 1

x0−x1f(x0) + 1

x1−x0f(x1)o

−n 1 x1−x2

f(x1) + 1 x2−x1

f(x2)oi

= 1

(x0−x2)(x0−x1)f(x0)

+ 1

(x1−x0)(x1−x2)f(x1) + 1

(x2−x0)(x2−x1)f(x2).

In this manner, the divided differences for (n+ 1) arguments is written as f[x0, x1, . . . , xn] = 1

(x0−x1)(x0−x2)· · ·(x0−xn)f(x0)

+ 1

(x1−x0)(x1−x2)· · ·(x1−xn)f(x1) +· · ·

+ 1

(xn−x0)(xn−x1)· · ·(xn−xn−1)f(xn)

=

n

X

i=0

f(xi)

(xi−x0)· · ·(xi−xi−1)(xi−xi+1)· · ·(xi−xn). (2.12) Thus, it is easy to conclude that the divided differences are symmetric.

(v) For equispaced arguments, the divided differences can be expressed in terms of forward differences, i.e.

f[x0, x1, . . . , xn] = 1

hn.n!∆ny0. (2.13)

Since the arguments are equispaced, therefore xi =x0+ih, i= 0,1, . . . , n.

(17)

Therefore, the first order divided difference is given by f[x0, x1] = f(x1)−f(x0)

x1−x0 = y1−y0

x1−x0 = ∆y0

h . (2.14)

Again, the second order difference is

f[x0, x1, x2] =f[x0, x1]−f[x1, x2] x0−x2 = 1

−2h ∆y0

h − ∆y1

h

= ∆y1−∆y0

2h2 = ∆2y0

2!h2 . (2.15)

Now, we use mathematical induction to prove the result. The result (2.13) is true forn= 1,2. Suppose the result be true for

n=k. Therefore, f[x0, x1, . . . , xk] = ∆ky0

k!hk. Now,

f[x0, x1, . . . , xk, xk+1] = f[x0, x1, . . . , xk]−f[x1, x2, . . . , xk+1] x0−xk+1

= 1

−(xk+1−x0) h∆ky0

k!hk −∆ky1

k!hk i

= 1

(k+ 1)k!hk+1[∆ky1−∆ky0]

= ∆k+1y0 (k+ 1)!hk+1. Hence, by mathematical induction we conclude that

f[x0, x1, . . . , xn] = 1

hn.n!∆ny0. (2.16)

(vi) The nth order divided difference of a polynomial of degree n is constant

Letf(x) =a0xn+a1xn−1+a2xn−2+· · ·+an−1x+an,(a06= 0) be a polynomial of degree n.

(18)

Then

f[x, x0] = f(x)−f(x0) x−x0

=a0xn−xn0

x−x0 +a1xn−1−xn−10

x−x0 +a2xn−2−xn−20

x−x0 +· · ·+an−1

x−x0 x−x0

=a0[xn−1+xn−2x0+xn−3x20+· · ·+xxn−20 +xn−10 ]

+a1[xn−2+xn−3x0+xn−4x20+· · ·+xxn−30 +xn−20 ] +· · ·+an−1

=a0xn−1+ (a0x0+a1)xn−2+ (a0x20+a1x0+a2)xn−3+· · ·+an−1

=b0xn−1+b1xn−2+b2xn−3+· · ·+bn−1,

whereb0 =a0, b1 =a0x0+a1, b2=a0x20+a1x0+a2, . . . , bn−1=an−1.

Thus, the first order divided difference of a polynomial of degreenis a polynomial of degree n−1.

In this manner, one can prove that thenth order divided difference of a polynomial is constant.

2.4 Newton’s fundamental interpolation formula

Based on divided difference, one can construct another type of interpolation formula called Newton’s fundamental interpolation formula. From this formula, Newton’s for- ward and backward difference and also Lagrange’s interpolation formulae can be derived.

So, in this context, this formula is highly importance.

Let the functiony=f(x) be known at the argumentsx0, x1, . . . , xnand letyi=f(xi), i= 0,1, . . . , n. The points xi,i= 0,1, . . . , nare not necessary equispaced.

The first order divided difference for the argumentsx0, xis f[x0, x] = f(x)−f(x0)

x−x0 . This can be written asf(x) =f(x0) + (x−x0)f[x0, x].

For the argumentsx0, x1 and x, the divided difference is f[x0, x1, x] = f[x0, x1]−f[x0, x]

x1−x

i.e., f[x0, x] =f[x0, x1] + (x−x1)f[x0, x1, x]

i.e., f(x)−f(x0)

x−x0 =f[x0, x1] + (x−x1)f[x0, x1, x]

Thus, f(x) =f(x0) + (x−x0)f[x0, x1] + (x−x0)(x−x1)f[x0, x1, x].

(19)

Similarly, for the arguments x0, x1, x2, x,

f(x) =f(x0) + (x−x0)f[x0, x1] + (x−x0)(x−x1)f[x0, x1, x2] + (x−x0)(x−x1)(x−x2)f[x0, x1, x2, x]

In this way, for the arguments x0, x1, x2, . . . , xn and x, we get

f(x) =f(x0) + (x−x0)f[x0, x1] + (x−x0)(x−x1)f[x0, x1, x2] + (x−x0)(x−x1)(x−x2)f[x0, x1, x2, x3] +· · ·

+ (x−x0)(x−x1)· · ·(x−xn)f[x0, x1, x2, . . . , xn, x]. (2.17) This formula is known as Newton’s fundamentalor Newton’s generalinterpo- lation formula. The last term (x−x0)(x−x1)· · ·(x−xn)f[x0, x1, x2, . . . , xn, x] is the error term.

The divided differences of different order are shown in Table 2.1.

x ... f(x) First Second Third

x0 ... f(x0)

x0−x1 ... f[x0, x1]

x0−x2 x1 ... f(x1) f[x0, x1, x2]

x0−x3 x1−x2 ... f[x1, x2] f[x0, x1, x2, x3] x1−x3 x2 ... f(x2) f[x1, x2, x3]

x2−x3 ... f[x2, x3] x3 ... f(x3)

Table 2.1: Divided difference table.

Error term

The error term is

E(x) = (x−x0)(x−x1)· · ·(x−xn)f[x0, x1, . . . , xn, x]

= (x−x0)(x−x1)· · ·(x−xn)fn+1(ξ)

(n+ 1)!,[using (2.10)] (2.18)

(20)

where min{x0, x1, . . . , xn, x}< ξ <max{x0, x1, . . . , xn, x}.

It is very interesting that the Newton’s fundamental interpolation formula gives both the interpolating polynomial as well as error term simultaneously.

Example 2.5 Using Newton’s divided difference formula, find the value off(1.2)from the following table:

x : 0 2 5 7 11

f(x) : 2.153 3.875 4.279 4.891 5.256 Solution. The divided difference table is

x f(x) 1st 2nd 3rd 4th

0 2.153

–2 0.8610

–5 2 3.875 –0.1453

–7 –3 0.1346 0.0257

–11 –5 5 4.279 0.0343 –0.0030

–9 –2 0.3060 –0.0078

–6 7 4.891 –0.0358

–4 0.0912

11 5.256

Here x= 1.2, x0= 0, x1 = 2, x2 = 5, x3= 7, x4 = 11, f[x0] = 2.153, f[x0, x1] = 0.8610, f[x0, x1, x2] =−0.1453, f[x0, x1, x2, x3] = 0.0257, f[x0, x1, x2, x3, x4] =−0.0030.

The Newton’s divided difference formula is

f(1.2) =f[x0] + (x−x0)f[x0, x1] + (x−x0)(x−x1)f[x0, x1, x2] +(x−x0)(x−x1)(x−x2)f[x0, x1, x2, x3]

+(x−x0)(x−x1)(x−x2)(x−x3)f[x0, x1, x2, x3, x4]

= 2.153 + 1.0332 + 0.1399 + 0.0938 + 0.0635

= 3.4834.

Hence,f(1.2) = 3.4834.

(21)

2.5 Deductions of other interpolation formulae from Newton’s divided difference formula

Theoretically, Newton’s divided difference formula is very powerful because from this formula several interpolation formulae can be derived.

2.6 Newton’s forward difference interpolation formula

Let the arguments be equispaced, i.e. xi = x0 +ih, i = 0,1, . . . , n. Then the kth order divided difference is (from (2.16))

f[x0, x1, . . . , xk] = ∆kf(x0) k!hk , fork= 1,2, . . . , n.

Using this assumption the formula (2.17) reduces to

φ(x) =f(x0) + (x−x0)∆f(x0)

1!h + (x−x0)(x−x1)∆2f(x0) 2!h2 + (x−x0)(x−x1)(x−x2)∆3f(x0)

3!h3 +· · · + (x−x0)(x−x1)· · ·(x−xn−1)∆nf(x0)

n!hn + (x−x0)(x−x1)· · ·(x−xn) ∆n+1f(ξ) (n+ 1)!hn+1. The last term is the error term.

To convert it to usual form of Newton’s forward difference formula, let u= x−x0

h ,

i.e. x=x0+uh. Sincexi=x0+ih,i= 0,1,2, . . . , n.

Therefore, x−xi= (u−i)h.

Then

φ(x) =f(x0) +u∆f(x0) +u(u−1)

2! ∆2f(x0) +· · · + u(u−1)(u−2)· · ·(u−n+ 1)

n! ∆nf(x0)

+u(u−1)(u−2)· · ·(u−n)fn+1(ξ)

(n+ 1)!. (2.19)

The value of ξ lies between min{x, x0, x1, . . . , xn} and max{x, x0, x1, . . . , xn}.

(22)

This is the well known Newton’s forward difference interpolation formula including error term.

2.7 Newton’s backward difference interpolation formula

In this case also, we assumed that xi =x0+ih,i= 0,1, . . . , n.

Let

φ(x) =f(xn) + (x−xn)f[xn, xn−1] + (x−xn)(x−xn−1)f[xn, xn−1, xn−2] +· · ·+ (x−xn)(x−xn−1)· · ·(x−x1)f[xn, xn−1, . . . , x1, x0]

+E(x), (2.20)

where

E(x) = (x−xn)(x−xn−1)· · ·(x−x1)(x−x0)f[x, xn, xn−1, . . . , x1, x0].

From the arguments xn, xn−1, . . . , xn−k, the relation (2.16) becomes f[xn, xn−1, . . . , xn−k] = ∆kf(xn−k)

k!hk . Again,

kf(xn−k)

k!hk = ∇kf(xn) k!hk . Thus,

f[xn, xn−1, . . . , xn−k] = ∇kf(xn) k!hk . With this notation (2.20) reduces to

φ(x) =f(xn) + (x−xn)∇f(xn)

1!h + (x−xn)(x−xn−1)∇2f(xn) 2!h2 +· · · + (x−xn)(x−xn−1)· · ·(x−x1)(x−x0)∇nf(xn)

n!hn +E(x), where

E(x) = (x−xn)(x−xn−1)· · ·(x−x1)(x−x0) ∇n+1f(ξ) (n+ 1)!hn+1, where min{x, x0, x1, . . . , xn}< ξ <max{x, x0, x1, . . . , xn}.

(23)

This is the Newton’s backward difference interpolation formula with error termE(x).

2.8 Lagrange’s interpolation formula

Let x0, x1, . . . , xn be the (n+ 1) arguments, not necessarily equispaced. For these arguments the norder divided difference is

f[x0, x1, . . . , xn] =

n

X

i=0

f(xi)

(xi−x0)(xi−x1)· · ·(xi−xi−1)(xi−xi+1)· · ·(xi−xn). Similarly, for the (n+ 2) argumentsx, x0, . . . , xn, the (n+ 1) order divided difference is

f[x, x0, x1, . . . , xn] = f(x)

(x−x0)(x−x1)· · ·(x−xn) +

n

X

i=0

f(xi)

(xi−x0)· · ·(xi−xi−1)(xi−xi+1)· · ·(xi−xn)

= f(x) w(x) +

n

X

i=0

f(xi) (xi−x)w0(xi), where w(x) = (x−x0)(x−x1)· · ·(x−xn).

Thus,

f(x) =

n

X

i=0

w(x)f(xi)

(x−xi)w0(xi) +w(x)f[x, x0, x1, . . . , xn]

=

n

X

i=0

Li(x)f(xi) +w(x)fn+1(ξ)

(n+ 1)! [using (2.16)]

where min{x0, x1, . . . , xn, x}< ξ <max{x0, x1, . . . , xn, x} and Li(x) = w(x)

(x−xi)w0(xi),theith Lagrange’s function.

This is the Lagrange’s interpolation formula for unequal spacing with error term.

Note that both Lagrange’s and Newton’s divided difference interpolation formulae are applicable for unequal spaced arguments. Also, they are equivalent proved in the next section.

(24)

2.9 Equivalence of Lagrange’s and Newton’s divided difference formulae

Let (xi, yi), i = 0,1, . . . , n be the given set of points. The arguments xi’s are not necessarily equispaced.

The Lagrange’s interpolation polynomial for these points is

φ(x) =

n

X

i=0

Li(x)yi, (2.21)

whereLi(x) = (x−x0)(x−x1)· · ·(x−xi−1)(x−xi+1)· · ·(x−xn)

(xi−x0)(xi−x1)· · ·(xi−xi−1)(xi−xi+1)· · ·(xi−xn). (2.22) Again the Newton’s divided difference interpolation formula for these points is

φ(x) =f(x0) + (x−x0)f[x0, x1] + (x−x0)(x−x1)f[x0, x1, x2] +· · · +(x−x0)(x−x1)· · ·(x−xn−1)f[x0, x1,· · ·, xn]

=f(x0) + (x−x0)

f(x0)

x0−x1 + f(x1) x1−x0

+(x−x0)(x−x1)× f(x0)

(x0−x1)(x0−x2)+ f(x1)

(x1−x0)(x1−x2) + f(x2) (x2−x0)(x2−x1)

+· · ·+ (x−x0)(x−x1)· · ·(x−xn−1)× f(x0)

(x0−x1)· · ·(x0−xn)+· · ·+ f(xn)

(xn−x0)· · ·(xn−xn−1)

. (2.23)

The coefficient of f(x0) in the above expression is 1 + x−x0

x0−x1

+ (x−x0)(x−x1)

(x0−x1)(x0−x2) +· · ·+ (x−x0)(x−x1)· · ·(x−xn−1) (x0−x1)(x0−x2)· · ·(x0−xn)

= (x−x1) (x0−x1)

1 + x−x0 x0−x2

+ (x−x0)(x−x2) (x0−x2)(x0−x3) + +· · ·+ (x−x0)(x−x2)· · ·(x−xn−1)

(x0−x2)(x0−x3)· · ·(x0−xn)

(25)

= (x−x1) (x0−x1)

x−x2

x0−x2 + (x−x0)(x−x2) (x0−x2)(x0−x3) + +· · ·+ (x−x0)(x−x2)· · ·(x−xn−1)

(x0−x2)(x0−x3)· · ·(x0−xn)

= (x−x1)(x−x2) (x0−x1)(x0−x2)

1 + x−x0

x0−x3

+· · ·+ (x−x0)(x−x3)· · ·(x−xn−1) (x0−x3)(x0−x4)· · ·(x0−xn)

= (x−x1)(x−x2) (x0−x1)(x0−x2)

x−x3

x0−x2 +· · ·+ (x−x0)(x−x3)· · ·(x−xn−1) (x0−x3)(x0−x4)· · ·(x0−xn)

=· · · ·

= (x−x1)(x−x2)· · ·(x−xn−1) (x0−x1)(x0−x2)· · ·(x0−xn−1)

1 + x−x0

x0−xn

= (x−x1)(x−x2)· · ·(x−xn−1)(x−xn) (x0−x1)(x0−x2)· · ·(x0−xn−1)(x0−xn)

=L0(x).

By similarly process, it can be shown that the coefficient of f(xi) is Li(x) for i = 2,3, . . . , n.

Hence, (2.23) becomes

φ(x) =L0(x)f(x0) +L1(x)f(x1) +· · ·+Ln(x)f(xn) =

n

X

i=1

Li(x)f(xi) =

n

X

i=1

Li(x)yi. Thus the Lagrange’s and the Newton’s divided difference interpolation formulae are equivalent.

Example 2.6 For the following table of data, find the interpolating polynomial using (i) Lagrange’s formula and (ii) Newton’s divided difference formula.

x : 0 3 8 10

y : 12 21 1 0 Also, compare the results.

Solution. (i) The Lagrange’s interpolation polynomial is φ(x) = (x−3)(x−8)(x−10)

(0−3)(0−8)(0−10) ×12 +(x−0)(x−8)(x−10) (3−0)(3−8)(3−10) ×8 +(x−0)(x−3)(x−10)

(8−0)(8−3)(8−10) ×1 + (x−0)(x−3)(x−8) (10−0)(10−3)(10−8)×0

(26)

= x3−21x2+ 134x−240

−240 ×12 +x3−18x2+ 80x

105 ×21

+x3−13x2+ 30x

−80 ×1 + 0

= 1

80[11x3−191x2+ 714x+ 960].

(ii) The divided difference table is

x f(x) 1st div. 2nd div. 3rd div.

diff. diff. diff.

0 12

3 21 3

8 1 –4 –7/8

10 0 –1/2 1/2 11/80

Newton’s divided difference polynomial is

φ(x) = 12 + (x−0)×3 + (x−0)(x−3)×(−7 8) +(x−0)(x−3)(x−8)× 11

80

= 12 + 3x−7

8(x2−3x) +11

80(x3−11x2+ 24x)

= 1

80[11x3−191x2+ 714x+ 960].

See that both the polynomials are same. It is expected because interpolating poly- nomial is unique.

Note 2.3 From the above calculations it is obvious that the Newton’s divided difference interpolation formula needs less computation than Lagrange’s interpolation formula. So, it is suggested to use Newton’s divided difference interpolation formula when the argu- ments are unequal spaced.

References

Related documents

A Lo` vasz formula is a k-CNF formula that has all variables occurring 2 k−2 k − 1 times, and for each variable p, p and ¬p occur nearly equal number of times.

If there is no structure that satisfies a formula, then report that the formula is

Thus it can be unfair to claim that the Newton’s method is faster than the gradient descent method on the grounds that it takes a fewer number of iterations to converge as compared

Give a class of Boolean functions that can be represented using linear size DNF formula but can only be represented by an exponential size CNF formula.

The aim of the study is to assess fetal weight by clinical methods using Johnson’s formula and Dare’s formula and by ultrasound, using Hadlock’s formula .Then the

1) In patients with chronic liver disease, serum creatinine alone is a poor marker for detecting renal dysfunction. 2) Creatinine based Cockcroft- Gault formula

The terms on the right side of formula (S3) represent respectively the difference between transition state and initial state for the translational energy, rotational

For FOPDT model Ziegler-Nichols tuning formula, Chine-Hrones-Reswick PID tuning algorithm, Cohen-Coon Tuning algorithm, Wang-Juang-Chan tuning formula and optimal PID