Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

NM - Unit 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

5

Finite Differences

fJ/. First difference


Let y = f (x) be a given function of x. and let Yo, Yi, Y2, ... , Yn be the
values of y corresponding to Xo, x1, x2, •.. , xn~ the values _of x. The
independent variable x is called the argument and the coqesponding
dependent value y is called, the entry. In general, the difference between
any tw~ consecutive values of X need not be same or equal.
We can write the arguments and entries as below.
X XJ Xn-1

y Yo Yt Y2 Yn- t . Yn
If we subtract from each value of y (except y0 ) the preceding value
of y, we get
Y1 Y:r!..} 1, Y3 - Yi, ···,Yn - Yn- l
These results are ~alled the first differences of y. The first differences
1
of y are denoted by Ay.
f. '.:~ ( I
That is, Ay0 = Yt - Yo
Ayl = Y2 -yl
Ay2 = Y3 -y2
Ayn - l = Yn - Yn- l
Here, the symbol Li-denotes an operation, called forward. difference
operator. -
- Higher differences 0'fh~SeGOnd and higher differences are defined as
C

below : , '

·····························································
2 ' '
Ji Yn - I= A(Ayn - 1) = A(yn -yn - 1) =Ayn ..... Ayn :....1
2
Here, t:.. 1s an operator---c alled, second order forward difference
170
Finite Differences 171

operator. .In the· same way, the third order forward difference operator
A3 is as follows :
A3Yo = A2Y1 -A2Yo
A3yl = A2y2 ""'." A2y1
................................... etc.
In generaI An An-I , An-1
u Y; = Ll Yi'+1 - Ll Y;
Though the arguments x0, x 1, x2, ... need not, in general, be equally
spaced, for purposes of practical work, we take them equally spaced.
Usually, the arguments are taken as
x0 , x0 + h, x0 + 2h, x0 + 3h, .... ,
so that x1 - x0 = x2 - x1 = x3 - x2 = .......= h
'
~ere, h is called the .interval of differencing.
Therefore, ~(x) = f(x h)-f(x)
A2f (x) = A (Af (x))
= tif (x+ h)- ~f(x) ' .
= [f (x + 2h) - f(x + h)] - [f (x+ h) - f (x)]
' '
= f (x + 2h)-'2f (x + h) +f (x)
~.3J(x) = .6.2[4{(x)] = .1.[A-1/ (x)]
. \
= Af{x+ 2h)- 2tif(x + h) + 4f(x) _
=f(x + 3h) -J.(x + 2h)-2 [f(x + 2h) -f(x + h)]
+ f(x+ h)-f(x)
= f (x + 3h) - 3/ (x + 2h) + 3f (x + h) - f (x)
and so on.
Operators. We have already defined the forward difference operator
A." We will now see some more operators and the relations connecting
them.
Backward difference operatd.r..:_(V) :
Backward difference oper:ator (V) is defined as .
Vf(x) = f(x)-f(x- h)
By definition Vi1 = Yt ·-Yo
(
Vy 2 = y2 - y 1 etc.
' '

2
Hence Y (x) = V[f (x) ·-f (x- h)]
/

=V/(x)- Vf(x-h)
= f (x)- f (x- h);.., (f (x- h)- f (x- 2h)]
= f (x) .... 2f'(x- h) +f (x- 2h)
Central difference opera;to~ (6) :
The central difference operator 6 is defined by
172 Numerical Methods-IV

lif(x) =!( x+ )-1( x- ~)


or Oyx = Yx+!!-yx_!!
2 2
Shifting or displacement or translation operator E: We define the -shifting
operator E such that
Ef(x) = f (x+ h)
or Eyx=Yx+h
Hence E Y1 =Y2, E (y2) =Y3 etc.
2 • .
E Yx=E(yx+h)=Yx+2h
"E1yx = Yx+ nh and "E1J(x) = f (x + nh)
Inverse operator E- 1 is such that
E- 1 Ef{x) = f (x)
Suppose · E-1 f (x) = $(x)
Then E(\>(x) = f(x)
Hence (\>(x + h) = f (x)
... · (\>(x)=f(x-h)
1
E- f (x) = f (x- h)
Similarly E-r f (x) = f (x - rh)
- Averaging operator µ : The averaging operator µ is defined by

µyx=;(Yx+1+Yx-1)
i.e., µ/(x) =; [t(x+; )+t( x- )]
Differential operator D : The differential operator·D is defined by
--·· d
D f (x) = dxf (x)

D2f(x) = -2 f(x) etc.


d2
dx .
Unit operator 1 : The unit operator I is such that
l,J(x)=/(x).
"( Propertie~ of operators 1. The ~perators A, V, E, <>, µ and D are all
line~operators\ _
Proof. tr{aj (x) + b<j>(x)) = [a/ (x + h) + bq>(x + h)] - [af(x) + b<j>(x)]
= a [f (x + h)- f (x)] + b [q>(x + h) - <j>(x)]
= all./ (x) + bA<j>(x)
Hence A is a linear operator.
Putting a= b = 1, ll.[f (x) + g (x)] Af (x) + Ag (x)
Finite Differences
173
and by putting b = 0, 8(af (x)) =a8f(x)
2. The operator is distributive over addition.
8m8~ f(x) = t:,.m+nf(x) = 8n.8m f(x).
8m8nf(x) = (8.8 .... m factors)(8.8 ....n factors)f(x)
= t:,.m +n f (x)
. All the above operators obey index laws.
3. Also 8[f (x) + g (x)] = 8 [g (x) + i (x)]

Relation between the operators:
Relation between 8 and E:
·we know 8f(x)=f(x+h)-f(x)
= Ef (x) - 1/ (x)
= (E- 1 (x)

This is called
Note. Two operators 01 and 02 are equal if 0t.f(x) = 0 2.j(x) for all f(x) .

... (1)

or ... (2)
Here, 1 is not the numeral 1 but it is the unit operator 1 which means
1 f (x) =f (x).
Relation between E- and V :
VJ (x) ; f (x) -f (x - h)
= 1f (x) - E- 1! (x)
::: (1 - E- 1) / (x)

... I ... (3)


1
Hence E- =1-V /.
I E= (1-Vr I 1
since (E-
1 1
f =E ... (4)
Relation between E and <> :

lll(x) = 1( )-1( x+ x- ~)
= E I12 f (x) -E- 112 f (x)
/ = (Eu2 E-112)/(x)
I12 2
.-:-tlo=E112 -E- 112 I =E- [E-1]=E-v 8 ... (5)

Also o=E 112 [ 1 - ~] = 'E 112 V


o= r 112 A = £ 112 v ... (6)
174 Numerical Methods-IV

f a tation between E and µ :

µJ(x) = [1( x+ )+t(x- )} ·


[ E 112 f(x) + E" 112 f(i)]

=½ [E 112 + E- uz]f (x)


... /I ,!l µ:: l2 [El/2 + L---
E- 112]
... (7)

,Biia/ion between D and t,.-~ -


d
D~(x) =-f(x)
'J dx
By Taylor's theorem, ·\

J(x+h)=f(x)+
h I (x)+2!
h f 1l(x)
. • ,
2
-t: ,. ....
·
to oo
11 2
h h D2f (x) + ...... to oo
... Ef(x) = f(x) + 1! Df(x) + Z,!

= [ l+l!+ 2!
hD
2
0!}) + f:,hD) + ...... to oo
3!
3
]f (x)

L . =iv f (x)
t/ / E=iD 1 ... (8)

E=l+Li=e"D
hD = log E =log (I + A)
. Li 2 ~3
hD = Li - -·- +-- - ...

... D=-
h
ll 2

L\ . 11
a--+--
2 3 ...
]
2
3
3
... (9)

Forward Difference Table:


The finite forward differences of a function are represented below in
a tabular form :
X y ,1.y t..2y Li3y . ,li4y Li5y i1_6
yo ___
XO
Ayo-.__ ,1.2y0
Xl YI .....__ ---,1.3
Ay1.....__ 2 . YO--- 4
x2 y2.....__ A YI 3
i1 YO
ilY2
.....__ Ll2
.....__A YI_ ,14
.....__A\0,-.__ 6
X3 Y3
Lly3
2
Y2-._
11 Y2
3 - YI_ 5
-11 VI
4 yo
X4 Y4
8y4 Li .Y3• .3 ---- .... .14)':2 •
xs YS 2
Li .Y3 '
Llys Li y4
X6 Y6
Finite Differences 175

The above tab]e is als_o ca11ed diagonal difference table.


Note 1. The value Yo (first value of y) is calJed the leading term and the
differences ~Yo, 2Yo, ~3Yo, 4
y0 , .... are called th~ leading differences.
' ____::__::;_---
YI
2. i Ay1
Y2
The difference value y 2 - y 1 is written m the next column in
between y 2 and Y1.
Backward Difference Trible :
The backward differences are g1v.en m the fo11owing backward
difference table :
X y Vy
XO YO
X] YI
X2 Y2
X3 Y3
X4 Y4
xs
X6
2
Note 1. In this table y6 , th~ val1,1e of-y is ·the leading term and Vy6, V y6,
V 3y 6 , ... are leading differences. These leading differences lie along
the diagonal sloping upwards at the end.
Illustration:
X y ~y

I 4
11
2 15
,
25
3 40
45
4 85 0
71.
5 156 32
103
6 259
_ In the table, each difference is ·written midway between the values
subtracted from the previous column. In this example, the third
differences are constants and the fourth differences are zeros.
2
[!o find Yk in terms of Yo, Ay0 ; A yo, ......
k
Yk ==E Yo
=(1 +~lYo
176 Numerical Methods-IV

= (1 +kct d +kc2 d2 + ... +dk) Yo


Yk =Yo+ kc! 11.yO+ kc2 LI.\o + ... + LI.kyO (k, positive integer)
. d' value Yo aocl
Th1s forl!}ula enables us to know Yk knowing the lea mg
its differences.
In the previous illustration
Y6 =y (x =7) =Yo+ 6C1 ~Yo+ 6C2 ~2Yo + 6C3 .13Yo 5 6
+ 6C4 .14Yo + 6Cs I). Yo.+ I). Yo
6x5 6 X 5 X_i (6) + 6c4 XO+ 0 + 0
=4+6Cll)+Tc1 4)+- 6

