You are on page 1of 55

LINEAR ALGEBRA, NUMERICAL AND COMPLEX ANALYSIS

MA11004

SECTIONS 1 and 2
Dr. Jitendra Kumar

Professor
Department of Mathematics
Indian Institute of Technology Kharagpur
West Bengal 721302, India

Webpage: http://www.facweb.iitkgp.ac.in/~jkumar/
Polynomial Interpolation

 Polynomial Interpolation

 Existence and Uniqueness

 Error in Interpolating Polynomials

Dr. Jitendra Kumar – IIT KHARAGPUR 2


Interpolation

Interpolation is a process of estimating values between known data points or approximating complicated
functions by simple polynomials or determining a polynomial that fits a set of given points.

Applications :

1. Constructing the function when it is not given explicitly and only the values of function are given at
some points.

2. Replacing complicated function by an interpolating simpler function (usually polynomials)


so that many operations such as determination of roots, differentiation, integrations or
other such operations may be performed.

Dr. Jitendra Kumar – IIT KHARAGPUR 3


Fundamental principle behind polynomial interpolation

Weirstrass Approximation Theorem

Suppose that 𝑓 is defined and continuous on [𝑎, 𝑏]. For each 𝜖 > 0, there exists a

polynomial 𝑃(𝑥) with the property that

𝑓 𝑥 −𝑃 𝑥 < 𝜖; ∀ 𝑥 ∈ 𝑎, 𝑏 .

Dr. Jitendra Kumar – IIT KHARAGPUR 4


Why not Taylor’s Polynomial ? Consider Taylor’s Polynomial of 𝑒 𝑥 around 𝑥 = 0.
25
𝑥2 𝑥3 𝑥4 𝑥5
𝑃5 𝑥 = 1 + 𝑥 + + + +
20
20 𝑥 2 6 24 120
𝑥𝑒𝑥
𝑒
𝑒𝑥 𝑥2 𝑥3 𝑥4
15
15 𝑒 𝑃5 𝑃4 𝑥 = 1 + 𝑥 + + +
2 6 24
10
10
𝑃𝑃33
5 𝑃1 𝑥2 𝑥2 𝑥3
𝑃
𝑃2 𝑥 = 1 + 𝑥 + 𝑃3 𝑥 = 1 + 𝑥 + +
5 𝑃𝑃
000 𝑃1 2 2 6
0 𝑃0
0 𝑃 1 𝑥
-2 -1.5 = 1 +0 𝑥0.5 1
-1 -0.5 1.5 2 2.5 3
𝑃0 𝑥 = 1; 𝑃1 𝑥 = 1 + 𝑥
-5 -2 -1.5𝑃1-1 𝑥-0.5= 0 1 0.5
+ 𝑥1 1.5 2 2.5 3

Taylor’s polynomials agree as closely as possible with a given function at a specific point,
so they concentrate their accuracy near that point.

For ordinary computation purposes it is more efficient to use methods that include
information at various points.
Dr. Jitendra Kumar – IIT KHARAGPUR 5
Existence and uniqueness for polynomial interpolation

For (𝑛 + 1) data points there is one and only one polynomial of order ≤ 𝑛 that passes through all the points.

For example, there is only one straight line (a first order polynomial) that passes through two points.

Consider for simplicity, a second order polynomial

𝑓 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2

A straight forward method for computing the coefficients of a polynomial of degree 𝑛 is


based on the fact that (𝑛 + 1) data points are required (3 data points in this example)
to determine (𝑛 + 1) unknowns (3 unknowns 𝑎0 , 𝑎1 , 𝑎2 in this example)

Dr. Jitendra Kumar – IIT KHARAGPUR 6


Polynomial to be fitted with the given data 𝑓 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2

Suppose that there are 3 given data points 𝑥0 , 𝑓 𝑥0 , 𝑥1 , 𝑓 𝑥1 , 𝑥2 , 𝑓 𝑥2 .

If the given polynomial passes through the given data points then it must satisfy them, i.e.,

𝑓 𝑥0 = 𝑎0 + 𝑎1 𝑥0 + 𝑎2 𝑥02

1 𝑥0 𝑥02 𝑎0 𝑓(𝑥0 )
𝑓 𝑥1 = 𝑎0 + 𝑎1 𝑥1 + 𝑎2 𝑥12 ⟺ 1 𝑥1 𝑥12 𝑎1 = 𝑓(𝑥1 )
1 𝑥2 𝑥22 𝑎2 𝑓(𝑥2 )
𝑓 𝑥2 = 𝑎0 + 𝑎1 𝑥2 + 𝑎2 𝑥22

Dr. Jitendra Kumar – IIT KHARAGPUR 7


1 𝑥0 𝑥02 𝑎0 𝑓(𝑥0 )
1 𝑥1 𝑥12 𝑎1 = 𝑓(𝑥1 )
1 𝑥2 𝑥22 𝑎2 𝑓(𝑥2 )

This system of equations has a unique solution as

1 𝑥0 𝑥02
Det 1 𝑥1 𝑥12 = (𝑥0 − 𝑥1 )(𝑥1 − 𝑥2 )(𝑥2 − 𝑥0 ) ≠ 0 if 𝑥0 , 𝑥1 , 𝑥2 are distinct.
1 𝑥2 𝑥22

In practice, it is observed that the above system of equations is ill-conditioned.

Whether they are solved with an elimination method or with a more efficient algorithm,
the resulting coefficient can be highly inaccurate, in particular for, large 𝑛.

Therefore, we have some mathematical formats (interpolating formats) in which


such calculation can be avoided.

Dr. Jitendra Kumar – IIT KHARAGPUR 8


Error in Interpolating Polynomials

Let 𝑥0 , 𝑥1 , … , 𝑥𝑛 be (𝑛 + 1) points and let 𝑥 be a point belonging to the domain of a given function 𝑓.

