Question #110428
Given the following data, estimate the value of f(5) using
i) Lagrange’s interpolation
ii) Newton’s divided difference interpolation
x 1 4 6 7 10
f(x) -3 9 10 9 8
1
Expert's answer
2020-04-20T11:44:35-0400

i01234x146710f(x)391098\begin{matrix} i&0&1&2&3&4\\ x & 1&4&6&7&10 \\ f(x)&-3&9&10&9&8 \end{matrix}

i) Lagrange’s interpolation 

f(x)=(x4)(x6)(x7)(x10)(14)(16)(17)(110)(3)++(x1)(x6)(x7)(x10)(41)(46)(47)(410)9++(x1)(x4)(x7)(x10)(61)(64)(67)(610)10++(x1)(x4)(x6)(x10)(71)(74)(76)(710)9++(x1)(x4)(x6)(x7)(101)(104)(106)(107)8f(x)=\frac{(x-4)(x-6)(x-7)(x-10)}{(1-4)(1-6)(1-7)(1-10)}\cdot(-3)+\\ +\frac{(x-1)(x-6)(x-7)(x-10)}{(4-1)(4-6)(4-7)(4-10)}\cdot9+\\ +\frac{(x-1)(x-4)(x-7)(x-10)}{(6-1)(6-4)(6-7)(6-10)}\cdot10+\\ +\frac{(x-1)(x-4)(x-6)(x-10)}{(7-1)(7-4)(7-6)(7-10)}\cdot9+\\ +\frac{(x-1)(x-4)(x-6)(x-7)}{(10-1)(10-4)(10-6)(10-7)}\cdot8

f(5)=(54)(56)(57)(510)(270)++(51)(56)(57)(510)(12)++(51)(54)(57)(510)(4)++(51)(54)(56)(510)(6)++(51)(54)(56)(57)81==127+103+10103+881=10.14f(5)=\frac{(5-4)(5-6)(5-7)(5-10)}{(-270)}+\\ +\frac{(5-1)(5-6)(5-7)(5-10)}{(-12)}+\\ +\frac{(5-1)(5-4)(5-7)(5-10)}{(4)}+\\ +\frac{(5-1)(5-4)(5-6)(5-10)}{(-6)}+\\ +\frac{(5-1)(5-4)(5-6)(5-7)}{81}=\\ =\frac{1}{27}+\frac{10}{3}+10-\frac{10}{3}+\frac{8}{81}=10.14


ii) Newton’s divided difference interpolation  

139+341=4490.5461=0.710964=0.561010.517=0.2591076=1790.3+1410=0.1289107=0.3108\begin{matrix} 1 & -3 \\ &&\frac{9+3}{4-1}=4\\ 4 & 9&&\frac{0.5-4}{6-1}=-0.7\\ &&\frac{10-9}{6-4}=0.5&&\\ 6&10&&\frac{-1-0.5}{1-7}=0.25&&\\ &&\frac{9-10}{7-6}=-1&&\\ 7&9&&\frac{-0.3+1}{4-10}=-0.12\\ &&\frac{8-9}{10-7}=-0.3\\ 10&8 \end{matrix}



0.25+0.771=0.160.060.16101=0.020.120.25104=0.06\begin{matrix} \frac{0.25+0.7}{7-1}=0.16\\ &&\frac{-0.06-0.16}{10-1}=-0.02\\ \frac{-0.12-0.25}{10-4}=-0.06\\ \end{matrix}

Resulting coefficients are:[-3,4,-0.7,0.16,-0.02]

Create Target Polynomials

f(x)=3+4(x1)0.7(x1)(x4)++0.16(x1)(x4)(x6)0.02(x1)(x4)(x6)(x7)f(5)=3+4(51)0.7(51)(54)++0.16(51)(54)(56)0.02(51)(54)(56)(57)=9.4f(x)=-3+4(x-1)-0.7(x-1)(x-4)+\\+0.16(x-1)(x-4)(x-6)-\\ -0.02(x-1)(x-4)(x-6)(x-7)\\ f(5)=-3+4(5-1)-0.7(5-1)(5-4)+\\+0.16(5-1)(5-4)(5-6)-\\ -0.02(5-1)(5-4)(5-6)(5-7)=9.4



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS