Unit-II Interpolation and Extrapolation 1. NUMERICAL METHODS Introduction: The study of finite...

Preview:

Citation preview

Unit-IIInterpolation and

Extrapolation

1

NUMERICAL METHODS

Introduction:The study of finite difference calculus has become very important due to its wide variety of application in everyday life. It has ben of great use for mathematicians and was originated by Sir Issac Newton.

2

The approach of numerical analysis is based on the calculus of finite differences. Numerical analysis is a very different discipline today. High speed computation has revolutionized numerical analysis as an art and given enormous impetus to its development as a science.

As an art, numerical analysis is concerned with choosing that procedure which is best suited to the solution of a particular problem.

3

Numerical analysis as a science is concerned with the processes by which mathematical problems can be solved by the operations of arithmetic by learning a problem statement into sequence of arithmetic operations which converts the data of the problem into results. The sequence of arithmetic operations and the set of decisions which indicate which operation in the sequence to perform next constitute a rule, a recipe for solving the given problem. Such a rule in mathematics and computer science is called an ALGORITHM.

4

Thus study of numerical analysis in many situations involves the development of algorithms to solve a problem already in a form in which the solution can be found by arithmetic means.

Generally numerical analysis does not strive for exactness. It attempts to derive some technique which is capable of providing high degree of accuracy for a wide class of problems. It provides convenient methods for obtaining useful solutions to mathematical

5

problems and for extracting useful information from available solutions which are not expressed in tractable forms.

One of the most rapidly expanding phases of n.a is that which deals with the approx. soln. of partial differential equations. But a basic understanding of the more involved problems which arise in that phase of analysis depends strongly upon familiarity with similar problem which arise in connection with the soln. of

6

algebraic and transcendental equations, the processes of interpolation and approx. numerical differentiation and interpolation and the approx. soln. of ordinary diff. equation. These topics are treated in details in the remaining chapter of the book.

7

• The wide use of electronic computers in the solution of the scientific, business and engineering problems has further increased the scope of numerical analysis. There it helps in reducing complex mathematical expressions like trigonometric functions, square roots etc. in terms of simple arithmetic operations.

8

• Given any function y=f(x), y is defined

to be the value of the function for any

value of the independent variable x. in

practice given a set of values of x and y

for the function y-f (x), we are interested

in studying the properties of the function.

This can be done in following ways.9

• Plot a graph between x and y and then study the

behaviour of the function with the help of the graph.

This is a very approximate method and the results are

not reliable.

• Knowing the form of the function y=f (x), fit an

approximate function to the given set of data and study

the behaviour of the function. Though the method is

accurate but the main drawback is that fresh

calculations are to be made when additional

observations are included in the data.10

• Generally the form of the function is not known and

the properties of the function are studied with the help

of given set of observations. The calculus of finite

differences solves this problem and can be defined as

the method of studying the changes in the values of

dependent variable with some specific changes in the

values of the independent variable without knowing

the form of the function. In the present chapter we

study the nature, properties and technique of finite

difference calculus.11

Basic Property of Finite Difference Theory

It is seen that if the function y=f(x) is a rational Integral function i.e. if it can be expressed in a polynomial form then it has some peculiar properties which help in the development of calculus of finite differences.

Let the function y=f(x) be represented by a polynomial of nth degree given by

Y=a+bx+cx2+….+kxn

Where a, b, c, …., k are certain constants and k being not equal to zero.

12

It can be observed that if the values of the independent variable x vary by finite steps (equal or unequal) and certain arithmetic operations are applied on the corresponding observations of the dependent variable y represented by (1.1), then these observation exhibit some peculiar tendency. This is illustrated by the following example. Let

Y = f(x) = 1+2x+3x2

Where the value of x vary at equal intervals of unit length, say from 0 to 4. we construct the following table :

13

Table 1.1

(i) (ii) (iii) (iV)X Y = f(x) ∆ ∆2

0 1

5

1 6 6

11

2 17 6

17

3 34 6

23

4 57 14

Various operations to construct the table 1.1.

Column (i). It contains the values of the independent variable x.

Column (ii). It is constructed by substituting the corresponding values of x from column (i) in the function 1+ 2x + 3x2