Assume that 𝑓 ∈ 𝐶 𝑛+1 𝐼𝑥 , where 𝐼𝑥 is the smallest interval containing the nodes 𝑥0 , 𝑥1 , … , 𝑥𝑛 and 𝑥.

Then the interpolation error at the point 𝑥 is given by

𝜉 𝑓 𝑛+1
𝐸𝑛 𝑥 = 𝑓 𝑥 − 𝑃𝑛 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 ) where 𝜉 ∈ 𝐼𝑥 .
𝑛+1 !

Dr. Jitendra Kumar – IIT KHARAGPUR 9


Error in Interpolating Polynomials

𝑓 𝑛+1𝜉
𝐸𝑛 𝑥 = 𝑓 𝑥 − 𝑃𝑛 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 ) where 𝜉 ∈ 𝐼𝑥 .
𝑛+1 !

Proof : Note that the result is obviously true if 𝑥 coincides with any of the interpolating nodes.

For simplicity, let us assume 𝑤𝑛+1 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 )

Now, define for any 𝑥 ∈ 𝐼𝑥 , the function

𝑤𝑛+1 𝑡 𝐸𝑛 𝑥
𝐺 𝑡 = 𝐸𝑛 𝑡 − ; 𝑡 ∈ 𝐼𝑥
𝑤𝑛+1 𝑥

Since 𝑓 ∈ 𝐶 𝑛+1 (𝐼𝑥 ) and 𝑤𝑛+1 is a polynomial, then 𝐺 ∈ 𝐶 𝑛+1 (𝐼𝑥 ).

Dr. Jitendra Kumar – IIT KHARAGPUR 10


𝑤𝑛+1 𝑡 𝐸𝑛 𝑥 𝐸𝑛 𝑥 = 𝑓 𝑥 − 𝑃𝑛 𝑥
𝐺 𝑡 = 𝐸𝑛 𝑡 − ; 𝑡 ∈ 𝐼𝑥
𝑤𝑛+1 𝑥
𝑤𝑛+1 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 )
Note that 𝐺(𝑡) has (𝑛 + 2) distinct zeros in 𝐼𝑥 since

𝑤𝑛+1 𝑥𝑖 𝐸𝑛 𝑥
𝐺 𝑥𝑖 = 𝐸𝑛 𝑥𝑖 − = 0; 𝑖 = 0, 1, 2, … , 𝑛.
𝑤𝑛+1 𝑥

𝑤𝑛+1 𝑥 𝐸𝑛 𝑥
𝐺 𝑥 = 𝐸𝑛 𝑥 − =0
𝑤𝑛+1 𝑥

Then using Rolle’s theorem, 𝐺 ′ has atleast (𝑛 + 1) distinct zeros.

By recursion it follows that 𝐺 (𝑗) admits at least 𝑛 + 2 − 𝑗 distinct zeros.

𝑛+1 𝑛+1
⇒𝐺 has atleast one zero, which we denote by 𝜉, i.e., 𝐺 𝜉 =0

Dr. Jitendra Kumar – IIT KHARAGPUR 11


𝑤𝑛+1 𝑡 𝐸𝑛 𝑥 𝑤𝑛+1 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 )
𝐺 𝑡 = 𝐸𝑛 𝑡 − ; 𝑡 ∈ 𝐼𝑥
𝑤𝑛+1 𝑥 𝑛+1
𝐺 𝜉 =0

𝑛+1
𝑛+1 (𝑛+1) 𝑤𝑛+1 𝑡 𝐸𝑛 𝑥
⟹𝐺 𝑡 = 𝐸𝑛 𝑡 −
𝑤𝑛+1 𝑥

Note that 𝐸𝑛 𝑡 = 𝑓 𝑡 − 𝑃𝑛 𝑡 ⟹ 𝐸𝑛𝑛+1 𝑡 = 𝑓 𝑛+1


𝑡 as 𝑃𝑛
𝑛+1
𝑡 =0

𝑛+1 𝑛+1
𝑤𝑛+1 𝑡 = 𝑛+1 ! & 𝐺 𝜉 =0

𝑛+1
𝑛 + 1 ! 𝐸𝑛 (𝑥) 𝑓 𝑛+1 𝜉
⟹ 0=𝑓 𝜉 − ⟹ 𝐸𝑛 𝑥 = 𝑤 (𝑥)
𝑤𝑛+1 (𝑥) 𝑛 + 1 ! 𝑛+1

Dr. Jitendra Kumar – IIT KHARAGPUR 12


 Polynomial Interpolation
Polynomial interpolation is the method of determining a polynomial that fits a set of given points

 Existence and Uniqueness


For (𝑛 + 1) data points there is one and only one polynomial of order ≤ 𝑛 that passes through
all the points.

 Error in Interpolating Polynomials


𝜉 𝑓 𝑛+1
𝐸𝑛 𝑥 = 𝑓 𝑥 − 𝑃𝑛 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 … (𝑥 − 𝑥𝑛 )
𝑛+1 !

Dr. Jitendra Kumar – IIT KHARAGPUR 13


 Forward and Backward Difference Table

 Newton’s Forward Interpolation Formula

 Newton’s Backward Interpolation Formula

Dr. Jitendra Kumar – IIT KHARAGPUR 14


RECALL: Previous Lecture

 Polynomial Interpolation
Polynomial interpolation is the method of determining a polynomial that fits a set of given points

 Existence and Uniqueness


For (𝑛 + 1) data points there is one and only one polynomial of order ≤ 𝑛 that passes through
all the points.

 Error in Interpolating Polynomials


𝑛+1
𝜉 𝑓
𝐸𝑛 𝑥 = 𝑓 𝑥 − 𝑃𝑛 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 )
𝑛+1 !

Dr. Jitendra Kumar – IIT KHARAGPUR 15


Different Methods of Determining Interpolating Polynomials

Although there is a unique 𝑛th order polynomial that fits (𝑛 + 1) data points, there are a variety of