=4+66+210+120 == 400 · 65 126,217


,+ 1 equence 2, 9, 28' '
~xamp1e 1. I' md the 7th term 01 tie s ·
.rind also find the general term.
Solution.
/::,.y 1::,.2y
X y
G__
·v
\
0 7 12
\ l .9 ,,.- 6
19 18
2 28 6
37 0
24
3 65 6
61 30
4 126
91
5 217
6 6 2 6 3 6c A4
7th term = y6 = y0 + C1 Ay0 + C2 A Yo+ C3 A Yo+ 4 Ll Yo
6 5 6
+ C5~ Yo+~ Yo
= 2 + 6(7) + 15 (12) + 20(6) + 15(0)
=2+42+ 180+ 120 =344
Yn -- Yo+ nc1 LlYo
A
+ nc2 L.lA 2Yo+ nc3 LlA 3Yo+ n C4 4
Yo+ ......
= 2 + n(7) + n (n2- 1) (12) + n (n - ~(n - 2) (6) + 0

3 2
= 2 + 7n + 6n2 - 6n + n - 3n + 2n
= n3 + 3n2 + 3n + 2
,;:-\ =(n+1)3+1
I ?'-' . _ · 3 .
\__;I ·• Y6 - ( 6 + 1) + 1 = 344 .
~r v Example 2. Find-f (x) from the table ,below. Also find f (7).

lJ x: o 1 2 3 4 s 6
f(x): -I 3 - 19 53 111 199 323
Finite Diff(!rences 177

Solutil>n. We will form the difference table


X f(x) 11/ (x)
0

2 19
34
3 53 24 0
58 6
4 111 30 0
88 6
5 199 36
124
6 323
s
d4'f(x),df(x), ...... are all zeros.
Yx=E"yo=(l+dtYo
=Yo+ xcI dyo +XC2 d2Yo + XC3 d3Yo +XC4 d4Yo + ······

= (- 1) + x (4) + x (x 1) (12) + x (x - ~(x- 2) (6) + 0

= - 1-+ 4x+ 6x2 - 6x+x3 -3x + 2x


2

f (x) = x3 + 3x
2
- 1
_ /1 ' /(7..)=7 3 +3(49)-1=489
~ ample 3. Find the first term of the series whose second and
subsequent terms are 8, 3, 0, - 1, 0, ...
Solution. Let y0 be the first term.
:. y 1 = 8, y2 = 3, y 3 = 0, etc.
The difference table is
y 1v d2y d3y d4y
u YO
I [ y1=8
-5 2
2
3
3
0 , ,l,,
-3
..-1-
2
0
0
J
2
4 -1
,., l
5 0 0 ,,'
The differences of Y1 are y 1 = 8, d y1 = - 5, t:/y I =2. > t:/yl = 0,
t:/y 1 = 0 etc.
-1
Yo= E Y1
1
= (1 +df Y1

=(l-d+d2-d3+_~4-······)y1
2 3
= Yt - dyt '+ ~ Yt - il. Y1 + ······

'
178 Numerical Methods-IV

= 8 - (- 5) + (2) - 0 + ......
= 15
A"((Exa~ple 4. Fin~ the sixth term of the sequence 8, 12, 19, 29, 4 2,, ....
tK,~ 0Solution. The difference table is
3
X y /J.y /J.2y /J. y
0 8
1 3 0
2 3 0
10
3 29 3
13
4 42
6th term= y5 =lfy0 =(1 t.L\}5y0
3
=Yo+ 5dy0 + 10L\2y0 + 10.!! .Yo + ......
= 8 + 5(4) + 10(3) + 10(0) + :..

!/.' =58
Express any value of y in term of y n and the backward
differences of y n·
We know Vyn = Yn - Yn-1
.. Yn-1=Yn-Vyn=(l-V)Yn
Similarly Yn-2 =Yn-1 - VYn-1
) = (I - V) Yn - I
= ( I -- V) ( I - V) yn

Generalising this concept,


yn - k = (I - vl yn
= (1 - kcl V + kCz.'V 2 - ...... +{- 1t Vk) Yn
-
Yn-k-Yn- kc t· vYn+ kc 2v2Yn-···· .. +(-1)kVkYn•
Example S. Find y (-1) if y (0) = 2, y (,l) = -~, · y(2) = 28, y(3) = 65, .
~-. y(4) = 126, y(5) = 217.
,_,, /
Solution. Forming the difference table,
-~ ~ - x Y Vy V2y
V O 2
7
l 9 12
19 6
2 28 18 0
37 6
3 65 24 0
61 6
4 126 30
91
5 217
Finite Differences 179
2
Vy 5 = 91, V y5 = 3~, V3y 5 = 6, V4y 5 = 0
y(-l)=Y-1 =Ys-6 ,
6 6 2 6 3 6 4
r= Ys - C1 Vys + C2 V Ys - C3 V Ys + C4 v' Ys"····
= 217 - 6(91) + 15 (30) - 20(6) + 0
= 217 - 546 +450 - 120
=667-666= 1
We can verify the value of y(O)
y(O) =::Yo= Ys- s
= Ys - set Vy5 + 5c2V2y5 - 5G V3y5 + ...
- .
= 217 - 5(91) + 10(30)- 10(6)
= 217-455+-300- 60= 2
T~ is exactly the same given value y0 = 2.
5-3. Differences of a polynomial
, Theorem. The nth differences (forward) of a polynomial of the nth
degree are constants. ·
That is, if f (x) = aoXn + a1xn- l +a/- 2 + ...... +an
Then /),_n f (x) = aon ! hn
where h is the interval of differencing.
/)..f (x) = f (x + h)- f (x)
= a0 [(x +hf-~]+ a 1 [(x + hf-1 -xn-l] + .. :... +an
= a0 [nhx"- 1 + ······] + ......
= aonhx"- 1 + terms involving powers of x less than (n - 1)
That 1s, /)../ (x) = a polynomial of degree (n - 1)
/)..2/ (x) =a0 nh [(x + hf- 1 - xn- l] + terms involving lesser degree
= aon (n - 1) h2 xn- 2 .+ terms involving degree less than (n- 2)
i.e., second difference of a polynomial of degree n is a polynomial of
n-2
d egree x .
Proceeding like this
/)..n f (x) = a0 n ! hn x0
=a0 n ! hn
Note 1. The converse of the theorem is also true.
That is, if the nth
differences of a tabulated function are constants, then the function
is a polynomial of degree n.
· 2. The (n + 1)th and higher differences of a polynomial of degree n are

.....
180 Numerical Methods-IV
3. The above proof is not rigorous. For a rigorous
proof, apply
mathematical induction.
5-4. Factorial polynomial
A factorial polynomial x(n) is defined as
x'n) =x( x-h )(x- 2h) ....(x- n-1 h)
where n is a positive integer.
(Read in) as x raised to the power n factorial)
Thus, x(I) = x, x( 2) = x (x - h), i 3>=- x (x - h)(x - 2h), .....•
etc.
Differences of x(n)
(i) tu,(n) = (x + h)'n) - X(n)
= (x + h)(x)(x - h) .... !x - (n - 2) h]
-x( x-h )(x -2h ) ...... [x- (n- I)h ]
= x (x - h)(x - 2h) .... [x - (n - 2). h] { (x + h) - (x - n
- I h)}
=x< n-1) . ;;h
= nh x(n- l)
Similarly tix(n ) = 11 [nh x<n- I)]
= (nh)(n- 1) h x<n- Z)
= n (n -1) h2 x(n-Z )
Proceeding like this, 11' in)= n (n - 1)(n - 2) ..... (n -
r + I) h' x<n - r),
where r is a positive integer and r < n.
Note 1. In particular !).n x<n> = n ! hn.
2. If h = 1, i.e., the interval of differencing
is unity, then
!).'in) = n (n - 1)(n - 2) ..... (n - r + 1) in - r) whic
h is analogous to
the differentiation of xn.
3. If h=-1, !).nx(n)=n !, and !).'in)=O if r > n. .
4; Wherever we require!).' xn, it is difficult to find !).'xn
and hence we
express x" in terms of factorial polynomial and henc
e we calculate
!).'xn.
Reciprocal factorial
The reciprocal factorial function x<- n) is
defi ned as
1
xt-n) =
(x+ h)(x+ 2h) .... (x + nh) where n is a positive integer.
Differences of a reciprocal factorial function
(i) Af(- n)= -(x+ hi-n )_X( -n)
1
= (x + 2h)(x + 3h) ...... [t + (n + l) h] - (x + h)(x + 2h) ..
....(x + nh)
Finite Differences 181

1 - .
1
= (x+h)(x+2h) ...... [x+(n+ l)h] [(x+h)-(x+n+ h)]
-nh
=----- ------
(x + h)(x + 2h) ...... [x + (n + l)h]
=(-n) hx<-<n+I))
2
(ii) A x<-n)=A(Ax-n)
= A (- nh x<- (n + 1}))
= (- nh) [- (n + 1) h] x<- (n + 2»
= (- 1)2 h2 n (n + ~) x<-(n+2))
Similarly
s·x(-IIJ=(-1),.n(n+ I)(n.+2) . ......(.ll + I·-1) X (n+r) ,,. _
.'l

Polynomial in factorial notation


Any polynomial . f (x) = llo xn + a1.xn - 1 + a2 xn - 2 + ··· + an can be
expressed in the factorial polynomial form as
A~r(n) +Al x<n - I)+ A x<n - 2) + ...... A
v-· . 2 n

