0% found this document useful (0 votes)
27 views18 pages

Interpolation and Curve Fitting

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views18 pages

Interpolation and Curve Fitting

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

INTERPOLATION AND CURVE-FITTING

MATH 19 ~NUMERICAL SOLUTIONS TO CE


PROBLEMS

] i INTERPOLATION AND CURVE-FITTIN


G
Subtopics:
4.1 Introduction
4.2 Finite Difference Operators
4.3 Interpolation with Equal Intervals
4.4 Interpolation with Unequal Intervals
4.5 Central Difference Interpolation

4.1 Interpolation

4 the technique of estimating the value of a function for any intermed


iate value of the
independent variable
4 denotes the method of computing the value of the function ¥ =1 (x)
for any given value
ofthe independent variable x when a set of values of y = f (x) for certain values of x arc
known or given
Interpolating function
4 If the function f (x) is known explicitly, then the value of y correspo
nding to any value
of x can easily be obtained
% If the function f (x) is not known, then it is very hard to find the exact form of f (x) with
the tabulated values (xi, yr)
> In such cases, the function f (x) can be replaced by a simpler function, say,
(x),
‘which has the same values as f (x) for X0, X1, Xz, +..., Xn
> The function ¢ (x) is called the interpolating or smoothing function and any other
value can be computed from @ (x)
Polynomial Interpolation

% If ¢ (x)isa polynomial, then @ (x) is called the interpolating polynomial


4 The process of computing the intermediate values of y = f(x) is called the polynomial
interpolation
4 The following assumptions are made:
a) There are no sudden jumps in the values of the dependent variable for the period
under consideration
b) The rate of change of figures from one period to another is uniform.

4.2 Finite Difference Operators


4 Forward Differences
4 Backward Differences
4 Central Differences
a) Forward Differences

> Simply difference operator is denoed by A


> Defined as Af(x) = f(x + h) —f(x)
> or writing in terms of y, at x = xi becomes:
Afx)=fesi + ) - fx)
or Ayi =yirs=pifori=0,1,2, ...,n—1

Compiled by: Redin Jhon T. Carriedo, ECE Page 1 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 ~NUMERICAL SOLUTIONS TO CE PROBLEMS

Second Differences
> are the differences of the first differences
> are denoted by A%y, A%y, . ..., A%V

O2=3) =527 0
2a=)- G- =) === -
Ay =yy=3p2=3 2=y ete.

> Aty = Ay, = A;,n=0,1,2,...


where A° = identity operator i.e.,A° f(x) = f(x) and A'= A

Example:

Construct the forward difference table for the following data:

x [1]2[3]a]s
y=f)
[+ 6]9[12[17
y | Ay Ay Ay Ay
w N =] x
Alw|no|—|o|m~.

42 1 1 3
6|3 0 2
vl

3 2
©

b) Backward Differences

> denoted by V
» defined as: Vf(x) = f(x) — f(x— h)
> can be written as:
Vyi=y— ypi=nn-1..,1
> orVy1=y1—= ¥0,V¥2=Y2= Y15+
s V¥n= ¥n— Yn1
» Second Differences:
ey = Vely = Tl i=nn-1, ..k
V=3,V =V

Compiled by: Redin Jhon T. Carriedo, ECE Page 2 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Example:

Construct the backward difference table for the following data:

x _ [1]2(3]41]5s
y=fix) [4]6[9]1

[N

3
i x y |V Vy Vy VY
01 4
1 2 6| 2
23 913 1
3 4 1230 A
4 5 17|65
2 2 3
©) Central Differences
> denoted by the symbol §
> defined by: 8f{x) = f(x + h/2) - f{x - h/2)
where h is the interval of differencing
> First central differences:
»12=y1-y0.
W32=y2=Y1 s
Wn-1/2=In=Vn-1-
> Second central differences:
&y = 85ty -

Example:

Construct the central difference table for the following data:

X 213|415
y=f(x) [4]6[9][12]17

i x y. | & ©®y &y dYy