mathematical formats in which this polynomial can be expressed.

 Newton’s forward and backward interpolating polynomial

 Newton’s Divided Difference Formula

 Lagrange Interpolation Formula

Dr. Jitendra Kumar – IIT KHARAGPUR 16


Newton’s Forward and Backward Interpolation Formula

Let the tabular points 𝑥0 , 𝑥1 , … , 𝑥𝑛 be equally spaced, i.e., 𝑥𝑖 = 𝑥0 + 𝑖ℎ, 𝑖 = 0, 1, … , 𝑛

Finite Difference Operator

 The Shift operator: 𝐸𝑓 𝑥𝑖 = 𝑓 𝑥𝑖 + ℎ

 The Forward difference operator: ∆𝑓 𝑥𝑖 = 𝑓 𝑥𝑖 + ℎ − 𝑓 𝑥𝑖

 The Backward difference operator: 𝛻𝑓 𝑥𝑖 = 𝑓 𝑥𝑖 − 𝑓 𝑥𝑖 − ℎ

ℎ ℎ
 The Central difference operator: 𝛿𝑓 𝑥𝑖 = 𝑓 𝑥𝑖 + − 𝑓 𝑥𝑖 −
2 2

Dr. Jitendra Kumar – IIT KHARAGPUR 17


Newton’s Forward and Backward Interpolation Formula


Let 𝑓𝑖 = 𝑓 𝑥𝑖 𝑓𝑖+1 = 𝑓 𝑥𝑖 + ℎ 𝑓 1 = 𝑓 𝑥𝑖 +
𝑖+2 2

It can easily be verified that

∆𝑓𝑖 = 𝛻𝑓𝑖+1 = 𝛿𝑓 1
𝑖+2

Also, note that

∆≡𝐸−1 ∆𝑓𝑖 = 𝐸𝑓𝑖 − 𝑓𝑖

𝛻 ≡ 1 − 𝐸 −1 𝛻𝑓𝑖 = 𝑓𝑖 − 𝐸 −1 𝑓𝑖

1 1 1 1
− −2
𝛿 ≡𝐸 −𝐸2 2 𝛿𝑓𝑖 = 𝐸 2 𝑓𝑖 −𝐸 𝑓𝑖

Dr. Jitendra Kumar – IIT KHARAGPUR 18


Higher Order Differences

∆2 𝑓 𝑥𝑖 = ∆ ∆𝑓 𝑥𝑖

= ∆ 𝑓𝑖+1 − 𝑓𝑖

= 𝑓𝑖+2 − 𝑓𝑖+1 + 𝑓𝑖+1 − 𝑓𝑖

= 𝑓𝑖+2 − 2𝑓𝑖+1 + 𝑓𝑖

Similarly, 𝛻 2 𝑓𝑖 = 𝛻 𝛻𝑓𝑖 = 𝛻 𝑓𝑖 − 𝑓𝑖−1

= 𝑓𝑖 − 𝑓𝑖−1 − 𝑓𝑖−1 − 𝑓𝑖−2

= 𝑓𝑖 − 2𝑓𝑖−1 + 𝑓𝑖−2

Dr. Jitendra Kumar – IIT KHARAGPUR 19


Forward Difference Table Backward Difference Table

𝑥 𝑓(𝑥) ∆𝑓 ∆2 𝑓 ∆3 𝑓 𝑥 𝑓(𝑥) 𝛻𝑓 𝛻2𝑓 𝛻3𝑓

𝑥0 𝑓0 𝑥0 𝑓0 𝛻𝑓1
∆𝑓0 2
∆ 𝑓0 𝛻 2 𝑓2
𝑥1 𝑓1 ∆3 𝑓0 𝑥1 𝑓1 𝛻 3 𝑓3
∆𝑓1 𝛻𝑓2
∆2 𝑓1 𝛻 2 𝑓3
𝑥2 𝑓2 𝑥2 𝑓2 𝛻𝑓3
∆𝑓2
𝑥3 𝑓3 𝑥3 𝑓3

∆𝑓𝑖 = 𝑓𝑖+1 − 𝑓𝑖 𝛻𝑓𝑖 = 𝑓𝑖 − 𝑓𝑖−1

∆2 𝑓𝑖 = ∆𝑓𝑖+1 − ∆𝑓𝑖 𝛻 2 𝑓𝑖 = 𝛻𝑓𝑖 − 𝛻𝑓𝑖−1

∆3 𝑓𝑖 = ∆2 𝑓𝑖+1 − ∆2 𝑓𝑖 𝛻 3 𝑓𝑖 = 𝛻 2 𝑓𝑖 − 𝛻 2 𝑓𝑖−1

Dr. Jitendra Kumar – IIT KHARAGPUR 20


Difference Table – Numerical Example

2
𝑥 𝑓(𝑥) ∆Τ𝛻 ∆2 Τ𝛻
Δ𝑓0 = 1 Δ2 𝑓0 = −2
0 1
1
1 2 −2
−1
2 1 𝛻𝑓2 = −1 𝛻 2 𝑓2 = −2

Dr. Jitendra Kumar – IIT KHARAGPUR 21


Newton’s Forward Difference Formula

1. Linear Interpolation : The simplest way to connect two data points with a straight line.
Given that : 𝑥0 𝑥1
approximating
𝑓 𝑥0 𝑓 𝑥1 polynomial

Consider a general equation of straight line


𝑃1 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 𝑓(𝑥1 ) 𝑃1 (𝑥)
At the point 𝑥 = 𝑥0 : 𝑓(𝑥0 )
𝑃1 𝑥0 = 𝑓 𝑥0 = 𝑏0
actual
At the point 𝑥 = 𝑥1 : function

𝑃1 𝑥1 = 𝑓 𝑥1 = 𝑏0 + 𝑏1 𝑥1 − 𝑥0
𝑥0 𝑥1
𝑓 𝑥1 − 𝑓(𝑥0 )
⇒ 𝑏1 =
𝑥1 − 𝑥0

