Lagrange's Interpolation Numerical

You might also like

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

INTERPOLATION 35

(d) Gauss's backward formula with


Let flx) be known for
even
interpolation points
2n distinct
x X t ih, i
=
1, 2, = interpolating points xg» *+ X+ 2
yt =flx,), i 0, 1, Xln-11, X such that
..., n -1,
xh and *- =
0
Let p(x) be the =

interpolating polynomial of degree (2n - 1) at most y_, =flx_). n -


..

yi = 0, tl, t2,... + (n - 1) and p(x,) =fx_,) y- such that


p(x,) flx) =
= =

Let plx) Bo+ B,(x X) B,x- x.) (x


=
-

B2-2x-*-{n=1) (* -X-(n-2)) (x x-1) (x x) B,(x


-

+
x_)
x1) (x - x)
x) (x
(x - x)
x,)
-

-
- +.
+
+
-
-

x) (x x1).. (x
+B2n-1X-*-(n-1)) (xX X-(n-2)) (x x) (x - x) (x -
-X-2) -
-

The coefficient's
B,s x). (x
are (x -Xn-) -

X-1)
Bo Yo
2r-
B2r-1 r = 1,2, n
(2r-1)!H7T=l, 2, ., n
B2 r-1)
(2r)!2
=s =
1, 2,.
2, . . , n -
l

plx)= o+Ay+ A+u 3! ) ,ya


+.+ u(u-)...(u-(n-2))(u-(n-))n-2
(2n-2)! Y-n-1)
u-1)...(u-(n-2)(u-
(2n-1)!
(n-1) "y-n
where u =
Error term
Here the error term
R2,(x) is similar as
given in Gauss's forward
interpolating points interpolation with odd

i.e. R2,) u(u' 12) (u2


= -
-

22) ..
(u -

(n 1)) (u n)
-

+
where min{xo *^1» X(n-1)» X X} , < < (2n)!
(e) Gauss's third interpolation formula
max{xo X1 X(n-1) X- x}

Here we starts with x, instated of xg and runs parallel to the backward formula. Thus
coefficients
Ay A'y - and we set u
are !h' 21h 3!h4!h =
(i.e. u
replace by u -

1). These changes


reduce the backward formula to

P(x) =

y + A+M 2!
y+ U-D(u-2)
3!

ulu-1)(u-2ay+
4!
-1)(u-2)(u-3)5,
5!
uu-1)(u -2)...(u-(n-2) Mu-(n-1))%u-n)
(21-1)!
Here the number of interpolating points are even 1.e.
Xo» X1 *2., z(n-1) n

w
IN C PROGRAMMING
6 NUMERICAL METHODS WITH BASIC CONCEPTS

Error term:
R2,(x) = u(u2 - 12) (u2 - 22).. (u2 - (n - 1)) (u - n) (2m)!

C n"o» X^19 .Xn-1)» x x} <g < max{x, X1 ¥a(n-1)» *r* *}

NOTE 1 : Gauss's forward interpolation formula is used for interpolating at the startina
of the
centre of the interpolating points with 0 < u < l to mininmize the error.
NOTE 2 Gauss's backward interpolation formula is used for interpolating at the ending ofs
i the
centre of the interpolating points with -1 < u< 0 to minimize the error.

3.10 STIRLING's CENTRAL INTERPOLATION FORMULA


Taking the mean of Gauss's forward and backward formula with odd interpolating points
,
X22 *n We obtain
Px) = Y+
Px) = y, u+Ay-1 , u(u+)+uu-) ^2y.+ u{u-1)
2 2!2 3!
Ay+2++
y+Ay
3
uu-1)(u-2)..(u-n-1) Ayn-)+Ay_
(21-1)! 2

u(u-1)...(u-(n-1))(u-n)+u (u*-1)..(uf -(n-1*) (u +n)


2.(2m)!

-)y+lue
4! e-P-
5!
-2)A',+a +