e.g. for x=1, f(x) = 1+ 2.1 + 3.12 = 6.

Column (iii). Subtract each value in column (ii) of table(1.1) from the succeeding value of the same column and write it in column (iii) so as to lie between the corresponding two values of column (ii) e g. the first two values in column (ii) of table 1.1 are 1 & 6, so we take the difference 6-1=5 and write it at a place between 1 & 6 in column (iii). Other values of column (iii) I e. 11, 17 & 23 are determined in same manner.

15

Column (iv). Operation to get the values of column (iii) is repeated on the observations of column (iii) to get column (iv) e g. 11-6=4,

17-11=6, 23-17=6.

It is seen that all the values of column (iv) are same i e. 6. So that when we have assumed f(x) to be second degree polynomial then after repeating operation of column (iii) twice, the observation of (iv) column become constant. Similarly one can see that if the given set of observation are assumed to be expressible in the form given (1.1), then repeating n-times the process of subtracting the value of each column from the succeeding values of the same column we shell get a column in which all the values16

will be identical. This peculiar characteristic of 1.1 has helped in developing the theory of finite difference calculus.“The basic assumption for the application of finite difference calculus is that the observations should be expressible in polynomial form given by (1.1).”1.3 Notations of finite Difference calculus.Let the observation for the function y = f(x) be given at equal spaces of the independent variable x, say at x=a, a+h, a+2h, etc. Then the corresponding values of f(x) are f (a), f(a+h), f(a+2h), etc.

Here independent variable x is known as argument and the dependent variable y is called as entry. 17

The difference f(a+h)-f(a) is known as first difference of the function f(x) at the point x=a and is denoted by ∆ f (a).

Thus ∆ f (a) = f(a+h) - f(a)

Similarly f(a+2h) – f(a+h) is called the first difference at the point x=a+h and is denoted by ∆f(a+h) and so on. ∆f(a+h) - ∆f(a) is known as second difference at the point x = a and is denoted by ∆2f (a). Here ∆2 does notrepresent square of the quantity but denotes repetition of the operation ∆.

18

Similarly ∆n-1f(a+h) - ∆n-1f(a) defines the nth difference at the point x = a and is denoted by ∆n

f(a) , i.e.

∆n f(a) = ∆n-1f(a+h) - ∆n-1f(a)

Operator ∆ is known as Forward (or ascending) Difference operator and in general defined as

∆f(x) = f(x+h)–f(x),

h being the interval of differencing.

Similarly

∆2f(x) = ∆f(x+h) - ∆f(x)

… … …

∆n f(x) = ∆n-1f(x+h) - ∆n-1f(x). 19

The differences ∆ f(x), ∆2f(x), ……., ∆n f(x) are called forward differences since they involve the values of the function f(x) at the points right to x.

1.4 Operators E and ∆.

Meaning of E. If y = f(x) is any function then operation of E on f(x) implies that give an increment to the value of x in the function. If this increment is of quantity h then the operation of E means that put (x+h) in the function where there is x i.e.

E f(x) = f (x+h) 20

E f(x) does not mean that E is multiplied to f(x) but this means that E is operated on f(x) and as such it is only a symbol and not an algebraic number. E is known as shift operator.

E2f(x) means that operator E is applied twice on the function f(x) i.e.

E2f(x) = EE f(x)

= E f(x+h), again put x+h in place of x

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

: : :

. . .

21

= E2 f(x) E.E . . .E(n times) f(x)

= En-1 [E f(x)]=En-1 f(x+h)=En-2[E f(x+h)]

= En-2 f(x+2h)

= … … … ...= E f(x+n-1 h).

= f(x+nh).

Ex. 1. Find the value of E2x2 when the value of x vary by a constant increment of 2.

Sol. E2x2 = EEx2

= E(x+2)2

[Putting x+2 in place of x in the function x2]

= (x+2+2)2 =x2+8x+1622

Ex. 2. Find the value of Enex when x may vary by a constant interval of h.

Sol. E (ex) = ex+h

E2 (ex) = EEex = Eex+h = ex+2h

= … … …

Enex = ex+nh

Meaning of Operator ∆. Recall that ∆ is an operation of two steps. First give a constant increment to the value of x in the function to get f(x+h) and then subtruct former from the later.

23