Dr. Jitendra Kumar – IIT KHARAGPUR 22


𝑃1 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0

𝑏0 = 𝑓 𝑥0

𝑓 𝑥1 − 𝑓(𝑥0 )
𝑏1 =
𝑥1 − 𝑥0

Let us consider the equidistant data points, then

𝑓 𝑥0 + ℎ − 𝑓(𝑥0 ) ∆𝑓0
𝑏1 = =
ℎ ℎ

∆𝑓0
Interpolating Polynomial 𝑃1 𝑥 = 𝑓 𝑥0 + (𝑥 − 𝑥0 )

Dr. Jitendra Kumar – IIT KHARAGPUR 23


2. Quadratic Interpolation :

𝑥0 𝑥1 𝑥2
Suppose 3 data points are given:
𝑓 𝑥0 𝑓 𝑥1 𝑓 𝑥2

Consider a second order polynomial

𝑃2 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 + 𝑏2 𝑥 − 𝑥0 𝑥 − 𝑥1

At the point 𝑥 = 𝑥0 : 𝑏0 = 𝑓(𝑥0 )

𝑓 𝑥1 − 𝑓(𝑥0 )
At the point 𝑥 = 𝑥1 : 𝑏1 =
𝑥1 − 𝑥0

∆𝑓0
In the case of equidistant data points : 𝑏1 =

Dr. Jitendra Kumar – IIT KHARAGPUR 24


∆𝑓0
𝑃2 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 + 𝑏2 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑏0 = 𝑓(𝑥0 ) 𝑏1 =

Δ𝑓0
At the point 𝑥 = 𝑥2 : 𝑓 𝑥2 = 𝑓 𝑥0 + 𝑥2 − 𝑥0 + 𝑏2 𝑥2 − 𝑥0 𝑥2 − 𝑥1

⇒ 𝑓 𝑥2 = 𝑓 𝑥0 + 2𝑓 𝑥1 − 2𝑓 𝑥0 + 2! ℎ2 𝑏2

𝑓 𝑥2 − 2𝑓 𝑥1 + 𝑓(𝑥0 ) ∆2 𝑓0
⇒ = 𝑏2 ⇒ 𝑏2 =
2! ℎ2 2! ℎ2
Interpolating polynomial :

∆𝑓0 ∆2 𝑓0
𝑃2 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )
ℎ 2! ℎ2

Dr. Jitendra Kumar – IIT KHARAGPUR 25


∆𝑓0 ∆𝑓0 ∆2 𝑓0
𝑃1 𝑥 = 𝑓 𝑥0 + (𝑥 − 𝑥0 ) 𝑃2 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )
ℎ ℎ 2! ℎ2

Generalized Formula :

We can now write the Newton’s forward difference formula based on (𝑛 + 1) nodal points 𝑥0 , 𝑥1 , … , 𝑥𝑛 as:

∆𝑓0 ∆2 𝑓0 ∆𝑛 𝑓0
𝑃𝑛 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 2
+ ⋯ + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥𝑛−1
ℎ 2! ℎ 𝑛! ℎ𝑛

𝑥 − 𝑥0
If we put = 𝑢 then it takes the following form:

𝑢(𝑢 − 1) 2 𝑢 𝑢−1 ⋯ 𝑢−𝑛+1 𝑛


𝑃𝑛 𝑥0 + ℎ𝑢 = 𝑓0 + 𝑢∆𝑓0 + ∆ 𝑓0 + ⋯ + ∆ 𝑓0
2! 𝑛!

Dr. Jitendra Kumar – IIT KHARAGPUR 26


Alternative Derivation :

𝑥 − 𝑥0
𝑓 𝑥 = 𝑓 𝑥0 + ℎ = 𝑓 𝑥0 + 𝑢ℎ

= 𝐸 𝑢 𝑓 𝑥0

= 1 + ∆ 𝑢 𝑓 𝑥0

𝑢(𝑢 − 1) 2 𝑢 𝑢−1 ⋯ 𝑢−𝑛+1 𝑛


= 𝑓0 + 𝑢 ∆𝑓0 + ∆ 𝑓0 + ⋯ + ∆ 𝑓0 + ⋯
2! 𝑛!

Neglecting the difference ∆𝑛+1 𝑓0 and higher order differences , we get the above generalized
formula.

Dr. Jitendra Kumar – IIT KHARAGPUR 27


Newton’s Backward Difference Formula :

𝛻𝑓𝑛 (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 ) 2 𝑥 − 𝑥𝑛 𝑥 − 𝑥𝑛−1 … (𝑥 − 𝑥1 ) 𝑛


𝑃𝑛 𝑥 = 𝑓𝑛 + 𝑥 − 𝑥𝑛 + 𝛻 𝑓𝑛 + ⋯ + 𝛻 𝑓𝑛
ℎ 2! ℎ2 𝑛! ℎ𝑛

𝑥 − 𝑥𝑛
𝑓 𝑥 = 𝑓 𝑥𝑛 + ℎ = 𝑓 𝑥𝑛 + ℎ𝑢 = 𝐸 𝑢 𝑓 𝑥𝑛 = 1 − 𝛻 −𝑢 𝑓 𝑥𝑛 𝛻 ≡ 1 − 𝐸 −1

𝑢 𝑢+1 2 𝑢 𝑢+1 … 𝑢+𝑛−1 𝑛


= 𝑓 𝑥𝑛 + 𝑢𝛻𝑓 𝑥𝑛 + 𝛻 𝑓 𝑥𝑛 + ⋯ + 𝛻 𝑓 𝑥𝑛 + ⋯
2! 𝑛!

Neglecting the difference 𝛻 𝑛+1 𝑓(𝑥𝑛 ) and higher order differences, we get:

𝑢(𝑢 + 1) 2 𝑢 𝑢+1 … 𝑢+𝑛−1 𝑛


𝑃𝑛 𝑥𝑛 + ℎ𝑢 = 𝑓𝑛 + 𝑢𝛻𝑓𝑛 + 𝛻 𝑓𝑛 + ⋯ + 𝛻 𝑓𝑛
2! 𝑛!

Dr. Jitendra Kumar – IIT KHARAGPUR 28


 Newton’s Forward Interpolation Formula

∆𝑓0 ∆2 𝑓0 ∆𝑛 𝑓0
𝑃𝑛 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 + ⋯ + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥𝑛−1
ℎ 2! ℎ2 𝑛! ℎ𝑛

 Newton’s Backward Interpolation Formula

𝛻𝑓𝑛 𝛻 2 𝑓𝑛
𝑃𝑛 𝑥 = 𝑓𝑛 + 𝑥 − 𝑥𝑛 + 𝑥 − 𝑥𝑛 𝑥 − 𝑥𝑛−1 2
+⋯
ℎ 2! ℎ
𝛻 𝑛 𝑓𝑛
+ 𝑥 − 𝑥𝑛 𝑥 − 𝑥𝑛−1 … 𝑥 − 𝑥1
𝑛! ℎ𝑛

Dr. Jitendra Kumar – IIT KHARAGPUR 29


Example : Using Newton forward and backward interpolation formula, find the quadratic polynomial
which takes the following values

𝑥 0 1 2
𝑓(𝑥) 1 2 1

Solution : The difference table

𝑥 𝑓(𝑥) 𝛻𝑓/∆𝑓 𝛻 2 𝑓/∆2 𝑓

0 1
1 −2
1 2
−1
2 1

Dr. Jitendra Kumar – IIT KHARAGPUR 30


Newton’s Forward Formula: 𝑥 𝑓(𝑥) 𝛻𝑓/∆𝑓 𝛻 2 𝑓/∆2 𝑓

0 1
(𝑥 − 𝑥0 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 2 1 −2
1 2
𝑃2 𝑥 = 𝑓0 + ∆𝑓0 + ∆ 𝑓0 −1
ℎ 2! ℎ2 2 1

𝑥−0 𝑥−0 𝑥−1


=1+ .1 + ⋅ (−2)
1 2! ⋅ 1

= 1 + 𝑥 − 𝑥2 + 𝑥

= 1 + 2𝑥 − 𝑥 2

Dr. Jitendra Kumar – IIT KHARAGPUR 31


Newton’s Backward Formula: 𝑥 𝑓(𝑥) 𝛻𝑓/∆𝑓 𝛻 2 𝑓/∆2 𝑓

0 1
1 −2
(𝑥 − 𝑥2 ) (𝑥 − 𝑥2 )(𝑥 − 𝑥1 ) 2 1 2
𝑃2 𝑥 = 𝑓2 + 𝛻𝑓2 + 𝛻 𝑓2 −1
ℎ 2! ℎ2 2 1

𝑥−2 𝑥−2 𝑥−1


=1+ ⋅ −1 + ⋅ (−2)
1 2! ⋅ 1

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

= 1 + 2𝑥 − 𝑥 2

Dr. Jitendra Kumar – IIT KHARAGPUR 32


Note : If we wish to add another data point, say 𝑥3 , 𝑓 𝑥3 = 3, 10 we need to add only another row to
the difference table in order to apply forward difference formula.

𝑥 𝑓(𝑥) 𝛻𝑓/∆𝑓 𝛻 2 𝑓/∆2 𝑓 ∆3 𝑓/𝛻 3 𝑓

0 1
1 −2
1 2 −1 12
2 1 10
9
3 10

𝑥−0 𝑥−1 𝑥−2


𝑃2 𝑥 = 1 + 2𝑥 − 𝑥2 + (12)
3!

= 1 + 2𝑥 − 𝑥 2 + 2𝑥 𝑥 2 − 3𝑥 + 2

= 2𝑥 3 − 7𝑥 2 + 6𝑥 + 1

Dr. Jitendra Kumar – IIT KHARAGPUR 33


Example : Construct Newton’s forward interpolation polynomial for the following table :

𝑥 4 6 8 10
𝑦 1 3 8 16
Hence evaluate the interpolating polynomial for 𝑥 = 5.

Solution : Difference table:

𝑥 𝑦 ∆𝑦 ∆2 𝑦 ∆3 𝑦

4 1
2 3 0
6 3
8 8 5 3
10 16 8

Dr. Jitendra Kumar – IIT KHARAGPUR 34


(𝑥 − 4) 𝑥−4 𝑥−6 𝑥 𝑦 ∆𝑦 ∆2 𝑦 ∆3 𝑦
𝑃 𝑥 =1+ ⋅2+ 2
⋅3+0
2 2! 2
4 1
2 3 0
6 3
3 2 8 8 5 3
= 1 + 𝑥 − 4 + 𝑥 − 10𝑥 + 24 10 16 8
8

11 3 2
=6− 𝑥+ 𝑥
4 8

11 3
𝑃 5 =6− × 5 + × 25 = 1.625
4 8

Note : In this example, given 4 data points we get only a second degree polynomial.

Dr. Jitendra Kumar – IIT KHARAGPUR 35


Example: Apply Newton’s backward difference formula to the data below:

𝑥 1 2 3 4 5
𝑦 1 −1 1 −1 1

Difference Table:

𝑥 𝑓(𝑥) 𝛻𝑓 𝛻2𝑓 𝛻 3 𝑓3 𝛻 4 𝑓3
1 1 −2
2 −1 4 −8
2 −4 16
3 1 −2 8
4
4 −1 2
5 1

Dr. Jitendra Kumar – IIT KHARAGPUR 36


Backward Difference Formula 𝑥 𝑓(𝑥) 𝛻𝑓 𝛻2𝑓 𝛻 3 𝑓3 𝛻 4 𝑓3
1 1 −2
𝛻𝑓4 (𝑥 − 𝑥4 )(𝑥 − 𝑥3 ) 2 2 −1 4 −8
𝑃4 𝑥 = 𝑓4 + 𝑥 − 𝑥4 + 2
𝛻 𝑓4 2 −4 16
ℎ 2! ℎ 3 1 −2 8
4
(𝑥 − 𝑥4 )(𝑥 − 𝑥3 )(𝑥 − 𝑥2 ) 3 4 −1 2
+ 3
𝛻 𝑓4 5 1
3! ℎ

(𝑥 − 𝑥4 )(𝑥 − 𝑥3 )(𝑥 − 𝑥2 )(𝑥 − 𝑥1 ) 4


+ 𝛻 𝑓4
4! ℎ4
(𝑥 − 5)(𝑥 − 4) (𝑥 − 5)(𝑥 − 4)(𝑥 − 3)
𝑃4 𝑥 = 1 + 𝑥 − 5 2 + 4+ 8
2 6
(𝑥 − 5)(𝑥 − 4)(𝑥 − 3)(𝑥 − 2)
+ 16
2 100 2 24
= 𝑥 4 − 8𝑥 3 + 𝑥 − 56𝑥 + 31
3 3

Dr. Jitendra Kumar – IIT KHARAGPUR 37


Example : Approximate the function 𝑒 𝑥 on the interval [0, 1] by using polynomial interpolation with

𝑥0 = 0, 𝑥1 = 0.5, 𝑥2 = 1. Let 𝑃2 (𝑥) denote the interpolation polynomial.

𝑎) Find the interpolating polynomial using any method.

