Lagrange interpolation
General · Mathematics
Study notes
Q: Find Lagrange polynomial through (0,1), (1,3), (2,7). Evaluate at x = 1.5. L₀ = (x-1)(x-2)/((0-1)(0-2)) = (x-1)(x-2)/2. L₁ = x(x-2)/((1)(1-2)) = -x(x-2). L₂ = x(x-1)/((2)(1)) = x(x-1)/2. P = 1·L₀+3·L₁+7·L₂. At 1.5: L₀ = (0.5)(-0.5)/2 = -0.125; L₁ = -1.5(-0.5) = 0.75; L₂ = 1.5(0.5)/2 = 0.375. P(1.5) = -0.125+2.25+2.625 = 4.75! (Check: x²+x+1: 2.25+1.5+1 = 4.75 ✓!)