i.e. ∆f(x) = f(x+h) -f(x)

[first step] [Second step]

∆2 f(x) means operation of ∆ on f(x) twice.

… … … … …

∆2 f(x) means operation of ∆ on f(x) n times.

24

Relation Between operators E and ∆ and their Properties

(a) To show that E 1+∆ Proof. We have already seen in Article 1.4 that

operation of ∆ on any function f(x) implies two fold steps:

Step (i) Given an increment to the value of x in the function. If the increment is h then this step means that whatever there is x in f(x) put

x+h, which is nothing but the operation of E on f(x) i.e.

f(x+h) = Ef(x). …(1.2)

25

Step (ii) Subtract the original function from the value

obtained in step (i), so that we get

∆ f(x) = E f(x) - 1f(x)

= (E-1) f(x) …(1.3)

Here E and 1 are mere operators and algebraic numbers. 1 means an operation on f(x) which does not make any change in the value of the function i.e an identity operator.

From (1.3), it is evident that the operation of ∆ on f(x) is equivalent to the operation of (E-1) on f(x). Hence we have the identity

∆ E-1 i.e. E 1+∆.

26

Note that E, ∆ and 1 are mere operators in the above identity and these should not be confused with algebraic numbers. They themselves stand for nothing. They are meaningful when they are prefixed to some function. Further whenever some relationship between operators in written, then presence of operand function f(x) is implies. The method in which function (operand) is omitted is known as the method of separation of symbol.

1.5.1 Algebraic properties of operators E and ∆.

The operators possess the distributive, commutative and indices properties of algebraic numbers.

27

(i) Operators E and ∆ are distributive.

Proof. Let any function u(x) be the sum of the function f(x), g(x), p(x), . . . . . . , so that

u(x)=f(x)+g(x)+p(x)+……..

Then by defined

E u (x) = f(x+h)+g(x+h)+p(x+h)+…..

[the interval of differencing being h]

=Ef(x)+Eg(x)+Ep(x)+……

Which shows that E is distributive.

28

Similary

∆u (x) = ∆{f(x)+g(x)+p(x)+…..}

= [f(x+h)+g(x+h)+p(x+h)+…]-[f(x)+g(x)+p(x)+…]

=[f(x+h)-f(x)]+[g(x+h)-g(x)]+[p(x+h)-p(x)]+…

= ∆ f(x) + ∆g(x) + ∆p(x)+…,

Which shows that ∆ is also distributive.

(ii) E and ∆ are commutative with regard to constant.

i.e. Ecu(x) = cEu(x)

and ∆cu(x) = c ∆u(x) ….(1.5)

Where c is some constant.

29

Proof. Now Ecu(x) = cu(x+h)

= cEu(x)

and ∆ cu(x) = cu(x+h)-cu(x)

= c[u(x+h)-u(x)]

= c ∆u(x)

which shows that E and ∆ commtative w.r.t. contant.

(iii) E and ∆ obey the law of indices.

i.e. Em.En u(x) =Em+n u(x)

and ∆m ∆n u(x) = ∆ m+n u(x) ….(1.6)30

(iii) E and ∆ obey the law of indices.i.e. Em.En u(x) =Em+n u(x)and ∆m ∆n u(x) = ∆ m+n u(x) ….(1.6)Proof. Em.En u(x) = Em u(x+nh) = u(x+mh+nh) = u[x+m+nh] = em+n u(x).and ∆m ∆n u(x) = (∆. ∆…m times) (∆. ∆…n times) u(x) = (∆. ∆…m +n times) u(x) = (∆ m+n u(x)). No doubt operators E and ∆ can be regarded as algebraic quantities.

31

1.7 Separation of symbols

The relationship between the operators E and ∆ can be used to prove a number of useful identities. Recall that the method is known as separation of symbols.

Example : Construct difference table for the following data

X 45 50 55 60 65

F(x) 2.871 2.404 2.083 1.862 1.712

32

Table 1.4 (Difference Table)

x f(x) ∆f(x) ∆2f(x) ∆3f(x) ∆4f(x)

45 2.871

-0.467

50 2.404 0.146

-0.321 -0.046

55 2.083 0.100 0.017

-0.221 -0.029

60 1.862 0.071

-0.150

