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)=(xβˆ’4)(xβˆ’6)(xβˆ’7)(xβˆ’10)(1βˆ’4)(1βˆ’6)(1βˆ’7)(1βˆ’10)β‹…(βˆ’3)++(xβˆ’1)(xβˆ’6)(xβˆ’7)(xβˆ’10)(4βˆ’1)(4βˆ’6)(4βˆ’7)(4βˆ’10)β‹…9++(xβˆ’1)(xβˆ’4)(xβˆ’7)(xβˆ’10)(6βˆ’1)(6βˆ’4)(6βˆ’7)(6βˆ’10)β‹…10++(xβˆ’1)(xβˆ’4)(xβˆ’6)(xβˆ’10)(7βˆ’1)(7βˆ’4)(7βˆ’6)(7βˆ’10)β‹…9++(xβˆ’1)(xβˆ’4)(xβˆ’6)(xβˆ’7)(10βˆ’1)(10βˆ’4)(10βˆ’6)(10βˆ’7)β‹…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)=(5βˆ’4)(5βˆ’6)(5βˆ’7)(5βˆ’10)(βˆ’270)++(5βˆ’1)(5βˆ’6)(5βˆ’7)(5βˆ’10)(βˆ’12)++(5βˆ’1)(5βˆ’4)(5βˆ’7)(5βˆ’10)(4)++(5βˆ’1)(5βˆ’4)(5βˆ’6)(5βˆ’10)(βˆ’6)++(5βˆ’1)(5βˆ’4)(5βˆ’6)(5βˆ’7)81==127+103+10βˆ’103+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  

1βˆ’39+34βˆ’1=4490.5βˆ’46βˆ’1=βˆ’0.710βˆ’96βˆ’4=0.5610βˆ’1βˆ’0.51βˆ’7=0.259βˆ’107βˆ’6=βˆ’179βˆ’0.3+14βˆ’10=βˆ’0.128βˆ’910βˆ’7=βˆ’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.77βˆ’1=0.16βˆ’0.06βˆ’0.1610βˆ’1=βˆ’0.02βˆ’0.12βˆ’0.2510βˆ’4=βˆ’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(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.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