𝑏) Find an upper bound for the error magnitude max |𝑒 𝑥 − 𝑃2 (𝑥)| .


0≤𝑥≤1

𝑐) Compare the actual error at different points of your choice with the error bound.

Dr. Jitendra Kumar – IIT KHARAGPUR 40


(𝑥 − 𝑥0 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 2
𝑎) Difference table : 𝑃2 𝑥 = 𝑓0 + ∆𝑓0 + ∆ 𝑓0
ℎ 2! ℎ2

𝑥 𝑓(𝑥) ∆𝑓 ∆2 𝑓

0 1
0.6487 0.4208
0.5 1.6487
1 2.7183 1.0696

0.6487 0.4208
𝑃2 𝑥 = 1 + 𝑥 − 0 + 𝑥−0 𝑥 − 0.5
0.5 2 × 0.52
1
= 1 + 1.2974 𝑥 + 𝑥 2 − 𝑥 × 0.8416
2

= 0.8416𝑥 2 + 0.8766𝑥 + 1

Dr. Jitendra Kumar – IIT KHARAGPUR 41


𝑛+1
𝜉 𝑓
𝑏) 𝑓 𝑥 − 𝑃𝑛 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ (𝑥 − 𝑥𝑛 )
𝑛+1 !

𝑥
1 1
max 𝑒 − 𝑃2 𝑥 ≤ max 𝑒 𝑡 max 𝑥−0 𝑥− 𝑥−1
𝑥∈[0,1] 6 𝑡∈ 0,1 𝑥∈ 0,1 2

1 1
= ×𝑒× 𝑥−0 𝑥− 𝑥−1 = 0.0218
6 2 𝑥=
3± 3
6

1 1 1
Let 𝑔 = 𝑥 𝑥 − 𝑥−1 ⟹ 𝑔′ = 𝑥− 𝑥−1 +𝑥 𝑥−1 +𝑥 𝑥− =0
2 2 2

1
1 3± 9−4×3× 3± 3
2
⟹ 3𝑥 2 − 3𝑥 + = 0 ⟹ 𝑥 = =
2 2×3 6

Dr. Jitendra Kumar – IIT KHARAGPUR 42


𝑏) Error bound

max 𝑒 𝑥 − 𝑃2 𝑥 ≤ 0.0218
𝑥∈[0,1]

𝑐) Comparison with actual error

𝑥 0.1 0.3 0.6 0.9


|𝑒 𝑥 − 𝑃2 (𝑥)| 0.0091 0.0111 0.0068 0.0110

Dr. Jitendra Kumar – IIT KHARAGPUR 43


 Newton’s Divided - Difference Interpolating Polynomial

 Lagrange's Interpolation Formula

Dr. Jitendra Kumar – IIT KHARAGPUR 44


Recall: Previous Lecture

 Newton’s Forward Interpolation Formula

∆𝑓0 ∆2 𝑓0 ∆𝑛 𝑓0
𝑃𝑛 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 2
+ ⋯ + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥𝑛−1
ℎ 2! ℎ 𝑛! ℎ𝑛

 Newton’s Backward Interpolation Formula

𝛻𝑓𝑛 𝛻 2 𝑓𝑛
𝑃𝑛 𝑥 = 𝑓𝑛 + 𝑥 − 𝑥𝑛 + 𝑥 − 𝑥𝑛 𝑥 − 𝑥𝑛−1 +⋯
ℎ 2! ℎ2
𝛻 𝑛 𝑓𝑛
+ 𝑥 − 𝑥𝑛 𝑥 − 𝑥𝑛−1 … 𝑥 − 𝑥1
𝑛! ℎ𝑛

Note that both formulas were derived taking equidistant nodal points!
Dr. Jitendra Kumar – IIT KHARAGPUR 45
Newton’s Divided - Difference Interpolating Polynomial

Linear Polynomial : Given that : 𝑥0 𝑥1


𝑓 𝑥0 𝑓 𝑥1

𝑃1 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0

At the point 𝑥 = 𝑥0 : 𝑓 𝑥0 = 𝑏0

At the point 𝑥 = 𝑥1 : 𝑓 𝑥1 = 𝑏0 + 𝑏1 𝑥1 − 𝑥0