+
u(u-1) (" -2)... (u- (n-1)) A"y(n=1)
(2n-1)!
+Ay-
u (u-1)(u-2*)..(uf -(n-1)
(2n)! y
where the error term

R2n+1) = (u -1)u-2*)..(uf -n*)


(2n+1)! f**"E)+f
2
6
where min{xo. *^1 X} < <
K S1 `2 max\x» * x,w x}
Doins
NOTE: Stirling's formula is used for the
with to
interpolation of the central of the interpolans
u minimize the error.
3.11 BESSEL'S CENTRAL INTERPOLATION FORMULA
Ven number «
Taking the mean of Gauss's forward and
:
third
interpolating points *o» *21 *2 We
interpolation formula with eve
*2{n-1» X> obtain
4-
pt)- + ) &,+ay.u-)utu-1)
3!
4-uu-1)..(u-(n-2*
(2n-1)!
(u-(n-1) A yn-l)
PROGRAMMINGG
CONCEPIS IN C
WITH BASIC
NUMERICAL METHODS
formula
Difference table for Bessel's

y Ay
Ay
Y4

y4
y
y
y.3
y- 8y
By1

y
Dy

3.12 LaGRANGE'S INTERPOLATION FORMULA


Let flx) be known at (n + 1) interpolating points xo X .., X, and y; =flx), i = 0, 1, 2,
where x- Xo X2- X *, - Xn-1 need not necessary be equal.
Let L,(x) be the interpolating polynomial of
i = 0, 1, 2, .., n.
n at most degree such that L,(x) =J4
Since L,(x) is a
polynomial of degree n at most, it
may be written as

L,) Agx x) x - *2). (*x)+ A,(x x) (x -x). (x -x,


= -

Ax- o) * *) x x- x)+ + A(x x) (x x). (x Xa-


- -

-
-
-

+
A,x ) (x- x1) (x-n-
-
-

(1)
Substitutingx = x, in (1), we obtained

i(x,-X,)x, -z,).. x, -xx-X T 0, 1, 2 "


Equation (1) can be written as

L) A,(x,-x,)x-x)(x-X,)x-x,,).. (x-x,)
1=0
INTERPOLATION 39

o)X-*) (X-X,)(x-X,,)...(,x-x,)
X, *)(a,-x,)... (x, - x,-)(x-x)...(,x-x,)

=0

(x-x)x-x)..
(x,-x)(x -x,)...(x,,xX,-)*-Xi)
where ) is known as
Lagrangien function.
-xj-)(x, -X;1)4, *,)
Let wlx) =
(x -

x) (x -x) ...
(x -

x,)
:. Wx) =
(x -

x) (x -x). (x -

x,) + (x -

x) (x x) -
. .
(x x,)
-

+ X -x) (x -x).. (x -x-

Hence x) =
w(x)
(x-x,)wx,)
L=t-)waj 2
Error term

The error term is R(x) =


(x - *) (x - x).. (x -

x,) (n+1)!
=

n+1)!
where min{xg, X ,
X Xo» X1 ..n X}
X} << max

where min{xo» X ,
X max{*» X1 Xn X}
X}< <
interpolation formula becomes
NOTE 1: For two interpolating points xo X the Lagrenge's

L,x)= 1
L) y,+
linear interpolation formula
This formula is known as

is unique.
NOTE 2 Lagrange's interpolation polynomial of degree at most n, such that
distinct from L,(x)
Let L,(x) be another polynomial,
i =0, 1, ..
L,x) =fa) =y,
Let ylx) L,(x) - L, (x) =

0, i =
0, 1, 2, n.
-y;
,
=

y(x) L,(x) L,(a) yi


=
-

at most with at
least (n+1) zeros.

polynomial of degree n
Thusy(x) is a
Hence y(x) = 0

L(x)= L,()
Thus L,(x) is unique.
FUNCTIONS
LAGRANGIAN
PROPERTIES OF
3.13 linear
transformation.
invarient under
functions remain
(a) Lagrangian 0.
Let x = a + Bt where ß *

Then x = a + Bt
=B(;
-

x- B(t -1)and x;-

You might also like