Lagranges Interpolation Formula
Lagranges Interpolation Formula
Lagranges Interpolation Formula
Proof: let the given function be 𝑦 = 𝑓(𝑥) . Given corresponding to the values 𝑥0 , 𝑥1 , 𝑥2 … … … 𝑥𝑛 of the
argument 𝑥 , the values of the function 𝑓(𝑥) be 𝑓(𝑥0 ), 𝑓(𝑥1 ), 𝑓(𝑥2 )……… 𝑓(𝑥𝑛 ) respectively, where the
intervals (𝑥1 − 𝑥0 ) , (𝑥2 − 𝑥1 ) , (𝑥3 − 𝑥2 ) ,…………… (𝑥𝑛 − 𝑥𝑛−1 ) May not be equal. Since (𝑛 + 1)
values of 𝑓(𝑥) are given, we can fit a polynomial of n-th degree,
Let 𝑓(𝑥) = 𝑎0 (𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … . . (𝑥 − 𝑥𝑛 ) + 𝑎1 (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … . . (𝑥 − 𝑥𝑛 )
+𝑎2 (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … . . (𝑥 − 𝑥𝑛 ) + ⋯ … . . … . . 𝑎𝑛 (𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … . . (𝑥 − 𝑥𝑛−1 )
…………………….(1)
Where 𝑎𝑖 , 𝑖 = 0,1,2,3 … … . 𝑛 are constants.
To find 𝑎0 , 𝑎1 , 𝑎2 …………… 𝑎𝑛 we put 𝑥 = 𝑥0 , 𝑥1 , 𝑥2 … … … 𝑥𝑛 respectively in (1) . Now putting 𝑥 = 𝑥0
in (1) we get,
𝑓(𝑥0 ) = 𝑎0 (𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … . . (𝑥0 − 𝑥𝑛 )
𝑓(𝑥0 )
⇒ 𝑎0 = (𝑥
0 −𝑥1 )(𝑥0 −𝑥2 )…..(𝑥0 −𝑥𝑛 )
At 𝑥 = 𝑥1 we get,
𝑓(𝑥1 ) = 𝑎1 (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … . . (𝑥1 − 𝑥𝑛 )
𝑓(𝑥1 )
⇒ 𝑎1 = (𝑥
1 −𝑥0 )(𝑥1 −𝑥2 )…..(𝑥1 −𝑥𝑛 )
Again at 𝑥 = 𝑥2 we get,
𝑓(𝑥2 ) = 𝑎2 (𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )(𝑥2 − 𝑥3 ) … . . (𝑥2 − 𝑥𝑛 )
𝑓(𝑥2 )
⇒ 𝑎2 = (𝑥
2 −𝑥0 )(𝑥2 −𝑥1 )(𝑥2 −𝑥3 )…..(𝑥2 −𝑥𝑛 )
This is called Lagrange 's interpolation formula and can be used for both equal and unequal intervals.
Problem 1: Apply Lagrange 's formula to find the form of the function 𝑓(𝑥) , using the following table:
x 0 1 2 3 4
𝑓(𝑥) 3 6 11 18 27
Solution: Here 𝑥0 = 0, 𝑥1 = 1, 𝑥2 = 2 , 𝑥3 = 3, 𝑥4 = 4
By the Lagrange 's interpolation formula, we have
(𝑥−𝑥1 )(𝑥−𝑥2 )(𝑥−𝑥3 )(𝑥−𝑥4 )
𝑓(𝑥) = (𝑥 𝑓(𝑥0 )
0 −𝑥1 )(𝑥0 −𝑥2 )(𝑥0 −𝑥3 )(𝑥0 −𝑥4 )
(𝑥−0)(𝑥−1)(𝑥−2)(𝑥−4) (𝑥−0)(𝑥−1)(𝑥−2)(𝑥−3)
+ (3)(2)(1)(−1)
× 18 + (4)(3)(2)(1)
× 27
3𝑥(𝑥−1)(𝑥−2)(𝑥−4) 9𝑥(𝑥−1)(𝑥−2)(𝑥−3)
− +
1 8
𝑥−1−8𝑥 22(𝑥−3)(𝑥−4)−24(𝑥−2)(𝑥−4)+9(𝑥−2)(𝑣−3)
⇒ 𝑓(𝑥) = (𝑥 2 − 5𝑥 + 6)(𝑥 − 4) { } + 𝑥(𝑥 − 1) { }
8 8
1 1
⇒ 𝑓(𝑥) = 8 (𝑥 2 − 5𝑥 + 6)(𝑥 − 4)(−7𝑥 − 1) + 8 (𝑥 2 − 𝑥)(22𝑥 2 − 66𝑥 − 88𝑥 + 264 − 24𝑥 2 + 48𝑥 +
96𝑥 − 192 + 9𝑥 2 − 18𝑥 − 27𝑥 + 54)
1 1
⇒ 𝑓(𝑥) = 8 (𝑥 3 − 5𝑥 2 + 6𝑥 − 4𝑥 2 + 20𝑥 − 24)(−7𝑥 − 1) + 8 (𝑥 2 − 𝑥)(7𝑥 2 − 55𝑥 + 126)
1 1
⇒ 𝑓(𝑥) = 8 (−7𝑥 4 + 63𝑥 3 − 182𝑥 2 + 168𝑥 − 𝑥 3 + 9𝑥 2 − 26𝑥 + 24) + 8 (7𝑥 4 − 7𝑥 3 − 55𝑥 3 + 55𝑥 2 +
126𝑥 2 − 126𝑥)
1
⇒ 𝑓(𝑥) = 8 (−7𝑥 4 + 7𝑥 4 + 63𝑥 3 − 63𝑥 3 + 190𝑥 2 − 182𝑥 2 + 168𝑥 − 152𝑥 + 24)
1
⇒ 𝑓(𝑥) = 8 (8𝑥 2 + 16𝑥 + 24)
⇒ 𝑓(𝑥) = 𝑥 2 + 2𝑥 + 3
Which is the required function.
Problem 2: Estimate √(155) using Lagrange 's interpolation formula from the table given below:
⇒ 𝑦(𝑥) = 12.45
(Ans:)
Problem 3: Using Lagrange 's Interpolation formula find the form of the function 𝑦 = 𝑓(𝑥) , from the
following table:
x 0 1 3 4
𝑦 = 𝑓(𝑥) -12 0 12 24
𝑥1 − 𝑥𝑜 = 1 𝑥0 − 𝑥1 = −1 𝑥0 − 𝑥2 = −3 𝑥0 − 𝑥3 = −4
𝑥2 − 𝑥𝑜 = 3 𝑥2 − 𝑥1 = 2 𝑥1 − 𝑥2 = −2 𝑥1 − 𝑥3 = −3
𝑥3 − 𝑥𝑜 = 4 𝑥3 − 𝑥1 = 3 𝑥3 − 𝑥2 = 1 𝑥2 − 𝑥3 = −1
Problem 4: Using Lagrange 's Interpolation formula find the value of 𝑓(10) , from the following table:
x 5 6 9 11
𝑓(𝑥) 12 13 14 16