x | x0=−1 | x1=0 | x2=1 | x3=2 | |||||
f(x) | f(x0)=−6 | f(x1)=−1 | f(x2)=0 | f(x3)=3 |
(x−x1)(x−x2)(x−x3) | ||
w(x) = f(x0) | + | |
(x0−x1)(x0−x2)(x0−x3) |
(x−x0)(x−x2)(x−x3) | ||
+ f(x1) | + | |
(x1−x0)(x1−x2)(x1−x3) |
(x−x0)(x−x1)(x−x3) | ||
+ f(x2) | + | |
(x2−x0)(x2−x1)(x2−x3) |
(x−x0)(x−x1)(x−x2) | ||
+ f(x3) | ||
(x3−x0)(x3−x1)(x3−x2) |