Question: use matlab code Example 3.4 Consider the following table of functional values, generated with f(x) = Inx Find f(0.60), use Lagrange interpolating polynomials of degree
Example 3.4 Consider the following table of functional values, generated with f(x) = Inx Find f(0.60), use Lagrange interpolating polynomials of degree three. i f(x) 0 0.40 -0.9163 1 0.50 -0.6931 2 0.70 -0.3567 3 0.80 -0.2231 Solution: Ps(x) = P3(x) = L:(+)f(x) = L.(x)f(x) + L (x)f(x) + L2(x)f(x2)+L3(x)f(x3) P3(0.60) = f(x)L.(0.6) + f(x)L, (0.6) + f(x2)L2(0.6) + f(x3)L3(0.6) (0.6- x)(0.6 - x)(0.6 x3)_(0.6 - 0.5)(0.6 -0.7)(0.6 -0.8) L,(0.6) (Xo - x)(xo - x2)(xo - x3) (0.4 -0.5)(0.4 -0.7)(0.4 -0.8) = -0.1667 (0.6 - x)(0.6 - x2)(0.6 - x3)(0.6 -0.4)(0.6 -0.7)(0.6 - 0.8) L(0.6) (x1 - x0)(x1 - x)(x1 - x3) (0.5 -0.4)(0.5 -0.7)(0.5-0.8) = 0.6667 (0.6 - x0)(0.6 - x1)(0.6 - X3)_(0.6 -0.4)(0.6 -0.5)(0.6 -0.8) L2(0.6) = (x2 xo)(x2 - 1)(x2 x3) (0.7 -0.4)(0.7 -0.5)(0.7 -0.8) = 0.6667 (0.6 - Xo) (0.6 - x)(0.6 - X)_ (0.6 - 0.4)(0.6 -0.5)(0.6 -0.7) L3(0.6) = (x3 - x0)(x3 - x)(x3 - x2) (0.8 -0.4)(0.8 -0.5)(0.8 -0.7) = -0.1667 P3(0.60) = -0.1667(-0.9163) + 0.6667(-0.6931) + 0.6667(-0.3567) + -0.1667(-0.2231) P3 (0.60) = -0.510
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