0 1 4 =
&
1 2 6 3 1 4
2 3 9 a 0 2 3
34 12| T 2
4 5 17 5
Compiled by: Redin Jhon T. Carriedo, ECE Page3 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING 'MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Properties of the Operator A


1.If ¢ is a constant then Ac =0
2. Ais distributive. i.e., Af (x) * g(¥)] = Ax) £ Ag(x)
3.1f ¢ is a constant then A[¢f(x)] = eAf(x)
4.If m and n are positive integers then ARAY (x) = A= (x)
5. ALAE) A0 .. 0] = AR + A+t A, ()
6. ALAIx) g()] =/x) Ag(x) + 8(x) M)
;[&_’]= £V() - (X)Ag()
7 g(y) g(x)glx+h)

Other Difference Operators

® Shift operator: E
= Differential operator: D
= Average operator: p

Shift operator, E
= defined as: Eftx)=fx = k)
=or Eyi=Ji
= shifts the function value y, to the next higher value y;.,
= Second order shift operator:
=Ef(x) = E[Ef (x)] = E[ftx + I)] = fix + 2h)
=EY (x)= (x+ nh) or B, =yimy
= Inverse shift operator (E=):
=Ex)=fIx - h)
»EY(x)=f(x-2h) and E%(x)=f(x—nh)
= EYfx)=£(x +th) where r can be positive/negative

Average operator, |1

= defined as:

p[(.\'):—"-[[(.\'-i- hi2)s flx=hi2))

Wy =—;b‘l.x 2¥¥2)

Differential operator, D
=defined as:

D =)= 7'
D) 1)

Compiled by: Redin Jhon T. Carriedo, ECE Page 4 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Relations among the Operators


Operator Definition
Forward differenceoperator A | Afix) = fix= h) - fix)
Backward difference operator ¥ Yi(x)=fix)
- fix-h)
Central difference operator § ofx)=fix-h2)-fix-h2)
Shift operator E Efix) = fix - h)
Average operator i ufix)
= 0.5(fix=h 2) - fix-h2)|
Differential operator D Ditx) = {'(x)
where It is the difference interval

Linking Different Operators


= Considering Taylor’s formula:
fix=h) =) =)~ —7'—'111["(\'\ F ose

= In operator notation:
Eftx) = [I +hD= D)y *] 10
where the series in brackets is the expression for the
exponential
=-E= gD
= From the definition of A:
V)= + 1) - fx)
= Using the operatorE:
VW) = Efx) - /1)
A= (E-1) fix)
= which can be expressed as an identity:
A=E-1
ie E=1+2

Example: snow: that Alo g f(x)= log ][—Ie%-l

Solution:
Johy = Efix) = (A+1)1x)
Jo=hy = M) +Ax)
Dividing both sides by fix):
A
Alog fl)=log
™ ™ |1+ 'V-“v)]
,_.

Taking log on both sides:


mg‘r."-“;l’” =log|1+ .\rm]
| S L 1

log f(x + ) = log f(x) = log | LW


f(x)

Compiled by: Redin Jhon T. Carriedo, ECE Page 5 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Relationship among the Operators


E A v
E E A=l a-vy

Ky E-1 A a=vri-1

v T-E' 1-(1-a7" v

A=At v -t
{r=gafoent | {1i-gaji-n
( 1 + ey

4.3 Interpolation with Equal Intervals

4.3.1 Missing Values


Let:
& X0, X1, X2, .., Xn arc equally spaced values of the independent variable
where: xi=xo + il, i = 0, 1,..., n, where h is the spacing

& p=f{x) such thatyo, y1, 3, ...,ya denote the corresponding values of the function
4 1f one or more values of y = f (x) are missing, we can determine the missing values by
employing the relationship between the operators E and A

4.3.2 Newton’s Binomial Expansion

Newton's Binomial Expansion Formula

4 Suppose
yo, Y1, V2, «eesIn
- denote the values of y = f (x)

4 Let one of the values ofy is missing since n values of the functions are known
4 In equation: 4"yo =0
4 or using the shift operator, E:
(E-1)"po=0
4 Expanding (E—1)"yo=0
[E" = nCiE*! + nCE2 + ..+ (-1)"] yo=0

-1
Eryy - nE*lyy = "“:' ) By = e = (1) =0
n(n=1)
Y= My ™ Yz 1)y =0
or 2

4 which is quite useful in determining the missing values without actually constructing
the difference table

Compiled by: Redin Jhon T. Carriedo, ECE Page 6 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 — NUMERICAL SOLUTIONS TO CE PROBLEMS

Example 1:

Determine the missing entry in the following table.


X 0f1)] 2134
v=fx) |1 ]4]1 7-197
Solution:
(Since there are 4 given values, let y be a polynomial of degree 4)
So, Apy=0
(E-1)p=0
By expansion:
(E*— 4B+ 6E* —4E + 1)y, =0
E'yg—4E%, + GEyo—4Ey, = 0
or yy = 4y; + 6y =4y, + 3, =0
Substituting the given values:
4y, =97 +6(17)—4(4) +1
46

Example 2:

Find the missing entry in the following table.


X ofr] 213 4 ]
y=fix) [ 1 [3]11]-]189 |491
Solution:
» > polynomial of degree § \ ; ,
So, A%=0 1381
(E-1)y=0 14641
Using the Pascal s triangle: —>15101051
5= 5yt 1003 =100, + 5y =30 =0
-10y; = s =35y, 10y, + 5y, =)
Substituting the given values:
10y, =491 - 5(189) — 10(11) + 5(3)— 1

Page 7 of 18
Compiled by: Redin Jhon T. Carriedo, ECE

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Example 3:

Find the missing entries in the following table.


X 0]1]2 314 5
y=fx) [ 1 [-]11]28|-]116
Given: Solution:
»=1 Alyy=0,A%,=0
»n=11 @(E=1) =0
$=28 Py—Ayy+ 6y, =43 T3,=0
rs=116 F4=4 6NQ2 -4y,8)
+(1)=0
Y4 =45 Deq.(l)
Required: @E=1Y1,=0:
3o = 0
Fs—5p4+ 10y3 = 10, + 5y~

116 - 5y, +10(28) ~10(21) +5y, = (1) = 0


n=?

2§5,,9 Y= = 57 Deq.(2)
=

4.3.3 Newton’s Forward Interpolation

Newton’s Forward Interpolation Formula

4 used to interpolate the values of y near the beginning of a set of equally spaced tabular
values
1 i(u=1) 2 w(ue=1)(u=2) 1
0(x)= yy+ udyg+ ——A) * Tl Ay Fee
" u(u-l)-«(u—(n—l))An"h
n!

30 oo Jg = setof (n + 1) functional values


¢, > setof (n + 1) equally spaced values

Example 1:

Given that V15500 = 124.4990 , V15510 = 124.5392 , V15520 = 124.5793 and


V15530 = 124.6194, find the value of V15516,

Compiled by: Redin Jhon T. Carriedo, ECE Page 8 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Given: X y dy ay
Xo= 15500 15500 124.439 00402 -0.0001
=10 15510 124.5392 0.0401 0
¥ =15516 15520 124.5793 0.0401
15530 124.6194
Solution: Using Newton’s forward IPF:
W= =N ()= g +udrg + ”“’”“” A%yg 4o
u=16/10 &
(=16 J1x) = 124.4990 + 1.6(0.0402) + 0.48(-0.0001)
= 1.
/(15516) = 124.563272 |

Example 2:

The values of sin x are given below for different values of x. Find the value of sin 42°.

X y=sinx Ay A2y Aly Aty


40° 0.6428 0.0643 -0.0054 .0.0004 [
45° 07071 0.0589 -0.0058 -0.0004
60° 07660 0.0531 -0.0062
55° 0.8192 0.0469
60° 0.8660

fx)=yo +udyy + —"("’TI) Azyu + -—“("


- ];5" -2 A’yu +oen

