GATE | GATE-IT-2004 | Question 38

If f(1) = 2,f(2) = 4 and f(4) = 16,what is the value of f(3)using Lagrange’s interpolation formula?
(A) 8
(B) 8 1/3
(C) 8 2/3
(D) 9


Answer: (C)

Explanation:
Using Lagrange’s interpolation formula :

f(x) = ((x – x2)(x – x4)/(x1 – x2)(x1 – x4)) * f1 + ((x – x1)(x – x4)/(x2 – x1)(x2 – x4)) * f2 + ((x – x1)(x – x2)/(x4 – x1)(x4 – x2)) * f4

f(3) = ((3 – 2)(3 – 4)/(1 – 2)(1 – 4)) * 2 + ((3 – 1)(3 – 4)/(2 – 1)(2 – 4)) * 4 + ((3 – 1)(3 – 2)/(4 – 1)(4 – 2)) * 16
f(3) = -2/3 + 4 + 16/3
f(3) = 8 (2/3)

 
Thus, option (C) is correct.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.