Since, f(x) =A 0 in) +A 1 x<n- l) + ...... +An


= A0 x (x - h) ......(x - n - 1 h) + A 1 x(x - h) ......(x - n - 2h)
+A2f(X-h) ......~x--:n-3h)+·····+An-l x+An ... (1)
Dividing the R.H.S. of (1 ), b_y x, the remainder is An and dividing the
quotient again by x - h, the remainder is An_ 1 and then dividing the
quotient again by x - 2h, the remainder is An_ 2 etc.
Thus, dividing f (x) successively by x, x - h, x - 2h, ..... The
coefficients An, An_ 1, An_ 2, .. .. .. are got which are nothing but the
remainders off (x) in that order.
Note. If h = 1, divide f (x) successively by x, x- 1, x - 2, ... to get An, An_ i, ...
f aample 6. Express (i) x4 + 3x3 - 5x2 + 6x..:.. 7
3 2
( ii) 3x - 2x + 7X - 6
3
(iii) x +.x2+x+ 1
in factorial polynomials and get their successive forward differences,
taking h = 1.
4 3
Solution. (i) First, divide x + 3x - 5x2 + 6x - 7 successively by
x, x - 1, x - 2 ..... by synthetic division method.
0 1 3 -5 6 -7
0 0 0 0
1 1 3 -5 6 -7
1 4 -1
Numerical Methods-IV
182
2- 1 4 - 1 I 5
2 12
3 I 6 I 11
3
I 9

Therefore, factoria] polynomial is


1
f (x) = 1.x'4) + 9i >+ 11 x< >+ sx<
3 2
>- 7
2
llf(x) = 4i3>+ 21i >+ 22/~> + 5
2
112 f (x) = 12i ) + 54.x'I) + 22
A3 f (x) = 24x~I) + 54
~1/(x ) = 24
ll'f(x )=O if r>4
·(i0 Now, express q,(x) = 3x3 - 2
2x + 7x- 6 is factorial polynomial.
Using synthetic division process,
0 3 . - 2 7 -6
0 0 0
1 3 -2 7 I -6
3 1
2 3 ] I. 8
6
3 I 7

Hence, _cl>(x) = 3.x' + 1i2>+ 8x< 1>- 6 (here h = I)


3
>
2 1
Acf,(x) = 9.x' >+ l4i >+ 8
!:i2q,(x) = 18.x'I) + 14
3
A cf>(x) = 18 I I

ll'cf>(x) = 0 for r > 3 .


(iii)
0 1 ] I I
0 0 0
I I I ] I I
I 2
2 1 2 I 3
2
1 I 4

cj>{x) = i
3
> + 4x'2) + 3x' 1) + J
183
Finite Differences
2 1
Llcj>(x) = 3i >+ 8i ) + 3
1
Ll 2cj>(x) = 6i ) + 8
3
.1 cj>(x) = 6
Llr<j>(x) = 0 for r > 3
4 3 2
Aliter. (i) y = x + 3x - 5x + 6x- 7 can be written as
3 2
y=x +3x -5x +6x-7 =Ax( x- l)(x-2 )(x-3) +Bx(x - l)(x-2 )
4

+ Cx(x- 1) +Dx+ E
1
= Ai4) + Bi3) + Ci2) + Dx' ) + E
Put x =0 ; E =- 7
Put x = 1 ; D + E = - 2 :. D = ~
Put x= 2 ; 2C+ 2D+E = 16+ 24-20 + 12-7; C= 11
Put x = 3 ; 6B + 6C + 3D + E = 81 + 8 I - 45 + 18 ~ 7
6B=:5 4; B=9
3
Equate · coefficient of x on both sides; A = 1
:. y = X(4) + 9}3) + 1li ) + 5x' ) - 7
2 1

3 2 1
(ii) 4>(x) = 3x - 2x + 7x- 6 = A} ) + Bi ) + ci >+ D
3 2

=Ax( x-l)(x -2)+B x(x- l)+Cx +D


Put x =O; D =- 6
Put x = 1; C + D = 2 ; C = 8
Put x=2; 2B+2 C+D= 24-8+ 14-6 :. B=7
3
Equate x coefficients on both sides; A :;13
2 1
. (j>(x) = 3i3). + 7x( ) + 8x' ) - 6
(iii) Similarly,
3 2
cp(x) =x3 +x2 +x+ 1 =Ai ) + Bx< J +Ci~) + D
=x'3) +4x'2) + 3x'l} + 1
Example 7. Find the forward differences of
C) 1 C") 1
l x (x + 4) (x·+ 8) · u ,'(3x + 1)(3x + 4)(3x + 7)

Solution. (i) y= ( 4~( s)'= (x, - 4l-J) where h=4


x x+ x+ .
4
Lly = (- 3)(4)(x -4}'- )
5
Ll2y = (- 3) (- 4)(4)\x - 4/- )
192
=----------
x (x + 4)(x + 8)(x + 12)(x + 16)

(ii) ( l 1
f x)= (3x+ 1)(3x+ 4)(3x+ 8)' if h=
184 Numerical Methods-IV

