Find a Lagrange’s interpolating polynomial for the data given below:
x0 = 1, x1 = 2.5, x2 = 4 and x3 = 5.5
f(x0) = 4, f(x1) = 7.5, f(x2) = 13 and f(x3) = 17.5
Also, find the value of f(5).
"\\def\\arraystretch{1.5}\n \\begin{array}{c:c:c:c:c}\n x & 1 & 2.5 & 4 & 5.5 \\\\ \\hline\n f(x)& 4& 7.5 & 13 & 17.5 \\\\\n \\hdashline\n \n\\end{array}"
By Lagrange’s interpolation formula we have:
"f(x)= \\frac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_0-x_2)(x_0-x_3)}y_0+ \\frac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)} y_1+ \\frac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)}y_2+ \\frac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)} y_3= \\frac{(x-2.5)(x-4)(x-5.5)}{(1-2.5)(1-4)(1-5.5)}4+ \\frac{(x-1)(x-4)(x-5.5)}{(2.5-1)(2.5-4)(2.5-5.5)} 7.5+ \\frac{(x-1)(x-2.5)(x-5.5)}{(4-1)(4-2.5)(4-5.5)}13+ \\frac{(x-1)(x-2.5)(x-4)}{(5.5-1)(5.5-2.5)(5.5-4)} 17.5=-\\tfrac{16}{81}(x^3-12x^2+45.75x-55)+\\tfrac{10}{9}(x^3-10.5x^2+31.5x-22)-\\tfrac{52}{27}(x^3-9x^2+21.75x-13.75)+\\tfrac{70}{81}(x^3-7.5x^2+16.5x-10)=-\\tfrac{4}{27}x^3+\\tfrac{14}{9}x^2-\\tfrac{15}{9}x+\\tfrac{115}{27}"
"f(5)= -\\tfrac{4}{27}\\cdot 5^3+\\tfrac{14}{9}\\cdot5^2-\\tfrac{15}{9}\\cdot 5+\\tfrac{115}{27}=\\tfrac{440}{27}"
Answer: "f(x)= -\\tfrac{4}{27}x^3+\\tfrac{14}{9}x^2-\\tfrac{15}{9}x+\\tfrac{115}{27}" and "f(5)=\\tfrac{440}{27}" .
Comments
Leave a comment