𝑓 𝑥1 − 𝑓(𝑥0 )
⇒ 𝑏1 = = 𝑓 𝑥1 , 𝑥0 divided difference
𝑥1 − 𝑥0

𝑃1 𝑥 = 𝑓 𝑥0 + 𝑓[𝑥1 , 𝑥0 ](𝑥 − 𝑥0 )

Dr. Jitendra Kumar – IIT KHARAGPUR 46


Quadratic polynomial: Given data points: (𝑥0 , 𝑓(𝑥0 )), (𝑥1 , 𝑓(𝑥1 )), (𝑥2 , 𝑓(𝑥2 ))

In this case, we can fit a polynomial of degree 2: 𝑃2 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 + 𝑏2 𝑥 − 𝑥0 𝑥 − 𝑥1

At the point 𝑥 = 𝑥0 : 𝑏0 = 𝑓 𝑥0

At the point 𝑥 = 𝑥1 : 𝑏1 = 𝑓[𝑥1 , 𝑥0 ]

𝑓 𝑥2 − 𝑓(𝑥1 ) 𝑓 𝑥1 − 𝑓(𝑥0 )
− 𝑓 𝑥2 , 𝑥1 − 𝑓[𝑥1 , 𝑥0 ]
𝑥2 − 𝑥1 𝑥1 − 𝑥0
At the point 𝑥 = 𝑥2 : 𝑏2 = =
𝑥2 − 𝑥0 𝑥2 − 𝑥0

= 𝑓[𝑥2 , 𝑥1 , 𝑥0 ]

𝑃2 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1 , 𝑥0 𝑥 − 𝑥0 + 𝑓[𝑥2 , 𝑥1 , 𝑥0 ](𝑥 − 𝑥0 )(𝑥 − 𝑥1 )

Dr. Jitendra Kumar – IIT KHARAGPUR 47


Generalized formula for Newton’s Divided-Difference Interpolating Polynomial

𝑃𝑛 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥1 , 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥2 , 𝑥1 , 𝑥0 + ⋯

+ 𝑥 − 𝑥0 𝑥 − 𝑥1 … 𝑥 − 𝑥𝑛−1 𝑓 𝑥𝑛 , 𝑥𝑛−1 , … , 𝑥0

This is called Newton’s divided difference interpolating polynomial.

Dr. Jitendra Kumar – IIT KHARAGPUR 48


Lagrange Interpolating Polynomial

Linear Polynomial : Given data points : 𝑥0 , 𝑓 𝑥0 , 𝑥1 , 𝑓 𝑥1 1

𝑃1 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 )
𝑃1 𝑥 = 𝑓 𝑥0 + 𝑓[𝑥1 , 𝑥0 ](𝑥 − 𝑥0 ) 𝑖=0

𝑓 𝑥1 − 𝑓 𝑥0
𝑃1 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0
𝑥1 − 𝑥0

(𝑥 − 𝑥1 ) (𝑥 − 𝑥0 )
= 𝑓 𝑥0 + 𝑓(𝑥1 )
(𝑥0 −𝑥1 ) (𝑥1 −𝑥0 )

𝐿0 (𝑥) 𝐿1 (𝑥)

𝐿0 & 𝐿1 are called Lagrange polynomials of degree 1.

Dr. Jitendra Kumar – IIT KHARAGPUR 49


1
(𝑥 − 𝑥1 ) (𝑥 − 𝑥0 )
Linear Polynomial : 𝑃1 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 ) 𝐿0 𝑥 = 𝐿1 𝑥 =
(𝑥0 −𝑥1 ) (𝑥1 −𝑥0 )
𝑖=0
1
𝑥 − 𝑥𝑗
𝐿𝑖 𝑥 = ෑ ; 𝑖 = 0, 1
Generalized Lagrange Interpolating Polynomial 𝑥𝑖 − 𝑥𝑗
𝑗=0
𝑗≠𝑖
Given data points : 𝑥0 , 𝑓 𝑥0 , 𝑥1 , 𝑓 𝑥1 , … , 𝑥𝑛 , 𝑓 𝑥𝑛 .

𝑃𝑛 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=0

𝑛
𝑥 − 𝑥𝑗 𝑥 − 𝑥0 𝑥 − 𝑥1 … 𝑥 − 𝑥𝑖−1 𝑥 − 𝑥𝑖+1 … (𝑥 − 𝑥𝑛 )
𝐿𝑖 𝑥 = ෑ =
𝑥𝑖 − 𝑥𝑗 𝑥𝑖 − 𝑥0 𝑥𝑖 − 𝑥1 … 𝑥𝑖 − 𝑥𝑖−1 𝑥𝑖 − 𝑥𝑖+1 … (𝑥𝑖 − 𝑥𝑛 )
𝑗=0
𝑗≠𝑖
Lagrange’s polynomial of degree 𝑛

Dr. Jitendra Kumar – IIT KHARAGPUR 50


Example : Using Lagrange and the Newton-divided difference formulas, construct a polynomial of degree 2 or
less with the following data:
𝑥 1 2 4
𝑓(𝑥) 1 3 3
2
Solution : Lagrange interpolating polynomial: 𝑃2 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=0

(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) (𝑥 − 2)(𝑥 − 4) 1
𝐿0 𝑥 = = = 𝑥−2 𝑥−4
𝑥0 − 𝑥1 (𝑥0 − 𝑥2 ) (1 − 2)(1 − 4) 3

(𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) (𝑥 − 1)(𝑥 − 4) 1
𝐿1 𝑥 = = =− 𝑥−1 𝑥−4
𝑥1 − 𝑥0 (𝑥1 − 𝑥2 ) (2 − 1)(2 − 4) 2

(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) (𝑥 − 1)(𝑥 − 2) 1
𝐿2 𝑥 = = = (𝑥 − 1)(𝑥 − 2)
𝑥2 − 𝑥0 (𝑥2 − 𝑥1 ) (4 − 1)(4 − 2) 6