65 1.712

33

Obtain the missing terms:

X: 50 51 52 53 54 55 56

f(x): 3.684 ? ? 3.756 3.780 3.803 3.826

Polynomial interpolation consists of determining the unique with order polynomial that fits n+1 data points. This titled polynomial can be used to compute intermediate values.

34

• It is seen that if the function is a rational integral some peculiar properties which help in the development of calculus of finite differences.

• Let the function be represented by a polynomial of nth degree given y

… (1.1)• Where a, b, c,…, k are certain constants and k

being not equal to zeronkxcxbxay ...2

35

• It can be observed that if the value of the independent variable x vary finite steps (equal of unequal) and certain of the dependent variable y represented by (1.1), then these observations exhibit some peculiar tendency. This is illustrated by the following example. Let

2321)( xxxfy 36

• Where the values of x vary at equal intervals of unit length, say from 0 to 4. We construct the following table :

(i) (ii) (iii) (iv)

x

0 1 5

1 6 11 6

2 17 17 6

3 34 23 6

4 57

x

1)(xfy

37

• Where the values of x vary at equal intervals of unit length, say from 0 to 4. We construct the following table :

(i) (ii) (iii) (iv)x0 1 51 6 11 62 17 17 63 34 23 64 57

x

1)(xfy

Various operations to construct the table 1.1.Column (i) It contains the values of the independent variable x.

2321 xx .61.31.21)(,1

2

xfx38

To express difference of any order in terms of the values of the function i.e. in terms of entries.

i.e. to express ∆n f(a) etc. in terms of f(a), f(a+h), …f(a+ah)

From table 1.2

∆f(a) = f(a+h) – f(a)

∆2f(a) = ∆ f(a+h) - ∆ f(a)

= f(a+2h) - f(a+h) – [f(a+h)-f(a)]

= f(a+2h) – 2f(a+h)+f(a) ..….(1.7)

Similarly

∆3 f(a) = ∆2f(a+h) - ∆2f(a) [putting the values from (1.7)]

=[f(a+3h)-2f(a+2h)+f(a+h)] – [f(a+2h) – 2f(a+h) + f(a)]

= f(a+3h) – 3f(a+2h) + 3f(a+h) – f(a) ………(1.8)39

Similarly all the higher order differences can be expressed in terms of

f(a+nh), f(a+ h), ……, f(a),

Alternatively. ∆ f(a) = (E-1)f(a) = f(a+h) – f(a)

∆2 f(a) = (E-1)2 f(a) = (E2 – 2E +1) f(a)

= f(a+2h) – 2f(a+h) + f(a)

In general ∆n f(a) = (E-1)n f(a)

= [En – nC1 En-1 + nC2 En-2 ….+ (-1)n] f(a)

= En f(a) – nC1 En-1f(a) + ….+ (-1)n f(a)

= f(a+nh) – nC1 f(a+ h) + (-1)n f(a)

This is termed as Newton’s formula for the nth difference and enable us to determine the nth difference without forming the difference table.

1n

1n

40

To express any value of the function in terms of leading terms and the leading differences of a difference table.

i.e., to show that f(a+nh) = f(a)+nC1 ∆ f(a) + …+∆n f(a)

We have

∆ f(a) = f (a+h) – f(a)

i.e. , f(a+h) = f(a) + ∆ f(a)

f(a+2h) = f(a+h) + ∆ f(a+h)

= f(a) + ∆f(a) + ∆[f(a) +∆f(a)]

[putting f(a+h)=f(a) +∆f(a)]

= f(a)+∆f(a)+∆f(a)+∆2f(a)

= f(a)+2∆f(a) +∆2f(a)

41

Similarly,

f(a+3h)=f(a+2h)∆f(a+2h)

= f(a)+ 2∆f(a)+∆2f(a)+∆[f(a)+2∆f(a)+∆2f(a)]

= f(a)+ 2∆f(a)+∆2f(a)+∆f(a)+2∆2f(a)+∆3f(a)

= f(a)+ 3∆f(a) +3∆2f(a) +∆3f(a)

Now we shall use mathematical induction.

For, let

f(a+nh) = f(a)+nC1∆f(a)+nC2∆2f(a)+….+∆n f(a)

be true for n. We shall show that the result is also true for n=n+1.

42

We have

f(a+ h)=f(a+nh)+∆f(a+nh)

=[f(a)+nC1∆f(a)+nC2 ∆2f(a)+…..+ ∆nf(a)] +

∆[f(a)+nC1∆f(a)+…..+ ∆nf(a)]

=f(a)+[nC1∆f(a)+ ∆f(a)]+[nC2 ∆2f(a)+nC1∆2f(a)]+….+

∆n+1f(a)

=f(a)+(nC1+nC0)∆f(a)+(nC2+nC1)∆2f(a)+…+∆n+1f(a)

= f(a)+ n+1C1∆f(a)+n+1C2∆2f(a)+…+∆n+1f(a)

[Because nCr + nCr-1=n+1Cr]

Hence the result is true for n=n+1 also and so the result is true universally as it is already true for n=2 and 3 etc.

1n

43

Hence for all positive integral values of n.

f(a+nh)=f(a)+nC1∆f(a)+nC2∆2f(a)+…+∆nf(a) …(1.9)

Alternative Proof

f(a+nh)=Enf(a) (by the definition of E)

= (1+∆)nf(a), since E 1+∆

= (1+nC1∆+nC2∆2+….+∆nf(a))

= f(a) + nC1∆f(a) + nC2∆2f(a) +…..+∆nf(a)

= f(a) + ∆f (a) + ∆2f(a) +

∆3f(a)+…∆nf(a)

The result give in (1.9) is known as Newton-Gregory formula or Newton’s forward interpolation formula.

!1

n

!2

)1( nn

44

The nth difference of a polynomial of degree n is constant and n+1 th difference will be zero or given n+1 observations the nth difference will be constant and n+1 th difference will be zero.

45

The method of Estimating unknown value with the help of given set of observation is known as Interpolation. If the unknown values lies in the range of known values, it is known as interpolation and when it lies outside this range then it is known as Extrapolation.

Assumption :

I. There are no sudden jumps or falls in the values during the period under consideration.(values are given in increasing / decreasing order of magnitude).

II. Rise and fall in the given values is uniform.

III. The given set of observations are expressable in polynomial form.

46

Various Methods of Interpolation & extrapolation:

A.Grapgical

B.Curve Fitting

C.Finite Difference

Finite difference Method.

The method does not assume the form of the function to be known. Less approximate than graphical method. Calculation remain simple even when some additional observation are added.

The validity of assumptions is difficult to verify.

47

Interpolation

Argument Given Argument Given

Equal Intervals At Equal intervals

Ordinary Central Divided Lagrange's

Differences Differences Differences Method

48

• In Equal Interval the following situations are experienced:• Given n observations we want to find

some intermediate term.• Knowing ………. Observations out of n

the missing observation is to be calculated.• Knowing n-m observations out of n. the

unknown m observations are to be determined.

49

CASE I EQUAL INTERVALS

NEWTON – GREGORY FORMULA

Given X a a+h a+2h …… a+nh

f(x) f(a) f(a+h) f(a+2h) ….. f(a+nh)

To find f(x) for x=a+mh.

The using ordinary difference and assuming that the given set of values can be expressed by a polynomial of degree n.

f(a+mh) = f(a)+mC1∆ f(a)+ nC2∆2 f(a) + …. + ∆nf(a)

50

Example

In an examination the number of candidates who obtained marks between certain limits were as follows:

Marks No. of Candidates

00-19 41

20-39 62

40-59 65

60-79 50

80-99 17

Estimate the number of candidates who obtained fewer than 70 marks.

51

Sol. Construct a cumulative frequency table to solve this problem.

Marks f lessthan y ∆y ∆2y ∆3y ∆4y

0-19 41 19 41

62

20-39 62 39 103 3

65 -18

40-59 65 59 168 -15 0

50 -18

60-79 50 79 218 -33

17

80-99 77 99 235

52

We want to find the number of candidates getting less than 70 marks

Z = a+mh =70 here h=39-19 = 59-38 = 20

70 = 19 + m x 20 a = 19

i.e. 50 = 20m m = 2.55

By Newton Gregory formula

f(z) = f(70) = f(a + mh)

= f(19 + 2.55 x 20)

= f(19) + 2.55C1 ∆f(19) + 2.55C2 ∆2f(19) + 2.55C3 ∆3f(19) + 2.55C4 ∆4f(19)

=198.405

0)18(6

)255.2)(155.2(55.2)3(

2

)155.2(55.2)62(55.241

53

Case of Missing terms

Ex. Given µ0 = 580, µ1 = 556, µ2 = 520 and µ4 = 580 find µ3.

It is a typical case of one missing observation. There can be five observations µ0 , µ1 , µ2 , µ3 , µ4 at equal interval of width 1 but one of them i.e. µ3 is missing. Only four observations are known so we can fit a polynomial of degree three and 4th degree difference will be zero.

In Equal Intervals the following situations are experienced:

(i) Given n observations we want to some intermediate term. 54

(ii) Knowing observations out of n the missing observation is to be calculated.

(iii) Knowing n-m observations out of n, the unknown m observations are to be determined.

Some Typical Examples:

I. Find the Missing Term in the following table and explain why the resulting value differ from 33?

X : 0 1 2 3 4

Y : 1 3 9 ? 81

II. The following table gives

X : 0 1 2 3 4

Y : 3 6 11 18 27

What is the form of the function f(x) ?

1n

55

NEWTONS BACKWARD DIFFERENCES

a f(a)

a+h f(a+h) f(a+h) - f(a) = f(a+h) f(a+2h) - f(a+h)

= f(a+2h)

a+2h f(a+2h) f(a+2h)-f(a+h) = f(a+2h) f(a+3h) - f(a+2h)

= f(a+3h)

a+3h f(a+3h) f(a+3h)-f(a+2h) = f(a+3h) = f(a+3h) - f(a+2h)

= f(a+3h)

)(xf )(2 xf)(xfx

2

2

2 23

56

The Newton backward interpolation formula is given by

The formula is suitable if one wants to interpolate near the bottom of the of the table.

.........!3

)2)(1()(

!2

))(1)(()()()(

3

2

uuunhaf

uunhafunhafnhafxf

57

100 10.63

2.40

150 13.03 -0.39

2.01 0.15

200 15.04 -0.24 -0.07

1.77 0.08 0.02

250 16.81 -0.16 -0.05 0.02

1.61 0.03 0.04

300 18.42 -0.13 -0.011.48 0.01

350 19.90 -0.11

1.37

400 21.27

)(xf )(2 xf )(3 xf )(4 xf )(5 xf )(6 xf)(xfx

58

Now

2.050

10

)50(400410

410

50

400

m

n

x

h

mha

...)11.0(!2

)2.1)(2.0()37.1(2.027.21

)(!6

)5)...(1(

...)(!2

)1()()()(

5

2

nhafmmm

nhafmm

nhafmnhafmhaf

59

III. Obtain the missing terms :

X : 50 51 53 54 55 56

f(x): 3.684 ? ? 3.780 3.803 3.826

Polynomial Interpolation consists of determining the unique nth order polynomial that fits data points. This fitted polynomial can be used to compute intermediate values.

1n

60

Newtons formulae are fundamental are applicable for interpolation in general.

Unequal Intervals

When the values of the independent variable (Argument) are given at uneven/unequal spaced intervals then the various differences will also be affected by the changes in the values of argument and then the differences involve argument values and denoted as ◊ (divided differences)

x = a b c d e ….

f(x) = f(a) f(b) f(c) f(d) f(e)

ab

afbfaf

b

)()(

)(61

and so on.

Here in ∆ there are two suffixes and ∆2 there are three suffixes.

We also write

bc

bfcfbf

c

)()(

)(

ac

afbfaf bc

bc

)()()(

2

ab

afbfbafaf

b

)()(

),()(62

Now

ac

bafcbfcbafaf

bc

),(),(

),,()(2

ad

cbafdcbfdcbafaf

bcd

),,(),,(

),,,()(3

ab

bf

ba

afab

afbfafbaf

b

)()(

)()()(),(

63

and so on.

)]([)(2 afafbcbc

ab

bf

ba

afc

)()(

cacb

bfbc

cf

acab

bfba

af

)()()()(

64

Steps

I.Divide f(a) by a-b

II.Where there is a write b in the function and divide the value by b-a.

III.Add the values obtained in steps I and II to get the desired divided difference.

Difference between ∆ and ◊

A.Ordinary differences are not affected by the changes in the value of argument.

B. Ordinary differences have numerator(i.e. differenced between successive values of entry or various order differences) whereas divided differences have denominator also.(i.e. differences between two extreme values of argument) 65

C. The operator and the operand have no suffixes in ordinary differences whereas these suffixes have special significance in divided differences.

The value of the divided differences remain unchanged by interchanging the suffixes of the operator and the operand or divided differences are symmetric functions of their arguments.

Also the nth divided difference of a polynomial of nth degree is constant.

h = a + h

c = a + h

l = a + nh.n

n

klbc

n

hn

afaf

!

)()(

..

66

NEWTONS DIVIDED DIFFERENCE FORMULA

)())...()((

)())...()((...

)())((

)()()()(

..

1

2

afhxhxax

afkxhxax

afhxax

afaxafxf

lxbc

n

klhc

n

hc

h

67

Lagrange’s formula for Interpolation

))...()((

))...()(()(....

))...()((

))...()(()(

))...()((

))...()(()()(

klblal

kxhxaxlf

lbcbab

lxcxaxbf

hacaba

hxcxhxafxf

68

Merits & Demerits of IWE Lagrange’s Method

1.Simple and easy to remember.

2.No need to calculate divided differences.

3.Complicated calculations

4.Time consuming process

5.Chances of committing errors in negative and positive and positive values.

69

Let the given set of n+1 observations be :

x = a b c d e f … k

f(x) = f(a) f(b) f(c) f(d) f(e) ……. f(k)

Now given n+1 observations we can fit a polynomial of degree n. Let the polynomial be

f(x) = A(x-b)(x-c)…(x-k) + B(x-a)(x-c)…(x-k) + …………

+ k(x-a)(x-b)…….(x-j)

Where A,B,C,…….,K are certain constants.

For x = a

f(a) = A(a-b)(a-c)….(a-k)

))....()((

)(

kacaba

afA

70

For x =h

f(b) = B(b-a)(b-c)…..(b-k)

:

:

which is required Lagrange's formula.

))....()((

)(

kbcbab

bfB

))....()((

)(

jkbkak

kfK

)).....()((

))....()()((

...))...()((

))...()()(()(

jkbkak

jxbxaxkf

kacaba

kxcxbxafxf

71

Find the unique Polynomial of degree 2 such that

P(1)=1, P(3)=27, P(4)=64

Use Lagrange’s method of Interpolation [2002-2003]

Sol: Here x = 1 3 4

P(x) = 1 27 64

Now by Lagrange’s formula

)34)(14(

)3)(1)(4(

)43)(13(

)4)(1)(3(

)41)(31(

)4)(3)(1()(

xxPxxPxxP

xP

)1)(3(

)3)(1(64

)1)(2(

)4)(1(27

)3)(2(

)4)(3(1)(

xxxxxxxP

3

)34(64

2

)45(27

6

127)(

222

xxxxxx

xP72

Ex. The following table gives the distance in nautical miles of the visible horizon for the given heights in feet above the earths surface.X : Height :100 150 200 250 300 350 400Y : Distance :10.63 13.03 15.04 16.81 18.42 19.90 21.27 Use Newtons Gregory’s forward formula and backward interpolation formula to find the values of Y when X=218 and 410 [2001-2001]

48198

)28811448(6

1

)38451212810840581127(6

1

2

2

222

xx

xx

xxxxxx

73

Sol:

Since x = 218 is nearer is 200 and lies between the given set of values, we prepare forward difference table is :

74

X Y ∆f(x) ∆2f(x) ∆3f(x) ∆4f(x) ∆5f(x) ∆6f(x)

100 10.63

2.40

150 13.03 -0.39

2.01 0.15

200 15.04 -0.24 -0.07

1.77 0.08 0.02

250 16.81 -0.16 -0.05 0.02

1.61 0.03 0.04

300 18.42 -0.13 -0.011.48 0.01

350 19.90 -0.11

1.37

400 21.27 75

Here a = 100, h = 50, x = 218

Now Newtons Gregory formula is give by

f(a+mh) = f(a)+ mC1∆f(a)+mC2∆2f(a)+……..+mC6∆6f(a)

36.250

118

)50(100218

m

m

mhax

)(!6

)5)...(1(...)(

!2

)1()()( 62 af

mmmaf

mmafmaf

76

Ex. Given the following data

X 2.5 3.0 4.5 4.75 6.0

f(x) 8.85 11.45 20.66 22.85 38.60

Find f(3.5)

Sol:

Here the argument is given at unequal intervals. So we construct divided difference table.

77

Here x = 3.5 lies between 3.0 and 4.5 so we take a = 3.

So we take a =3

X f(x) ∆f(x) ∆2f(x) ∆3f(x) ∆4f(x)

2.5 8.85

5.20

3.0 11.45 0.470

6.14 0.456

4.5 20.66 1.497 -0.0.29

8.76 0.354

4.75 22.85 2.560

12.60

6.0 38.60

78

Using Newtons Divided difference formula

)354.0)(75.45.3)(5.45.3)(35.3(993.13

)497.1)(5.45.3)(35.3()14.6)(35.3(45.11

....)())()((

)())(()()()()(3

2

afcxbxax

afbxaxafaxafxf

79

Ex. Use Gauss forward formula to evaluate y30

y21 = 18.4708, y25 = 17.8144, y29 = 17.1070, y33 = 16.3432

and Y37 = 15.5154

Sol. y30 lies in the neighbourhood of y29 so we can use Gauss forward formula using origin at x29 .

The following differences are calculated.

80

The Gauss forward formula is given by

f(x) = f(29) + (x-29)∆f(30) + (x-29)(x-33)∆2f(25)+…

X Y ∆Y ∆2Y ∆3Y ∆4Y

21 18.4708

-0.6564

25 17.8144 -0.0510

-0.7074 .0946

29 17.1070 -0.0564 .1022

-0.7638 -0.0076

33 16.3432 -0.0640

-0.8278

37 15.5154

81

x(x-1)(x-2) = (x2 - 3x + 3)x

= x3 – 3x2 + 2x

3x2 – 6x +2

)(!2

)1()()()( 2 af

xxafxafxhaf

)(!2

12)()( 2 af

xafxhaf

)()( 2 afxhaf

82

Central DifferencesIn a difference table the leading differences always be on the diagonal sloping upward or downward from the leading terms, but it can observed that co- efficient of such higher order differences will diminish slowly with an increase in the order of difference. The rate of convergence of co-efficient is found to be most rapid when we consider the differences in the neighbourhood of unknown value. More over the interpolation is likely to be more accurate, if we explore the unknown value in its neighbourhood. For this we derive formulae which consider the differences in the neighbourhood of the horizontal line passing through the unknown value. These are known as Central Differences.

83

X f(x)

-2a f(a)

-1b f(b)

0c f(c)

1d f(d)

2e f(e)

3g f(g)

)(afb

)(2 afbc

)(bfc

)(cfd

)(dfe

)(efg

)(2 bfcd

)(2 cfde

)(2 dfeg

)(3 afbcd

)(3 bfcde

)(deg

3 cf

)(4 afbcde

)(deg

4 bfc

)(deg

5 afbc

84

Let the unknown values lie in the neighbourhood x = c. Then we take f(c) as the leading term and using sheppards rule write the interpolation formula moving upward or downward along the horizontal line at x = c.

I. Gauss forward:

Consider the differences on or below the horizontal line at x = c

Which by sheppards Rule

)(),(),(),(),(.. 432 afbfbfcfcfeibcdecdecdd

...)(3

)1)(1()1(

!2

)1()0()0()(

)())()(()())(()()()()(

2,1,0

32

1,01

32

dfxxx

fxx

fxfxf

cfhxdxcxbfdxcxcfcxcfxfcdecdd

85

II. Gauss Backward involving differences on or above the horizontal line at x = c.

III. Mean of Gauss forward and Gauss backward is stirling

Here even order differencelie on the horizontal line

...)1(!2

)1()1(0)()(

)(),(),(),(

2

43

fxx

fxcfxf

afafbfcfbcdecdc

...2

)2()1(

!3

)1(

)1(22

)1()0()0()(

332

22

ffxx

fxff

xfxf

86

Recommended