Solution:
u=(42-40)/5=0.4
S 428 + 0.4(0.0643)+ (-0.12)(-0.0054) +(0.064)(-0.0004)
| f(42°) 6913

Problem:

1. Findp = &% for x = 0.05 using the following table.

x Jo]ol 0.2 0.3 0.4


e™ [ 1]1.3499 | 1.8221 | 2.4596 | 3.3201
2. A second degree polynomial passes through the points (1, - 1), (2, - 2), (3, - 1) and
(4,2). Find the polynomial.

Compiled by: Redin Jhon T. Carriedo, ECE Page 9 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

4.3.4 Newton’s Backward Interpolation

4 used for interpolating values of y near the end of the tabulated values

[ Ijvn”
ot =g, + vV + S G vy n! )

X -X,
where: v =
h
4 also used for extrapolating values of y a litlle backward of yn

Example 1:

Calculate the value of f (84) for the data given in the table.

X 4] 50 60| 70] 80 90
fix) | 204 | 224 | 246 296 | 324

o
3
S
Since 84 is near the end of
table, we will use Newton's
backward IPF:
Solution:
J)=y, + Wy, s —
»,=324,x,=90,=84.h =10
Using backward difference: v=(-x,)h=-0.6
x| vy [vy|vy|vy 184)=324 +(-0.6)(28) +(-0.12)(2)
40 | 204 f184)=324-16.8-0.24
50 | 224 | 20 ]
60| 246 | 22 | 2 f184) = 306.96
70|20 [24] 2 | 0 )
80| 206 (26| 2 | ©
90324 [28] 2 [ 0

Example 2:
From the following table, estimate the no. of students who obtained marks in computer
programming between 75 and 80.
Marks 35-45 45-55 | 55-65 6575 75-83
No. of students 20 40 60 60 20

Let: s = no. of students who got marks 75 - 80


Deriving the cumulative frequency: Solution:
Marks | Students| vy| v2y| vay[véy| y =200+ (-0.5)(20) +
45 20 (-0.125)(-40) +
5 60 |40 (-0.0625)(-40) +
Gz 123 60ll. 20 (-0.0391)(-20)
Zs ;:o :g -30 -i: =] VC 1982813
s=198-180=18
x,=85 x=80,h=10,v=-0.5 @

Compiled by: Redin Jhon T. Carriedo, ECE Page 10 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Problem:

Use Newton’s backward interpolation formula to:

1. Findy at x =30 given the following table of values:


x |21 25 29 33 37
v | 18.4708 17.8144 | 17.1070 | 16.3432 15.5154

2. Estimate the value of cos 58° from the following table:


X 45 50° 55° | 60°
v=cosx | 0.7071 | 0.6428 |0.5736 | 0.5

4.3.5 Error in the Interpolation Formula

4 Error in the forward interpolation formula:

R(x)= ATy u(u=1)(u=2)(u=-n)


(n+1)!
where: 1t = il )
h

4 Error in the backward interpolation formula:

X
where: y =

Example:

Using Newton’s forward interpolation formula find the value of cos 52°from the following data
and estimate the error.
x y Ay Ay Ay
45°] 0.7071] -0.0643| -0.0049| 0.0005
50°| 0.6428| -0.0692| -0.0044
55°| 0.5736] -0.0736
60° 0.5
Solution: Computing for Error:
u=(52-45/5=14 (=N =2
Using NFI Formula: R(52) = -‘——.,—‘-)‘ Ay
f(52) = 0.7077+1.4(-0.0643)
+0.28(-0.0049) =1.4(0.4)(-0.6)(0.0005)/6
+ (-0.056)(0.0005) R(52) = -0.000028
f(52) = 0.615680

Compiled by: Redin Jhon T. Carriedo, ECE Page 11 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

4.4 Interpolation with Unequal Intervals

4.4.1 Lagrange’s Formula for Unequal Intervals

4 Lety =/ (¥) be areal-valued continuous function defined inan interval [a, b]


Let X0, X1, X2, ...,Xn be (1 + 1) distinct points
- which are not necessarily equally spaced
- corresponding values of the function are yo, y1; .., Jn
4 y=f(x)is apolynomial inxof degree n

Lagrange 's Interpolation Formula

) = f'(v) as polynomlal inx of degree n :