Dr. Jitendra Kumar – IIT KHARAGPUR 51


1 1 1
𝐿0 𝑥 = 𝑥−2 𝑥−4 𝐿1 𝑥 = − 𝑥−1 𝑥−4 𝐿2 𝑥 = (𝑥 − 1)(𝑥 − 2)
3 2 6

2
Lagrange interpolating polynomial : 𝑃2 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=0

1 1 1
𝑃2 𝑥 = 𝑥 − 2 𝑥 − 4 × 1 − 𝑥 − 1 𝑥 − 4 × 3 + 𝑥 − 1 𝑥 − 2 × 3
3 2 6

1 2 3 1
= 𝑥 − 6𝑥 + 8 − 𝑥 2 − 5𝑥 + 4 + 𝑥 2 − 3𝑥 + 2
3 2 2

2 2 7
= − 𝑥 + 4𝑥 −
3 3

Dr. Jitendra Kumar – IIT KHARAGPUR 52


Newton’s Divided-Difference Formula:

Divided-Difference table

𝑥 𝑓(𝑥) 𝑓 𝑥𝑖 , 𝑥𝑖−1 𝑓 𝑥𝑖 , 𝑥𝑖−1 , 𝑥𝑖−2

1 1
2 2
2 3 −
0 3
4 3

𝑃2 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1 , 𝑥0 𝑥 − 𝑥0 + 𝑓[𝑥2 , 𝑥1 , 𝑥0 ](𝑥 − 𝑥0 )(𝑥 − 𝑥1 )

2
= 1 + 2 𝑥 − 1 − (𝑥 − 1)(𝑥 − 2)
3
2 2 7
= − 𝑥 + 4𝑥 −
3 3

Dr. Jitendra Kumar – IIT KHARAGPUR 53


Example: Use the Lagrange and the Newton-divided difference formulas to derive interpolating polynomial
from the following table: 𝑥 0 1 2 4 5 6
𝑓(𝑥) 1 14 15 5 6 19

Divided difference table:

𝑥 𝑓(𝑥) 𝑓 ⋅,⋅ 𝑓[⋅,⋅,⋅] 𝑓 ⋅,⋅,⋅,⋅ 𝑓 ⋅,⋅,⋅,⋅,⋅ 𝑓 ⋅,⋅,⋅,⋅,⋅,⋅

0 1
13
1 14 −6 1
1 0
2 15 −2 1 0
−5 0
4 5 2 1
5 6 1
6
6 19 13

Dr. Jitendra Kumar – IIT KHARAGPUR 54


𝑃5 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1 , 𝑥0 𝑥 − 𝑥0 + 𝑓 𝑥2 , 𝑥1 , 𝑥0 𝑥 − 𝑥0 𝑥 − 𝑥1 + 𝑓[𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 ](𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )

= 1 + 13 𝑥 − 6 𝑥 𝑥 − 1 + 1(𝑥)(𝑥 − 1)(𝑥 − 2)

= 𝑥 3 − 9𝑥 2 + 21𝑥 + 1

Divided difference table:

𝑥 𝑓(𝑥) 𝑓 ⋅,⋅ 𝑓[⋅,⋅,⋅] 𝑓 ⋅,⋅,⋅,⋅ 𝑓 ⋅,⋅,⋅,⋅,⋅ 𝑓 ⋅,⋅,⋅,⋅,⋅,⋅

0 1
13
1 14 −6 1
1 0
2 15 −2 1 0
−5 0
4 5 2 1
5 6 1
6
6 19 13

Dr. Jitendra Kumar – IIT KHARAGPUR 55


Lagrange’s Interpolation Formula 𝑥 0 1 2 4 5 6
5
𝑓(𝑥) 1 14 15 5 6 19
𝑃5 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=0

𝑥– 1 𝑥– 2 𝑥– 4 𝑥– 5 𝑥– 6 𝑥 𝑥– 2 𝑥– 4 𝑥– 5 𝑥– 6
= ×1 + × 14
(−1)(−2)(−4)(−5)(−6) 1 − 0 1 − 2 1 − 4 (1 − 5)(1 − 6)

𝑥 𝑥 –1 𝑥 – 4 𝑥 – 5 𝑥 – 6 𝑥 𝑥 –1 𝑥 –2 𝑥 – 5 𝑥 – 6
+ × 15 + ×5
2 − 0 2 − 1 2 − 4 (2 − 5)(2 − 6) 4 − 0 4 − 1 4 − 2 (4 − 5)(4 − 6)

𝑥 𝑥 –1 𝑥 –2 𝑥 –4 𝑥 – 6 𝑥 𝑥 –1 𝑥 –2 𝑥 –4 𝑥 –5
+ ×6+ × 19
5 − 0 5 − 1 5 − 2 (5 − 4)(5 − 6) 6 − 0 6 − 1 6 − 2 (6 − 4)(6 − 5)

= 𝑥 3 − 9𝑥 2 + 21𝑥 + 1

Dr. Jitendra Kumar – IIT KHARAGPUR 56


CONCLUSIONS

Newton’s Divided-Difference Interpolating Polynomial

𝑃𝑛 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥1 , 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥2 , 𝑥1 , 𝑥0 + ⋯

+ 𝑥 − 𝑥0 𝑥 − 𝑥1 … 𝑥 − 𝑥𝑛−1 𝑓 𝑥𝑛 , 𝑥𝑛−1 , … , 𝑥0
Lagrange Interpolating Polynomial

𝑛 𝑛
𝑥 − 𝑥𝑗
𝑃𝑛 𝑥 = ෍ 𝐿𝑖 𝑥 𝑓(𝑥𝑖 ) 𝐿𝑖 𝑥 = ෑ
𝑥𝑖 − 𝑥𝑗
𝑖=0 𝑗=0
𝑗≠𝑖

Dr. Jitendra Kumar – IIT KHARAGPUR 57

You might also like