Formula
Lagrange's Interpolation formula
|
`y(x) = ((x - x_1)(x - x_2)...(x - x_n))/((x_0 - x_1)(x_0 - x_2)...(x_0 - x_n)) xx y_0 + ((x - x_0)(x - x_2)...(x - x_n))/((x_1 - x_0)(x_1 - x_2)...(x_1 - x_n)) xx y_1` `+ ((x - x_0)(x - x_1)(x - x_3)...(x - x_n))/((x_2 - x_0)(x_2 - x_1)(x_2 - x_3)...(x_2 - x_n)) xx y_2 + ... + ((x - x_0)(x - x_1)...(x - x_(n-1)))/((x_n - x_0)(x_n - x_1)...(x_n - x_(n-1))) xx y_n`
|
Examples
1. Find Solution using Lagrange's Interpolation formula
x | f(x) |
300 | 2.4771 |
304 | 2.4829 |
305 | 2.4843 |
307 | 2.4871 |
x = 301
Solution:
The value of table for `x` and `y`
x | 300 | 304 | 305 | 307 |
---|
y | 2.4771 | 2.4829 | 2.4843 | 2.4871 |
---|
Lagrange's Interpolating Polynomial
The value of x at you want to find `P_n(x) : x = 301`
Lagrange's formula is
`f(x) = ((x - x_1)(x - x_2)(x - x_3))/((x_0 - x_1)(x_0 - x_2)(x_0 - x_3)) xx y_0 + ((x - x_0)(x - x_2)(x - x_3))/((x_1 - x_0)(x_1 - x_2)(x_1 - x_3)) xx y_1 + ((x - x_0)(x - x_1)(x - x_3))/((x_2 - x_0)(x_2 - x_1)(x_2 - x_3)) xx y_2 + ((x - x_0)(x - x_1)(x - x_2))/((x_3 - x_0)(x_3 - x_1)(x_3 - x_2)) xx y_3`
`y(301) = ((301 - 304)(301 - 305)(301 - 307))/((300 - 304)(300 - 305)(300 - 307)) xx 2.4771 + ((301 - 300)(301 - 305)(301 - 307))/((304 - 300)(304 - 305)(304 - 307)) xx 2.4829 + ((301 - 300)(301 - 304)(301 - 307))/((305 - 300)(305 - 304)(305 - 307)) xx 2.4843 + ((301 - 300)(301 - 304)(301 - 305))/((307 - 300)(307 - 304)(307 - 305)) xx 2.4871`
`y(301) = ((-3)(-4)(-6))/((-4)(-5)(-7)) xx 2.4771 + ((1)(-4)(-6))/((4)(-1)(-3)) xx 2.4829 + ((1)(-3)(-6))/((5)(1)(-2)) xx 2.4843 + ((1)(-3)(-4))/((7)(3)(2)) xx 2.4871`
`y(301) = (-72)/(-140) xx 2.4771 + (24)/(12) xx 2.4829 + (18)/(-10) xx 2.4843 + (12)/(42) xx 2.4871`
`y(301) = 2.4786`
Solution of the polynomial at point `301` is `y(301) = 2.4786`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then