= 3l(x+n(x+; (x+;J
=;7(x-n-l)
t,f(x)= ; r
(-3)( x- ~ since h= l

x-; r
1

2/(x)= (-3~~-4) (

'(x+ !J(x+ nx+ ;J( x+ ~o)


4 I

=9
108
--
= - - - - - - - - - -x+ 13)
(3x+ 1)(3x+4)(3x+7)(3x+ 10)(3
Example 8. Find !!..3 f (x) if
\ , (i) f (x) = (3x + I )(3x + 4)(3x + 7) ... ...(3x + 19)
(ii) f (x) = x (3x + J)(3JQ + 4) ......(3x + 19)
(i) Solution. f (x) = (3x + 1)(3x + 4)(3x + 7) ......(3x + 19)
(contains 7 factors)

=3
7
( x+ !)( x+¾ }···{x+ ~ J
7
19J( )
=37( x+-
3

r~
6( I: r
df(x) =37(7 )(x+

2 7

r
8 /(x) = 3 X7X x+

3 7
8 f(x) =3 x7 ,x 6 x5 x( x+ ~
3
= 3 x 7 x 6 x'5 (3x+ 19)(3x+ 16)(3x+ 13)(3x+ 10)
(ii) f (x) = x (3x + J)(3x + 4) ..•·...(3x + 19)

= ! (3x--1 + 21(3'x +· 1)(3x + 4) ...... ox + 19)


1
2}(3x + 1)(3x + 4) ......(3x + 19)
=
3 (3x -
2
+ (3x+ 1)(3x +4) ...(3x+ 19)
3
Finite Differenc·es 185

=-1·3 s ( x- -
3 , . 32 )(
x+ -1
3 J( -.+ -43 J..... .( + 319 J·.
X X . . '.

:t32 · 37-( x+3JJ( x+3 ······ x+ 3


4) - '( 19 \ j
(8) ( (7)

' =37x
(
+: ) +2 -3 6x +: )
7 6
19 )( ) , ( )( )

4{(x)-3
1
x8 x ( x+ 3 +2-36-7 .x +:
6
7 .( 19 J( ) 6 ( 19 J(S)
etc.
,
2
Af (x) =3 ·8·7 x1 +2 ·3 ·7·6 x+
3 3
7 in terms of factorial
xample 9. Express f (x) = x - 31 + 5x +,
3
~
erences. -
pol yno mia l taking h = 2 and find its diff
Solution. . . . . . '
3
Le tf( x) =x - 3x +,s x·+ 7 =A
2
. x(x
.:. h)( x- 2h) + Bx (x- h) + Cx + D .

=A x (x- 2)( x-~ ) +B x(x -2) . + ,


Cx+ D
Set x= O; D= 7 /

Put x = 2 ; 2C + D 8 - 12 + =
10 + 7 ; :. 2C = 6. Hence, C = 3 I
l

C+ D= 64 -48 .+2 0+ 7 :. 8B =2 4. Hence B = 3


Put x= 4; 8B +4
3 s~A = 1.--
Comparing coefficients of x on both side
2
) + 1,' where h = 2
f(x ) =x - 3x + Sx+ 7 =i >+3i >+ 3x'J
3 2 3
:.
2
Af( x) = 3h i >+_6hx<o + 3h = 6i >+ l~O
2 >+6 ,
=6 (x) (x- 2)+ 12 x+ 6= 6r+ .6 • ·
2 1
2 0 (x + 1)
_A'i (x) = 6h x >+ 6h = 24x< >+ 24 = 24
3
A f(x )=2 4'h =4 8; tlf( x)= O if n> 3
_
Aliter : Synthetic division method.
_x, x - 2, x - 4, ...... _~
Divide by x, x - h, x - 2h, ...... _etc. i.e.,
1 -3 5 7.
0
0 o. 0
2 1 -3 5 .I 7
2 -2
4 1 - I I 3
4
I 3 l
0+7 where h = 2
Hence ' x - ,3x + Sx + 7 = i >+ 3i >+ 3i
2 3 2
3
'

Standard Results
Prove: _(i) A[ / (x) g (x)] =f(x + h) Ag (x)
+ g (x) t,/( x)
186
Numerical Methods-JV

(ii) fl[@]=g (x)


g (x) /lf(x)-f(x) Ilg (x)
g (x + h) g (x)
Proot fl [f (x) g (x)] =f (x + h) g (x + h)- f (x) g (x)
= [f (x + h) g (x + h)- f (x + h) g (x)]
+ [f (x + h) g (x) - f (x) g (x)]
= f (x + h) [g (x + h) - g (x)] + g (x) [f (x + h) - f (x)]
= f (x + h) Ag (x) + g (x) Af (x).
(ii) A[f(x) ]=f(x+h) ._f(x)
g (x) g (x+h) g (x)
f (x + h) g (x)- g (x + h}f (x)
=
g (x+ h) g (x)
f(x + h) g (x)-,f(x) g (x) +f (x) g (x)- g (x+ h)f(x)
· g (x + h) g (x)
g (x) [f (x+ h)-f (x)] -f (x) [g (x + h)- g (x)]
=
· g (x + h) g (x)
g (x) Af (x)- f(x) Ag (x)
=
g (x+ h) g (x)
Example 10. Evaluate (i) dn (eax+h), (it) dn [sin (ax+ b)],
(iii) dn [cos (ax+ b)] (v) d [log (ax+ b)] dn (ix: c), (vz) d log/ (x),
(vii) d (tan- 1x)·
Solution. (i) d (eax+b) = ea(x+h)+h - eax+h = eax+h (eah - 1)
' I

d2 (eax+b) = (lh __ l) d (eax+b) =(ea~_ l)2 eax+h


· 'I arly
S1m1 uAn ( eax + h) = eax + h . (eah - l )n .
Note. Prove by mathematical induction. The above proof is not rigorous.
(ii) d [sin (ax+ b)] = sin [a (x + h) + b] - sin (ax+ b)

=2cos ax+b+ ah sm ah J.
( 1 2
. ah. (1t
= 2 sm-sm -+ax+ bah]
+-
2 2 2

. ( ax+ b + 1t
. ah · sm
= 2 sm
2
+ah J
2

,i.
2
sin (ax+ b) = 2 sin~ il. [ sin ( ax+ b + 1t ~ah J]
=( 2 sin a; J- sin [ ax+b +2 ( 1t ~ah)]
Finite Diffe.r..ences 187

Similarly proceeding,

An
L.l
• (
sm ax+ b) = ( 2 srn
. 2ah'.Jn,•sm
. ( ~ + b + n(1t+ah)
2 J. ·
(iii) fl [cos (ax+ b)] = cos (ax+ ah+ b) - cos (ax+ b) ·

=-2 sin ax+ b+ ah sin ah


( 2
J' 2
=2Si: ~cos'(; +..::+b+ a;)
=2sin.~ cos(ax+b/ 1t~ah)
2
A [cos (ax+

Proceeding like this,


b); = ( 2 sin a;
-
r ~o~ ( OX+ b~ 2 (It ;ah) )
1
• '

l;
I •
n . \'

A" cos (ax+ b) = ( 2 sin a; Jco{axt I,+ Q (_It; ah)


(iv) fl [log (ax+ b)] = log (ax+ ph + b) - log (ax+ b)
.:_ [· ax + dh -f- b ] ·-
- log .b
ax+
. ah ]
= l~g [ I + ax +ib .1 i •

= lo [
-g
1+/l(ax+
· ax +·b
b)'.] . -
• I

(v) /l(ahx+c)=ah(x+h)+c_ahx+c: ·
' .

/
=a
hx + c ( hh .
a -
1)
/J,.2 (ahx+ c) = ahx+ c ( ahh _ 1)2 .

fl n ( ahx + c) =ahx + c ( ahh _ 1 t .,


(vi) /l log/ (x) = log/ (x + h) - log/ (x)
_ [f(x+h)]- • [Ef(x)]
- log f (x) - log f (x)
f (x) + flf (x) ]
= log [ f(x)

flf(x)]
= log [ I_+ f (x)

(vii) !:J. (tan- 1x) = tan- 1 (x + h)- tan- 1 x


-1 (x + h) -x
=tan
1 +x(x+h)
188 Numerical Methods-IV

h . 1[
= tan- ]
. l+x~ +~
3
__ .Aam ple 11. Evaluate (i) fl (e x log _2x), (ii) fl (x sin x) (iii) fl (xe-') 11

(iv) A(~) (v)A( si:2x) ,


3
· Solution. (i)fl (e3x. log 2x) = e <x+h)A log 2x + log 2x fl (e x)
3
·
3
= e3(x+h)_ log (I+~ ) )+ log 2.x. e ' (elh -1) ·.

=e'
3 3
[ e h log ( I+ ~ )+ (e3h - I) Jog (2.x)]

(ii) fl (x sin x) = (x + h) fl (sinx) + sin x. A (x)


1t +h ) h .
·. ( x + 2
. h • sm
_ ~ (x + h),· 2 sm + sm x
2
( iii) A (x ex) = (x + h) A ff + l fl (x)
•I
= (x +.h) ex (i-1) + ex.h
(iv) a(r)~ x!~(2 :,~2X A(x!)
x! (x+ h) ! x !
. _ X ! 2' (2n - 1) - 2x . [(x + h) ! - X !]
- (x + h) ! x !
If h = 1, then
A 2x)=x !2x-2 x.x.x! =:i-t(l -x)
x! (x + 1) ! x ! (x + 1) !
r' x ) sin 2x A (x) - x A sin 2x
(v) A · sin 2x = sin (2x + 2h) sin 2x
1t+2h
\ h sin 2x - x (2 sin h) sin 2x + 2
' ·
=- --- --- --- --
sin (2x + 2h). sin 2x
X3Dlple 12. Evaluate: (i) A (J - x)(J - 2x)(J ~ Jx) if h = I
3
~
, J- 10
(ii) A (1-x)( l -2x)(l -_3x) ......(1- l<k) takmg h = 1
' (iii) A [(1 - x).fl ~ 2x )(1 - 3x3)(1 -4x4) if h = 2
10 2 .
3
Solution. (i) A (1 ~ x)(l -2x)(l - 3x) = A [- 6.x3 + tenns oflesser powers]
3

=(-6) 3!+0= -36


10 10
(ii) A (1 -x)(l - 2x) ......{l -10x) = A [10 ! x + terms involving
10

lesser degreel
2'
= 10 ! 10 ! + 0 = (10 !)
· (iii) A [(1 - x){l ~ 2x2)(1 - 3x3)(1- 4x4)]
10

= ~ [24x + terms of iesser degree]


10 10
Finite Differences 189

= 24 (10 !) i1° + 0, since tl (a~ n) =iao n ! hn


=24 (10 !) 2~ 8
Example 13. Prov:( ~ }•:::; = e', taking h as the interval of .
differencing .

Solution. ( t:,.2 )ex• E (¢) = (E-1!:,.2) ex. E,(ex)


. E t:,.2(ex) . J.2(ex)
x+h
= (E =-1)(l:,.2ex). e ,
ex(i-1)2
h
= E -i [ tr (i - 1)2] · e
(i-1)2
h
=ex-h. (i- 1)2 e =ex
(i-})2 ~
. !:,._2 !:,._ UX
Example 14. Prove
1
. (
E ) ux ';/; Eux
2
[MS. Nov., 1991]

Solution. Now, ( f },= (i 2 1


E- ) u,

=[(E- 1)2 E- 1] ux
=[f-2+E - 1] ux

= Ux+h - 2ux + ux·-h ... (l,f


uA2ux (E- 1)2Ux (£2-2E+
- - - - - - - - - - -1) -
ux Ux+ 2h-2ux+h+u x
------- ..-.(2)
Eux "x+h Ux+h ·
i .
From (I) and (2), . the right hand sides of (1) and (2) are not equal.

Therefore, ( ~ ) u,,. !:: V '

Example 15. Prove the results: E .tr . . . ~ -. V~.


112
(i) ·EV=f:..=V E (ii) 5E =t:,. - - - - ~
(iii) hD = log (1 + t:,.) = - log (1 - V) = sinh-1 (µ5)
(iv)

(vi)

(viii) (ix) Vt:..= t:..:.... V = 52

(x) (1 + t:..){i - V) = 1 (xi) µ5 = ½(t:.. + V)


190 Numerical Methods'-IV

• . , I - ?+~ . I l 2
\ X!I) ~l -- 2- r. = '\/ l + - 8
\II+~ 4
Note ff o prove above results, el{pr~ss each in terms of E I ,
' . . i

Solu ionJi { ) ~ E (Vu)= E (ux - "x-h)


I ..., "' t ,
~
I

=Eux- E ux-h
. I
. ·=~uX-
:.~ ~\
Also (VE) ux = V (Eux) = Vu;+h
' '
= !!J.uX
VE= !!J.
Hence EV =/!J. =VE
( ll.. ),_ u
~E112 - ~
Ux = uU h
x+-
2

= (E 112 - E- 112) U h
x+-2
=fluX
:. 8E112 = fl
Note. Hereafter, the operand ux may be dropped and algebra of operators
may be used.
( iii) We have proved already, E = i0
: . iD = E = 1+ fl
Taking logarithm, ·
hD log e = log· (l + fl)
. 'hD = log (1 + fl)
--
Also, V = 1 - E- 1
· : •• IT 1 = I - V
... (i)
I •

'
.
ke., e-hD = 1 - n
v
.' - 1
Talcihg logarithm, '' -_hD = log (1 - V)
hD=-l og(l-V ) ____ _
sinh (hD) =e - e
hD -hD 'E
= -
E !...) , (
=
El/2
~ +E
-1/2 J(E 112 - IT 112)
2 , 2 2
; I =µ8
hD = sinh- 1 (µ8)
I
1/2 2
._ 1/2 ] . , , . . l
-(iv) 1 + µ~02 = t" + E +2E (E112 _ E•- tl2)2
(
Finite Differences 191

= ~ (~112 _ E-112) [£112 - _E- 1~2_+ £112 + E-112]


I

=~ X 2 [E 1/2 - K" l/2i E~/2

=E-l=A
(ix) VA=(l-E - 1)(E-,l')=E +E- 1 -2=(E 112 -E- 112)2=r/-
A- V = (E- 1) - (1 - E- 1) = E + E- 1 - 2 = 62
(x) (1 + A)(l - V) =E.E -t =1 l '

(xi) ~ (A+ V) = ~ [E- 1 + 1 - E-i] = ~ (E - E _,) = µ6


192 · Numerical Methods-IV

(xii)
2 + A 1+ E 1 [E L'112 + El/2] - µ
· =-=- - .
2✓ 1 +,A 21£ 2 · 1

--• ~= .!. ✓ 4 + (E;12 E' - 112)2+


~1 +4~~
2 . .
= l ✓-(El/2 +E- 1/2)2
2 ;
; _!_ (£112 + E - _112) = µ
2
·Example 16. Given y =2, Y4 =- Q, Ys =8, Y6 =9
3 and Y1 = 17,
4
calculate A y3. ' ! .
. , . . · L .l • · ,

Solution. A4y = (E - 1)4y ={f f - 4E,+6E - 4E + 1) Y32


3 3

_. · ~ giY3 -4E y3 ~ '6E'y3'- - 4~}'3 + Y3 , .~


= Y1-4Y6 + 6y5 .:..4y4 + Y3
I I .
= 17. -4(9 ) + 6(8)--4(:... 6)+ 2 = 55
Example _17. Find _y6 if y = 9, y =-i8,,y = io, y = 24_
0 1 2 3 giv~n that· the
· third differences are constants.- - : . ·~ ., . · ~.
'
Solutio~. Since third differences are constants,,: 4 5 6
1d y0 = .l!!. Yo = I!!. Yo= 0
' \ '

Y6 = E'Yo5 (1 + d)6Yo ·
1

_ 6
= ( 1+ C1b.+ 6C2 b.-2-~ ·-Cj
6 3 6
t .+ C4 u_+
A4 6c A5 A6 )
5u +u Yo .
= (1 + 6/!!. + 15/!!.2 + 201!!.3) y0 ~ince· other terms vanish.
= [1 + 6(£ -1) + 15( £- 1)2+ 20 (E- 1)3] Yo .,
= (1 +·oE- 6+ 15E - 30£ + ·1s +·20£3...:. 60E' + 60E
- 20) Yo
= [-1 0+ 36E .- 45£2+ 20E] Yo .
= - ·10y0 + 36y1 -45 y2 + 20y
3
=-1 0(9 ) + 36(18) ~ 45(20) + 20(24). ..
=-9 0+ 648 -90 0+ 480
= 112 8-9 90= 138 'I

Hlat. You can form forward difference table and use


the values of
Ayo, 4 1Yo, 4 3y0, ;·:··· to get _the ,resµlt. '. '
Example' 18. From ·th1/following ·table, find th_e missing
value.
X 2 3 4 5 .6
· · . f (x) 45-0 49•2 54·1 ,\ · 67·4
· Solution. Since only four values off (x) are given,
we assume that
the polynomial which fits th~_data, that is, collactio
n polynomial,. is of
degree three. ,.
· Hence fourth differences are zeros.
Fini~e Differences 193 /

i.e., A y0 =0
4
:. (E- 1)4y0 =O
2
i.e., (£4-4F :+6E ...;.4E+1)y0 =0
, Y4 -4y3 + 6y2 -4y1+Y o70 where Yo= 45·0
67·4-4y 3 + 6(54-1) -4(49•2 ) t 45-0 = 0
4y3 = 2402 :. y3 = 60-05
Missing term is 60-05. '
. Exampl~ timate the productiq_n for 1964 and 1966from the
following data :
Year 1961 1962
., 1963 · 1964 1965 1966 1967
Production 200 220 260 350 430
Solution. Since five values are given, collacation polynomial is of
5 ·
degree four. ~ence tl y K = 0
i.e., . (E- l)5yK = 0
(Jf-5£4 + l0F:-1 0E2+5 E--1)yK =0
Ys -5y4 + l0y3 - 10y2 + 5y 1 - Yo= 0, taking K = 0
-Ys - 5(350) + 10y3 - 10(260) + 5(220) - 2003 0 .
i.e., y 5 + l0y3 = 3450 ...(I)'
Taking K= 1,
Y6 - 5y5·+ 'lOy4 - lOy3 + Sy2 ~Yi= 0
430 - 5y5 + 10(350) - 10y3 + 5(260) ~ 220 ~'O
5y5 + .i0y3 = 5010 ... (2)

Solving for y3, y 5 from (1) and (2), y 3 = 306, y~ 390 .


~nee missing,,,values are 306 and 390. ·
Example. ,_o( Find the m.issing term in .the following :
X : 1 2 3 4 _5 6 7
y : 2 8
4 32 . 64 t28
Solution. There are 6 given values. We can have a unique fifth ' ·
degree polynomial to satisfy the data.
·Hence, A6y0 o ·· =
6 .
(E- l) y0 =0
(If-6I f + i5t'-2 0f: + 15£2-6 E+ l) Yo= 0
y6 - 6y5 + l5y4 - 20y3 + 15y2 - 6y 1 +Yo= 0
128 - 6(64) + 15(32) - 20y3 + 15(8)-6 (4) + 2 = 0
:. 20y3 = 322. Hence~ y3 = 16-1
Missing value is 16· 1
t
6
Interpolation
(For Equal Intervals)

6-1. ·1utroduction
• I •

Interpolation has been described as the art of reading between the


· line of a table and in elementary mathematics, it means the process of
computing intermediate values of a function from a given set of'1abular
values of the function. Suppose the following table represents set of a
corresponding v~lues of x and y.
. ' '
X : Xo X] ... , Xn
y ; Yo Y1 Y3 ... , Yn
Now, we require the value of y = Y; corresponding to a value _x = X;,
where x0 < X; .< xn-
Extrapolation is .used to denote the process of finding the values
outside the interval (x0 , xn). But, ip' general, the word interpolation is used
.

in both ·proce~ses. , .,
Let y=f(x) be the function taking the values y0,y 1, ••• , Yn
corresponding to x =Xo, x1, ... , xn. 'In other words, Y; = f (x;), i = 0, I, 2, ... ,. n.
J

If f (x) is known, the value of y can be c~lculated for any x. But in many
cases we have to find y = f (x) such that Y; = f (x;), from the given table.
This is-not easy because there are infinity· of functions y = <j>(x) such that
Y; = <j>(x;), Hence, from the table, we cannot find a unique (j>(x) such that
y = ~(x) satisfies the set of values given in the table above. Of the
sequence of functions {(j>(x)}, there is a unique nth degree .polynomi~l
PnCx) such that Y; =PnCx;), i = 0, I, 2, ... , n. (Refer Fig. 1).
. .

The function q>(x) is called interpolating function or smoothing


. function or interpolating formula. · .
. This polynomial function PnCx) may be taken as an interpolating
I. .
polyno1_nial or colloca~on po~n_omia.l _:here . .
. Y; -J(x;) -P;.(x;), i -0, 1, 2, ... , n.
Other types of approximating function may be taken suitable for
209
210 Numerical Methods-n

y
y=cl> (x)

, Yn)
- y=P n

y= f (x)

X
0
Fig. _I . - .
different purposes. In this chapter, we will be mostly concerned with the
polynomial interpolations only.
Polynomial interpolation 1s mostly preferred bec;ause l of the
foll~wing reasons: ,
1. They are simple fqnns of functions which can be easily manipulated.
2. Computations for definite values of the argument, integ_ration and
differentiation of such functions, are easy.
3. Polynomials are free from singularities whereas rational
functions ·or other types, do have singularities. '
The basis of finding such collocation polynomial is the fact that
there is exactly only one collocation polynomial PnCx) of degree n such
that the values of P,i(x) at x0 , Xi, x2, ... , xn coincide with the given
functional values y0 , Yi, y 2, ... , Yn· He;e, · i'nCx) is ~alled polynomial
approximation to f (x) . We shall see below a few of the methods of finding
1
such interpolating -polynomials. ' • •

6-la. Linear interpolation ~r. ~ethod of _proportion~~ p_a r~


The simplest - ~f all .i nte.rpo.fations is t_h e ca's e . in which the
interpolating polynomial is linear. Let us assume that t:,e set of values of
X and y are as given below: - ' '
-X Xe XJ X2 . X3 ... , Xn.

y Yo - YI Y2 Y3 ... , Yn
Now we requ~re the value of y corresponding to Xk which lies
between Xr and x,+ J•
. . .
We will assume the polynomial to be linear. (i.e. st. line)
.h . . . y-y, Y,+1-Y,
T e 1rne equat10n 1s - -
x - x, x,+ 1 -.x,

Y,+1-Y,J -
:. Yk=y,+ x,+
( ,-x,
1
.
(xk-x,) gives the
, , vaIue _o f y at x=xk,
Xr<xk<X,+ 1•
In'tirpolation 211
(Xr+1'-'r+1
V ) • '•
This method may be y
sucGessful · if the difference
between s-t1cceeding pairs of
values of the variables are I

small
i'
and regular. But, if the
intervals between the two pairs
of values
I
are

large, and I

inegular, this method of - - - + - - - - - 4_ _ _,.__ __.._ _

simple proportion cannot be O


x, xk x,. 1 x
used without largo/error. . . Fig. 2
Exampl~\I( ·Using the method of proportional pd,find y at
x =0-5, x =0-7'5, given the following table. · ·
X
y :
:
I
''O
2
l '3
J 2
12
5
147

l t.
SOUIOn. ·· Yk=y,+ (yr+ ,I -:- Y') (Xk-X,J·
., ,
x,+ 1 -x, . .

y (O·St= 2 + ( -
3 2) (0-·5 - 0) = 2-5
_ . (1-0) _ .·. I, __ .

Yco-15) :' 2+ \~ = c0:15 . :. oJ =2-~5


1 , r
~i t J ..

6·2. Gregory-Newton forward interpolation formula or Newton's


forward interpolatiqn forll!ula (for. equal intervals) ··1 ·, ' ,, 1

:, . Let ,y =J,(x\ denote a function which takes the values Yo, y 1, . .. , y11
' I. ' ' I .J J J..,
,, ) ', - . ' . '
corresponding to the values x0 , x 1, ... , x11 respectively of x. \ ·
I ' I
Let us suppose that -!he value~.,pf) x viz. x0 , x1, ••. , x11 are ·equidistant.
\ .
. X; - X; _ I -- h , for l. -- I , 2 , ...·, n.
Th at lS, '" "'
Therefore, r X; = Xo + h, X2 = Xo + 2h, etc.
X; =x0 + ih, i .= 1·, 2, ... , n.
Let P n(x) be a po~ynoriia1 of the_ r,th de~r~e m x such that
Y; ,=J(x()=.PnCx;), i=q, l,}., ... ,,n. 1

Let us assume P11(x) in the form givn below


p nCx) = ao + ai (x - Xo)°) + a2 (:X - x,i2) + ... +a, (x,..;J_xc/:> -t ... '
. '
+ ·.. + an (x - x0ln). . .. (1)
The (n + 1) unknowns a0 , a 1, a 2, ... , an can be found as follows.
Pn (x0) =Yo= a0 (setting x = Xo in (1))
t{ P 11 (x) = a, r ! h' + terms involving (x- x0) as a factor. ... (2)
(Since the first r terms vanish) .
212 . Numerical Methods-/1,I

Setting x = x0 in (2),
. h ther terms in (2) vanish)
fl.r pn (xo) =arr ! h' (Smee t eo

l.e., Li' y0 = a, r ! hr
... (3)
1 Ar
Hence a, = --, L.l Yo
rlh
. . we et the values of a1' az, ... , an·
Putting r ::; 1, 2, 3, ... , n m (3), g
Therefore,

... (4)

---=

=iP>, (here h =1) and x =x0 + uh . _


') u... t v.-d •..( tA--tr~
using in (4), . - vl l. tA- ·

J
(1) (2) (r)
u 0 0 tl .
(x) =P0 (Xo +uh)= Yo _
2
+ l! Li Yo+ 2! A Yo+···+ r ! Yo+
·_ . u<n) n
+ ... +-, A Yo· ... (5)
n.
where u<r:> = u (u - 1)(u- 2) .. ,,(u -r-- 1)
(If X is given, u is found out).
~quation 1(5) is known .as Gregory-Newton forward interpola6on
formula. ·
Aliter. We can a1so__pr-ove1he above formula using symbolic operat01
methods.
PnCx) = PnCx0 +uh)= Eu PnCx0 ).;; Euy0
= (1 + AtYo
Interpolation 213

where u = - ~ ·
x-.xo
h
. .I -
1
If y (x) is a polynomial of nth d ~ An+ y0 , ... are ~ero. Hence
· ·· •
0
(1) · . .p>- . 1 • (n) ·

. ·' ::_ p n(x) = Po(~+uh) =Yo+ 1! A Yo+ 2! A2Yo+ ... + :! Any& -


,
1
Note 1. The first two terms will give the linear interpolation and_the first
three termsI will. give
I
a parabolic

interpolation

and so on. ·
2. Since this formula involves forward differences of Yo, we call it
Newton's forward interpolation fo)lllula. 'Since this involves the
forward differences of Yo, this_is used to interpolate the values of y
{ij · nearer to the beginning value of the table. .
l'1 3._ This is applicable only 1if the interval of -differencing h is constant.
regory-Newton Backward Interpolation Formula. ,
. \ .

l. (for:- equal inte'rv<Jls) . i · •

Newton's forward ·interpolation formula car.mot be. used for inter-


•. polating a value of y nearer to the end of the table ·of values. For this
purpose, we get ~nother backwid •i~terpolation formula. , .
Suppose y = f (x) takes the vatu.es_y0, y1, ... ,yn corresponding to the
values x0 , .'x 1, ... , xn of x. ,:

Let xi - xi- l =h for i = I, 2, ... , n. (equal intervals)


:. xi=x0 + ih, {= 0, 1, 2, ... ,··n. 1 ·· -- -
Now, we want to find a collocatio~ poly~omial Pix) of degree n in
. .
x such that

Let I .
PnCx) = a0 + a1 (x- xn) +a2 (x-xJ(x -xn_ 1) + ;..
. + a, (x - xn)(x - Xn _ 1) ... · (x :- Xn -:- , + 1) + .. ·
+an (x-~n)(x-xn_ 1) ... (x-x1) ... (1)

Since Xn-t =xn-h, x~_ 2 =xn ~ 2h; ... ,xn-r+l =xn-(r- l)h
x1 = xn - (n t) h, wehave
PnCx) = ao-+.-a 1 (x-:- xn)+ ai (x ·".'" xn)(x - xn + h)
+ ll:J (x-xn)(x-xn + h)(x-xn + 2h) + ···
214 Numerical Methods-11;

Pn (x) = ao + a 1 (x - xn)°> + az (x- xn + h)' 2>+ a3 (x - xn + 2h)'


3
)

-
+a,(x-xn+r-1 -h)<n>•
hf>+· .. +an(x-xn+n-1 ·- -(2)
We shall find a0, a,, ... , an such that Pn (x;) = Y;•
Since V =E- 1 ~.
V' (x - a)(m) = E - '~, (x - aim>
. r( )(m - r)]
=r' [ m (m- l)(m-2) •·· (m-r+ I) h x-a
r h )(m -r) •
= m (m- l)(m-2)···(m- r+ 1) h (x- r -a if rs; 111 _
.. .(3)
x - xn is a factor in all terms of RHS of (2) except in a0 .
Putting x=xn in (2),
Pn (xn) = Yn = Go
operating (2) by V', using (3),
V' Pn (x) = 0 + O+ •·· + O+ a, r ! h' + (r + l).r.(r- 1) ··· 2h' a,+ )'(x- xn/ 1>
+ terms involving (x - xn) as a factor.
Setting x = xn in this,
V' Pn (xn) = V' Yn = a, r ! h'. since other terms vanish.
1
1 = --V'y ... (4)
r r .I h' n

where r= 1, 2, ... , n.
Putting the values of a0, a,, ... an in (2), we get
(x-x P) (x-x +h)'2>
Pn(x)=yn+ n Vy+ n V2y +····
I! h n 2! h2 n

(x - xn + r- 1 h)'') (x - x + n - 1 h)(n)
+ - - - -r- - V ' Yn + ... + ll
n , vn .Yn ... (5)
r. h
I n!h
x-x
Let h n = v ; hence x = xn + vh

(x-xn+r-1 h)(r) · (vh+r-1 h)") -


Then - - - - - - = - ----'---=(v+r- I)(r)
h' h'
Therefore, (5) becomes,
- . , - v(J) . (v + 1)(2) 2
Pn(X)-Pn(xn+vh)-Yn+ I! Vyn+ V Yn+· ··
21
(v+r- If) , (v+n- l)(n) n
+ ------'-- Vy + ···+ - - ~ - Vy.
r! n n! n
Jnte rpolation 215

_ _ ..!. v(v+l) 2
. . P0 (x}- Pn (xn + v~)-Yn; 1! Vy,n+ ! V Yn
2

1

+ v (v + l)(v + 2) V3y + ... + v (v + l)(v + 2) ··· (v + n -1) V~ Y ... (6)


3! .. n . .· D! .- n
Equation (6) is known as Gregory-Newton bq,ckward difference
interpolati(!n formula . . ·' 1
,

Aliter. We. can also derive the above formula by symbolic Qperator
me'thods. ' · ,·
• I ' I '

Pn(x)=Pn(xn+vh)=Ev Pn(xn)
v.r
' ' ' I

1
= (1- VfvYn since E = (1 -
' '
n v (v+ 1) n2 v (v+ l)(v+2) n3
= [ 1 + V V + - 21 ,• - V• '+ V + ·•' ] yn
'
I
. ,131. . "

. _ q- . _ V (v ·+ 1) 2 l"
Pn(x)-~)-Yn+vVyn+ . 2! · ,. '
,, • . + v (v 3!' + 1) VJYn.+ ... ' .. .(7)
, + l)(v
x-x0
where V;::
. h '•
Note 1. Since the formula involves the backward difference operator, it is
named as backward interpolation formula. '
2. )ltis i,s used to interpolate the values of y nearer to the end of a set
tabular values. This may-also be'·used to extrapolate closer 'to the
rightofyn. · ,- - - - ·- - - --
6·4. Error in polynomial interpolation -·- -
If y = f (x) is the exact curve and y = Pn (x) 1s the interpolating
polynomial curve, the error in polynomial · interpolation is
(x -.x:o)(x-x 1) ··: (x - xn)j<n+ l)(c)
Error =f (~)-Pn (x) = · · (n + l)! ·.

for any x where x0 < x < xn and x0 < c < x 11 •

6~. Error in Newton's forward interpolation formula


n
~rror = /'( x ) - Pn ( x ) = -------...:..h
11(u-l)(u-2) ... (u-n) n+l n ' I
f · (c)
(n+l)! · ,
X-Xo
where u= h

6-6. Error in Newton's backward interpolation formula


Error = y (x) - Pn (x)

=/( )-P ( )=v(v+l)(v+2)···(v+n)_ hn+I n+I


x n x (n+l)! y (c)
iterpolation With Unequal Intervals 271.

10. Find the pressure of steam at 142°C using Newton's general formula
Temp °C: 140 1'50 , 160, 1• ,, 170 180
Pressure kgf/cm2 : 3·685 1 4-854 6-302 8-076 · 10-225
(B.Sc. BR. Nov. 94)
\ \ f '

11. Obtain the ".a,lue of log 10 656 giv~n. log 10 654 = 2-8156, log10 658 = 2-8182,
1
I r 1'
1og10 659 = 2·8189 and log 10 666 = 2-~202.
12. Ftnd y (x = 5-60275) from the table.
X: 5•600 ' I 5•602 - 5•605 1 · 5-607 '
1 5-608
y :- ·0 ~77556588 0-77682686 1 0-77871.250 0-77996571 0-78059114
13. Grven the data, find f (x) as a polynomial of degree ·2. · , ,
x: 1 2 . , 4 1 ,
1
,

f(x): 3 · I' !· I
-5•· . 4
14. Find a pol.,nomial f (x) of lowest degree which takes the values 3, 7, 9_and
19 when x = 2, 4, 5, 10.
15. Find log 10 323-5 given _. I

321·0
X: , 322·8~ 32412 1 ' , 11
. I325•0
log10 x: 2-50651 2·50893 2-51081 2•51188
16. From the following table find f (5).
x: 0 I 3 ,'J, ' 6.
f(x): I 4 88 · 1309
17. Using divided difference table, ·fipd f (x)" w,hich ~a1<-fs the values 1, 4, 40, 85
as x = 0, 1, 3, 4.
18. Find
4
! f(x) if f (x) =x (x + l)(x + 2)(x +.3).
19. Find the function y (x) 'in powers of (x·- f) given
y(0)=8,y(l)=ll,y(4)=68:y(5)=123. , ,, . JL

20. If f (x) = u (x) v (x), show that ,


, Xt) = U (XQ) V (XQ, X1) + U. (XQ, X1) V (i1),
Lagrange's interpolatio~ formula (for unequ_al intervals)
The forward and backward ii:iterpolation ,formulae of Newton can be
used · only when the values of independe~t variable x are equally spaced.
Further, the differences must become ultimately small. In cases, where the
v~lues of independen·t variable aie not:equaily spac~d and in cases when
the differences of ,dependent · variable · are not small, ultimately, we will
use Lagrange's interpolation formula.
Let y = f (x) be a function such that
f (x) takes the values Yo, Yi, y2, ... y"' corresponding to
x =Xo, x1, x2, .•. x". That is, Yi= f (xi), i =0, 1, 2, ... n.
N()w, there are (n + 1) paired values (xi, Yi), i = 0, 1, 2, ... n and hence
f (x) can be represented by a polynomial function of degree n in x.
Numerical Meth
272 0~

We will select that I (x) as fo1Iows.


f(x) =ao (x-x1) (x-Xz) ... (x-xn)
+ a1 (x - Xo) (x - Xz) (x - X3) ... (x -..xn)
+ az (x -xo) (x-x1) (x-x3) (x -x4) ... (x -x,J + ...
+ a; (x - x0) (x - x 1) ·• · (x - X; _ 1) (x - X; + 1) · · · (x - x,J i- .
+ an (x -x0) (x - x 1) .. . (x- xn- 1)
Note: The term in which ai occurs has the factor (x - x;) lacking.

This is true for all values of x.


Substituting in (1), x = x0, y = Yo, we get
Yo= ao (xo - X1) (xo - Xz) ... (xo -xn)
Yo

Similarly, setting x = x1, y = Yr we have


Y1
a1 -
_ - (tr - x0) (x 1 - x2) (x 1 - x 3) ... (x1 - xn)
In the same way, we get
Y2

·························································
Yn
a=
n. (xn - Xo) (xn - X1) ... (xn - xn - 1)
Substituting these values of a's in 0), we have
(x-x 1) (x-x2) ••· (x-xn)
Y =f (x) =(xo - X1) (Xo - xz) ... (xo - x,J . Yo
(x - x0) (x - x2) ... (x - xn)
+ (x1 - xo) (x1 - xz) ... (x1 - xn) . Y1
+ ............................... .
(x - x0) (x - x 1) ... (x - X; _ )
1 (x - x- ·1) ... (x -x)
+ i+ , n . Yi
(x;-x0) (x;-x 1) ··· (x;-X;_ 1)(x;-X;+i) •·· (x;-xn)
+ .............................. .
(i-x0) (x-x 1) ··: (x-x )
+( , )( ) ( n- 1 Y ... (2)
Xn -Xo Xn -X1 ... Xn-Xn- 1} n

Equation (2) is called Lagrange's interpolation formula/or unequal


intervals.
Cor. Dividing both sides of equation (2) by
fnterpolation With Unequal Intervals 273 ·

(x - x0 ) (x - X1) ... (x - xn), we get

/W 1
(x-x 0) (x-x I )
'
··· (x-x,J = (x0 -x1) (x0 -x2) ··· (x0 -xn) · x-x0
'

Y1 1
+ ' ·- -
(X1 - x0) (x 1 - x2) ... (x 1 - xn) x - x 1
+ ....................................... .
1
\
8-8. Different form of Lagrange's interpolation formula ·.
The Lagrangian interpolation form~la can also be written as

. d
TinCx) =(x - x0) (x - x 1) ·•• (x - x,J and TI'n (x) = dx [~ (x )]
, .
Solution. Tin (x) = (x - x0) (x - x 1) ··· (x - xn)
Differentiating this and substituting x = xi, we get
TI'n (x;) =(xi - x0) (xi - x 1) ·•· (xi - xi- 1) (xi - xi+ 1) ··· (x - xn)
Substituting this in equation (2),
nn (x) ·
Yo
f(x) = X-Xo . TI'n (xo)

Tin (x) . Y1 · Tin (x) Yn


+ +···+ .---
X-X1 TI'n(x1) x-xn n'n(xn)
n
_) Tin(x) ,_lL,
- .,J..,J TI' n (xJ x - xi
l =0
../'-
Example 13. Using Lagrange 's mterpo
. . fiormu l a, find y (10)
l ation
from the following table
X 5 6 9 lJ
y 12 13 14 16
Solution. By Lagrange's interpolation formula, we have
(x - x 1) (x - x2) (x - .x3) · Yo (x - x0) (x - xi) (x - x 3)
y =f (x) = (xo - X1) (Xo - X2) (xo - ~) + (x1 - Xo) (X1 - X2) (X1 - X3) Y1
(x - x
0 1 ) (x - x ) (x - x3) (x-x0) (x -x 1) (x- xi)
+ --=--~~~----:-- Y2 + · Y3-
(x2 - Xo) (.xi - X1) (X2 - X3) (X3 - Xo) (~ - X1) (X3 - Xi)
_(x-6)(x-9)(x-11) _12 +(x-5)(x-9)(x-ll) _ ·
13
- (5 - 6) (5 - 9) (5 - 11) (6 - 5) (6 - 9) (6 - 11)
274 Numerical Methods
'I,
(x - 5) (x - 6) (x - 111 . 1·4 + (x - S) (x- 6) (x )
+ (9- 5) (9 - 6) (9- 11) (11 - 5) (l l - 6) (11 - 9) · 1
Putting x = IO, ·.
(4) (1) (-1) •. 12+ (5) (1) (-1) . 13
y (10) = f (10) = (- 1) (- 4) (- 6) (1) (- 3) (- 5)
/ (5)(4)(-1)·14+~
+ .(4) (3) (-2) (6) (5) (2) ·1
= 14-666666.
~ mple 14. Find the parabola of the form Y = d- +bx.+ c Pa.rs~i
through the points (0, 0), (], 1) and (2, 20). ·
Solution. We use Lagrange's interpolation formula .
(x-l)(x-2) (x-0)(x-2) (x-0)(x-1)
1
Y = f (x) = (0- 1) (0 - 2) · O+ (1 - 0) (1 - 2) · + (2_-0) (2- 1) ·
= 0-x(x-2)+ l0x(x-1)
y=9x2-8x.
E~ple 15. Using Lagrange's formula, prov~ :
/ I Yi= y3 - 0·3 (y 5 -y_ 3) + 0·2 (y_ 3 -y_ 5) nearly.
Solution. y_ 5 , y_ 3, y3, y5 occur in the answers. So, we can have the
table
X : -5 -3 3 5
Y : Y- 5 Y- 3 Y3 Ys
:. By Lagrange's formula
(x + 3) (x- 3) (x- 5)
y(x)= (-5+3)(-·5-3)(-5-5) ·Y- 5
(x + 5) (x - 3) (x - 5)
+ (- 3 + 5) (- 3 - 3) (- 3 - 5) . Y- 3
(x + 5) (x + 3) (x - 5) (x + 5) (x + 3) (x - 3)
+ - - - - - - - y3 +--,,-------y5
(3 + 5) (3 + 3) (3 - 5) (5 + 5) (5 + 3) (5 - 3)
_ (4)(- 2) (-4) (6) c..:. 2) (-4) (6)' (4) (- ,4)
Y, - (-_2) (- 8) (- 10) y_ 5 + (2) (- 6) (- 8) Y-3 + (8)_(6) (- 2) Y3
(6) (4) (- 2)
+ (10) (8) (2) Ys
,=70•2y_5+0•5y_3+y3-0•3y5 . I

_ Yi~ Y3 -0·3 (y5 -y_3) + 0·2 (y_3 -y_ 5). .


( \ '· ~ ample 16. T,he mode of a certain frequency curve y =f (x) is ve,Y
, _ ~ r \ to x = 9 and the values of the frequency density f(x) for
x = 8·9, 9, 9·3 are respectively 0-30, 0·35 and 0-25. Calculate tht
approximate value of the mode. ·
Jnterpolation With Unequal Intervals 275 ·

Solution. We are given that


X 8·9 9:0 9·3
f (x) 0·30 0·35 0·25
By Lag'range's interpolation formula,
(x- 9) (x - 9·3) (x - 8·9) (x-9·3)
3 35
f(x) = (8·9- 9) (8·9- 9·3) X 0· 0 + (9 - 8·9) (9- 9·3) X 0·
+ (x"""8·9)(x-9) x0•
25
(9·3 - '8·9) (9·3 - 9)
} 2 r r I

=u(-25x +453·5x-2052·3)
To get the mode, f' (x) = 0 and f" (x}= ve
1 .
· f'(x)=0 (-50x+453·5) .=0
12 I r

i.e., = 9·07X

1
f" (9·07) = (-50) =- ve
12
Hence f(x) is _maxim~lm at x = 9·07
Therefore, mode is 9·07.
E x ~ -~ Using Lagrange's for~ula of interpolation find
y (9·5) given
X 7 :c,\ 8 9 - -- _10
y: 3 I ' I 9
Solution. By Lagr~nge's formula,
(x - 8) (x - 9} (x - 10) · (x - 7) (x - 9) (x - 10)
3
y = f (x) = (7 - 8) (7 - 9) (7-; 10) X + (8- 7) (8- 9) (8 - 10) X l
(x - 7) (x .;._ 8) (x - 10) I (x - 7) (x - 8) •ex - 9)
9
+ (9- 7) (9 - 8) (9 - 10) X l + (10- 7) (10- 8) (10- 9) X
· (l ·5) co-5)·(- o-5)' (2·5) (0·5) (:- 015) _
f (9·5) = · (- '1) (- 2) (- 3) X 3 + (1) (~ ·1) (- 2)
(2·5) (1 ·5) (- 0·5) (2·5) (l ·5) (0·5)
+ . (2) (1) (- 1) ' + (3) (2) (1) x 9
1

=•(). 1875-0•3125 + 0•9375 + 2•8125


1

= 3·625.
~mple 18. Use Lagrange's formula to fit apolynomial to the data
. · X : -'J . 0 2 . , 3 . '
. y : - 8 3 1 . 12
and hence find '! (x = 1).
Solu~on. By Lagrange's formula,
(x-0) (x - 2) (x- 3) (x + 1) (x- 2) (x- 3)
y = f(x) = _(...: 1-0) (-1 - 2) (-1 - .3) X (-S) + (0 + 1) (0- 2) (0- 3) X 3
276 Numerical Meth
oas,,
(x + 1) (x - 0) (x - 3) (x + 1) (x - 0) (x _ ')) 1
+ - - - - - - x 1+ ~ <-J
(2 + 1) (2 - 0)(2 - 3) (3 + 1) (3 - 0) (3
= 2x3 - 6x2 + 3x + 3, on simplification. l

y(x= l)-"2~~;~;:~~~POLATION '+-


( so far given a set of values of x and y we were find.ing the
of y corresponding to some x =xk. (wh.IC h IS
. not given
. . the table). valu
m Ii
we treat y as a function of x. Now the problem is, given some y::::: y ere, 1
should find the corresponding x. This process of finding x given y is c:i ~,
the inverse interpolation),, ." 1~
In such a case, we will take y as independent variaple and x
dependent variable and use Lagrange's interpolation formula.
Taking y as independent variable,
(y- Y1) (y - Y2) ... (y- Yn) (y- Yo) (y- Y2) ... (y- Yn)
X = - - , - - - - - - - - - - . Xo + ~-----:-:--:----:----:--- X
(yo - Y1) (yo - Y2) ··· (yo - Yn) (Y1 - Yo) (yl - yz) ... (y, - Yn) 1

. .
This formula (1) is called formul~ of inverse interpolation.
I

Example 19. From the data given below, find the value of x when
y = 13·5 (B.Sc. BR. Nov. 94)
X : 93·0 96·2 100·0 104·2 J08,7
y : JJ,38 12·80 14-70 17·07 19-9]
Solution. By Lagrange's formula for inverse interpolation
_ (y- 12·80)(y - 14·70) (y - 17·U/) (y- 19·91)
-1. -

(l 1·38-12·80) (I 1·38-14'70) (11·38- 17-07) (11 ·38-19·9C

X (93-0)
(y-11·38) (y-14·70) (y-17·07) (y..:.19·91)
+
(12·80-11·38) (12·80-14-70) (12·80-17-07) (12-80-19·91)
X (96·2)
(y- 11 ·38) (y- 12·80) (y-
+-:-:-:--=::-----:-:::-:-::-:-:-:-~----.:..._17·07) (y-
_....:_::_19·91)
_....:....__ _
(14-70- 11·38) (14·70- 12·80) (14·70- 17-07) (14-70- 19·91)
X (100·0)
(y-11·38) (y-12·80) (y-14·70) (y-19-91)
+ .
(17-07 -11·38) (17-07-12-80) (17-07-14·70) (17·07 -19-91)
X ( 104•2)
38
(y- l 1· ) (y-12·80) (y- 14·70) (y- 17-07)
+ (19·91 11 ·38) 0 9·91 -12-80) (19·91 -14'. 70) (19·91 -17•07)
X (108•7)
rnterpolation With Unequal Intervals 277

Putting y = 13-5 on the right hand side, and simplifying


..,
= - '7,8126929 + 68·3721132+ 43-595887 - 7·2733429
+0·770084198 .
= 97-6557503
A Example 20. Find the value of 0 given f (0) = 0-3887 where
('' __ : Je
.f (0) =
de
..----- using the table
0
J_ sin e
2
- 2 '\\P ti"
!,., ~/·

'
0: 21° -"f 23° V)- 25° -{
/(0): 0·3706 0-4068 0-4433
Solution. Now take f (0) as independent and 0 as dependent
y =f(0) : , 0-.3706 0-4068 0-4433
0: 21 25
(y- 0-4068) (y- 0·4433)
tr S = (0·3706- 0·4068) (0·3706-0·4433) X (ll)
0· 3706) (y - 0·4433)
(y
23
+ (0·4068-0-3706) (0·4068-0-4433) X ( )
(y- 0·3706) (y-0·4068)
25
+ (0-4433 -0-3706) (0·4433 -:- 0-4068) X
l ,
(0·3887 -0·4068) (0·3887 -0·4433)
0 3887 2
e (y = ' ) = (0·3706- 0-4068)_(0·3706- 0·443J) X ( l)
(0·3887 -0·3706) (0.'388"7-·0·4433)
23
+ (0·4068-0·3706) (0·4068- 0·4433) X ( ) -"-
(0·3887, - 0·3706) (0·~887 - 0-4068)_ X '\ \)
2
(0_.4433 - 0-3706) (0·4433 - 0·4068)~
= 7·885832+ 17-202739- 3-0~6525 = 22·0020°
Example 21. Find the age r.orrespc>ndin.g to the annuity value
13·6 given the table
Age (x) 30 35 40 45 50
Annuity value (y) 15·9 14·9 14-1 13.3 12·5
. (B.Sc. BR. Nov. 94)
Solution.
t (13-6- 14·9) (13·6 - 14· 1) (13·6- 13-3) (13-6- 12·5)
x = - - - - - - - - - - - - - - - x 30
(15-9 - 14·9) (15·9-14· l) (15-9 - 13·3) (15·9 - 12-5)
(13·6 - -15·9) (13-6 - 14·1) (13·6 - 13·3) (13·6 - 12·5)
+ · x35
(14·9 - 15·9) (14·9 - 14· 1) (14·9 - 13·3) (14·9 - 12·5)
(13·6 -15·9) (13·6- 14·9) (13·6-13·3) (13·6- 12·5)
+---__:__-----------x40
(14· 1 - 15·9) (14· 1 - 14·9) (14· 1 - 13·3) (14· 1 - 12·5)
278 Numerical Meth
Oq8
.,6 14·9) (13-6-14· 1) {13-6- 12~
+ (13-6 15·9) (13
3.3 -15·9) (13-3 14·9) (13-3 ' 14·.1) (13-3-' 12.5/< 45
(1
(13-6 15·9) (136· - 14·9)(13-6-14·1){13-6-'13-3) -xso
+ (12·5-15·9) (12·5 14·9) (12·5 14·1) (12-5-13-3)
:. X (y 13·6) = 43.

EXERCISE 8.2

Using Lagrange's interpolation formula, do the problems below:


1. From the table given below, ·find Y (x = 2). ·
X
0 I 3I

y .. 5 6 50 ' 4
2. Given u1 =22, u2 == 30, u4 = 82, U7 =106, ug_== 206 , fio d ~- 105
3. Find f (27) given . .
X . 14 17
31 35
f (x) ~8-7 . 64-0
44•0 39,J
4. Using Lagrange's formula, find /(6, given
X i 5 ·1 7
IO
f(x) 18 180 448 12
1210 2028
5. If Yi= 4, Y3 = 120, y4 =340, Y6 = 2544., find ,Ys·
6. Find y (6) giveO y (I)= 4, y (2) = 5, y (7) = 5, y (8) = 4. Also find x for whicl
y (x) is maximum or ·minimum. · ' ·
7. Find y (10) given y (5) = 12, y (6) = 13, y (9) = 14 and y (11) = 16.
8. Interpolate y at x == 5 given
X 1
y
2
J 3
4 4 7
8
9. If Yo= l,y3 = 19,y4 =49 and Y6 = 181 find Ys- , 16 128
. .
10. The following table gives the values of the probability integr,J
2 Jx 2 ·

f (x) = ? e- x dx corresponding to certain vafues of x. For what valueof


'V7t O ' ' '
· x is this integral equal to 0-5

X 0·46 0·47
f (x) 0-4846555 0·4Q37452 0-48
11. Find f(O) given 0-49
0-5027498
0-5116683
x -I -2 2 4
f (x) - l - 9 11 69
12. The following are the measurements I made on a curve recorded by the
oscillograph
conditions of representing a change of current ; due to a change in the
an electric current.
t 1-2 2·0
i 1-36 . 0-58 2·5
Using Lagrange's formula, find i at t == 1·6. . Q.34 3·0
0-20
(MS. J96iJ

You might also like