® Expressing
Ax) = aof + (=) (). ()
(¥=Yg1)
Ay (¥—Xg)(¥=y). . (¥-Y)(V= Xp)...
in x of degree n
where each term is a product of n lactors
. (¥o=Xy)
= Putting x = Xp!

= Putting x = X! j(\ 1) a(x 1’-‘0)(\1


= ) =xo) (¥
= Similarly, putting x xz, X = X3 X = Xp!
)
Ax3)
= @551 .n) Da,=£ix;) (¥y=xp)(5r¥1)
0 2 20N ). = X)) Day = fix;) (o) (x37¥);
Da,=fix) (o)
Xy 3)- Xy

S=x,) ay(x-
Ax) = agv=vy)=
(¥) F
e p) a,,(\'—\q](r— Xy Ng1)
XX=x
= Substituting the values of dq, @,
oo (x=x)(x =2
y=/r(x)= o ormx flxg)+

(X=X )x = X,)
fx)+-
(3 = X))(% = x)
(X=X )X =X;)(x fix)
O S 1. ) Ll T 1
(%, =X)(X,, = )X, = X,0p)

Compiled by: Redin Jhon T. Carriedo, ECE Page 12 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 -~NUMERICAL SOLUTIONS TO CE PROBLEMS

Example 1:

through the points


Apply Lagrange’s interpolation formula to find a polynomial which passes
(0,-20), (1, -12), (3, -20) and (4, -24).
(x =X )X =% )X =X;) 70
__xex)rmxx=x)
Given: f0= - G )
Cd ) ESELE NP
i|xX |y PORCEE
(%= %)% =% Wz = %)
ol 0 |-20
g Solution:
(x=0)x=3)x=4) _ 5
~20) + (=01-311-4) (-12)
12 (x=1)x=3)x=4) _,
1A
=
2|3 |-20 (0-1X0-3X0-4)
3|4 |-24 ,(x-nxx-m-a)(_:m'(.‘—o)(x—w.r—f»(_m
G-03-16-4) @-0E-nE-3
= (-8+19x-20)(-20/-12) + (-T2 +12v)(-12/6)
+ (P53 +47)(-20/-6) + (P42 +3x)(-24/12)
f(x)=x-8x2+ 15xv - 20

Example 2:
x = 10 from the
Using Lagrange’s interpolation formula, find the value of y corresponding to
following data
x | s[ 6| o] 1}
Solution: y=1{x) [ 380 [-2 [ 196 | 508
(- n)(x =) o+ (X =xp)(x = %3 )(X = %3)
PO G Tt ) %) O )y ~
(x=x)x=n)x=x) o (x=x,)(x=
(6 =%)a =) =%)" (=) =x)(%=x;) .
th X 3
110)=(10 - 6)(10 - 8)(10- 11)*(380/-24) + (10 5)(10 - 9)(10 - 11)*(-2/15)
+(10-5)(10 - 6)(10 - 11)*(1961-24) + (10 - 5)(10 - 6)(10 - 9)*(508/60)
= @)(1)(-1)*(95/-6) + (5)(N)(-1)*(-2/15)
+ (5)(4)(-1)"(49/-6) +(5)(4)(1)*(127/15)
= -380/-6 + 10/15 + (-980/-6) + 2540/15
= 63.333+0.667+163.333 + 169.333
£(10) = 396.667

Compiled by: Redin Jhon T. Carriedo, ECE Page 13 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 -NUMERICAL SOLUTIONS TO CE PROBLEMS

4.4.2 Lagrange’s Inverse Interpolation Formula

4 From Lagrange interpolation formula:


%)
(x=xp)(x=Xp)el¥=
(= X)(X=Xy)lX=Xy)
y=fl0= (o =%)" = %)
(% =X )% = Xa)-(X "
(o =% )(xg = Xx2)

C(x=xg = %)X
)(x = X,p)
* (3, =% )%, = %))+ (%, = %pu1) Ya

a function of y:
4 By interchanging x and y, x can be expressed as

_ ==y AV=d) oy ()"J'u)(."’)':""U"J’x‘) -


o =31)o=)2 o= 1) 0 0=y = y2)=01 = ¥)
=y RI
TV =)=
S Vo)
el
O = Yo)¥ a = 3)= (s =¥ea t)

Example:
value
certain values of x. Find the
values of y corresponding to
The following table gives the
of x wheny=297. [ [2] s| 7
x
v=fx) (1] 12117317
e
Yoy . =3
b Jr) Yot (8} = ),“” ) (=) Xy e
_ y2
(y=yr==)
x = ¥a)
(o =31)(Fo=¥2)=(¥o 01 =30)0n =20 = e
. (= 3 = dan)
=)
T Yol =2
= 1 = Vet
(1-117)(1-317)]
x= [(297—12)(20 17)(297-317)1*(\) J1(1-12)
97-1
17)]
+[@97-1)OT-11DIT-3II D) [(12-1)(12-117)(12-3 7)]
(931 [(1 17-1 )(11 7-12 )(11 7-31
+ [(297-1)(297-12)(297-
+[(207-1)@IT-1E IT- UDI )/ [B17-DEIT-1G17-117)]
¥ =-1026000)(1)/-403216 +-1065600(2)/352275
+ -1687200(5)/-2436000 + 15184800(7)/19276000
472

Compiled by: Redin Jhon T. Carriedo, ECE Page 14 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 ~NUMERICAL SOLUTIONS TO CE PROBLEMS

4.5 Central Difference Interpolation

Central Differences Table

x |y lay [ & T ay [ ay]afy]ay


Xg=3h | vy
Av,y
Xo—2h | v, Ay
Ay Ny
xo=h | Ay Ay
WAV, Ay, s‘,_’
Xo Yo )_x\-_, vl Ay,
Ay, v Wy
x~h |y Avo Ay,
Ay, Ay,
xo~2h | y2 A'vi
Avy
Xow3h|w

Central Differences Table using A

x y | &
Xo—3h Ars
xo-2h
x0Tt
X
No+ht
Xot2h
ot 3h

4.5.1 Besssel’s Formula

Bessel’s Interpolation Formula


1
[ u(u-])‘u-
Cu(u=1)| Aty + A%y, (" 2
Yp=Yorudyg+ 7 [ )’,’ ELR A Y

Lt - 1)(,;-3)[.\‘,
41

Compiled by: Redin Jhon T. Carriedo, ECE Page 15 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 ~NUMERICAL SOLUTIONS TO CE PROBLEMS

Example:

Apply Bessel’s interpolation formula to obtain yas, given that yzo = 2860, yz = 3167,
yuw=3555andys2=4112.

T T TA e il y=25.x=24
LI ) |
1| 20 [ 2860 [307 [ 81 | 88 ;
0| 24 | 3167 [ 388 [ 169 L=
1| 28 | 3555 | 557 = (x=xo)/h
2| 32 | 4112 =1/4=0.25
_ylady, +ain ] ~ =05
_\-:,l'u-ruA,ru+"("2 ”lA Bl "; b 1-"‘“ )é“ )A3.|'.x

25 =3167 + (1/4)(388)+ (-3/32)(81+169)/2 + (3/64)(88)/6


= 3167+
a5 + 0.6875
97 = 1171875
3252.96875

4.5.2 Stirling’s Formula


Stirling's Interpolation Formula
A+ A || 42 u A%y, +A?
VaWPE _1“+u[ A 3T T Ay
+2AJ | —
2

AU20,2 I)AA).- i) 2t ] - 4)[A5“,{+__\s",_3]


4! - 5!
> gives the most accurate result for - 0. 25<u<025
> hence, xo should be selected such that u satisfies this inequality

Example 13
Apply Stirling’s interpolation formula to obtain yzs, given that y20 = 2860, ya4 = 3167,
and ysz5=
yas =355 4112.
Given: oH 1) ¥ | Ay Ay | Ay

-1| 20 | 2860 | 307 | 81 | 88


h=4 0| 24 | 3167 | 388 | 169
u=(x—x)h 1| 28 | 3555 | 557
=1/4=0.25 2| 32 | 4112
% ="'u+"[iy_; +4Ay +fifr-‘+ u(’ =1) As_r_, +a%y,
2 3’ 3! 2
¥25=3167+0.25(695)/2 + (0.03125)(81) + -0.0391(88/1)
3167+ 86.875+2.53125 - 34375
7,5 = 3252.96875
Compiled by: Redin Jhon T. Carriedo, ECE Page 16 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Example 2:

Apply Stirling’s interpolation formula to obtain yzs, given that yzo = 48234, yis = 47354,
y30=46267, y35=44978 and y0 = 43389.

Given: s ¥ S | 2y, [y,


48234 | -880 | 207 | 5 |-103
47354 | -1087 | 202 | -98
46267 | -1289 | -300
44978 | -1589
43389
30 7SA%y ]*u LI
uid =) Ay + (o ”J‘)w----
6 2 24 =

a5 = 42767 + (-0.4)((-1087-1289)/2) + (0.08)(-202) +


[(-0.4)(-0.42-1)/6][(-98+5)/2] + [-0.4%(-0.42-1)/24](-103)
o = 46267 + 475.2 - 16.16 - 2.604 + 0.5768
Y28 =46724.0128

4.5.3 Laplace-Everett’s Formulu

Laplace-Everett’s Interpolation Formula

4 uses only even differences of the function

2 2 2 22 a2
e =17) s u(ut =17 )t =2%)
+[u,1¢,+ 3 ATy, + 5 Aty

where:
y=

Compiled
piled by:by: Redin
Redin Jhon
T. Carriedo,
R ECE Page
17 of 18

Scanned with CamScanner


INTERPOLATION AND CURVE-FITTING MATH 19 - NUMERICAL SOLUTIONS TO CE PROBLEMS

Example:

Apply Everett’s interpolation formula to obtain yzs, given that yzo = 2860, y2¢
= 3167,
y28=3555and y32=4112.

Given: il x v | Ay 6%y, Ay,


X=25.x5=24 1] 20 | 2860 [ 307 | 81 | 88
h=4 0| 24 | 3167 | 388 [ 169
v=1/4=025 1| 28 | 3555 | 557
u=1-v=075 2i[132 |42
2_p2 213y .
y= {\:\x "’%A:Jh ]“r[".\'wfi"—s!—l)-l‘)'-x }

25 = 0.25(3555) - 0.0391(169) + 0.75(3167) - 0.0547(81)


a5 =888.75—6.60156 + 2375.25 —4.42969
V5 = 325296875
Selection of Interpolation Formula

a) Newton’s forward interpolation. formula


- 1o find a tabulated value near the beginning of the table

) Newton’s backward interpolation formula


- o find a value near the end of the table

c) Stirling or Bessel’s or Lupluce-Everett’s


- to find an interpolated value near the center of the table

Exercise no. 4:

1. Using Lagrange’s interpolation formula, find the value of y corresponding to x = 8 from


the following table:
X 113 6 9
y=1(x) | 71 | 115 [ 466 | 1447

2. Find the value of x when y = 420.611 75 by applying Lagrange’s inverse interpolation


formula:
X 11215 6
y=1fix) | 71 | 82 [ 295 | 466
3. Apply Bessel’s, Stirling’s and Laplace-Everett’s formulas to find the value of f (122)
from the following data:
[ 10 11 12 13 14
Lfix) [ 23967 | 28060 [ 31788 [ 35209 [ 38368

Compiled by: Redin Jhon T. Carriedo, ECE


Page 18 of 18

Scanned with CamScanner

You might also like