Answer on Question #54865 – Math – Algorithms | Quantitative Methods
Question
If f(1)=1,f(3)=19,f(4)=49 and f(5)=101, find the Lagrange's interpolation polynomial of f(x)
Solution
If f(xi)=yi,i=0,1,2,…,n, then Lagrange's interpolation polynomial of f(x) is polynomial of n-th degree in form
L(x)=j=0∑nyjlj(x)
where
lj(x)=xj−x0x−x0⋅xj−x1x−x1⋯xj−xj−1x−xj−1⋅xj−xj+1x−xj+1⋯xj−xnx−xn
We have x0=1,x1=3,x2=4,x3=5 and y0=1,y1=19,y2=49,y3=101
l0(x)=1−3x−3⋅1−4x−4⋅1−5x−5=−241(x−3)(x−4)(x−5)=−241(x3−12x2+47x−60)l1(x)=3−1x−1⋅3−4x−4⋅3−5x−5=41(x−1)(x−4)(x−5)=41(x3−10x2+29x−20)l2(x)=4−1x−1⋅4−3x−3⋅4−5x−5=−31(x−1)(x−3)(x−5)=−31(x3−9x2+23x−15)l3(x)=5−1x−1⋅5−3x−3⋅5−4x−4=81(x−1)(x−3)(x−4)=81(x3−8x2+19x−12)
Hence L(X)=l0(x)+19l1(x)+49l2(x)+101l3(x)=
=−241(x3−12x2+47x−60)+419(x3−10x2+29x−20)−349(x3−9x2+23x−15)+8101(x3−8x2+19x−12)=x3−x2+1
Answer: L(x)=x3−x2+1.
www.AssignmentExpert.com
Comments