Professional Documents
Culture Documents
More Examples of Lagrange Interpolation: Appendix E
More Examples of Lagrange Interpolation: Appendix E
More Examples of Lagrange Interpolation: Appendix E
0.8
1.0
0.6
L1(x)
L2(x)
0.4 0.5
0.2
0.0
0.0 1.0 1.2 1.4 1.6 1.8 2.0 2.2
1.0 1.2 1.4 1.6 1.8 2.0 2.2
−0.2 −0.5
71
72 E.2 Convergence of Lagrange interpolation
1.0 1.5
0.5 1.0
L3(x)
L4(x)
0.0 0.5
1.0 1.2 1.4 1.6 1.8 2.0 2.2
−0.5 0.0
1.0 1.2 1.4 1.6 1.8 2.0 2.2
−1.0 −0.5
1.0
0.8
0.6
L5(x)
0.4
0.2
0.0
1.0 1.2 1.4 1.6 1.8 2.0 2.2
−0.2
P (x) = 0.1411 × L1 (x) − 0.6878 × L2 (x) − 0.9962 × L3 (x) − 0.5507 × L4 (x) + 0.3115 × L5 (x).
1.0 sin(3x)
0.5
P(x)
0.0
0 1 2 3
−0.5
−1.0
The interpolating polynomial approximates accurately the function f (x) = sin(3x) in the
interval [1, 2.2], with ve points only.
First, consider, P (x), the polynomial interpolating f (x) = cos(x) through a set of equidistant
points in the interval [−5, 5].
Chapter E More examples of Lagrange interpolation 73
0.0 0.0
−4 −2 0 2 4 −4 −2 0 2 4
−0.5 −0.5
−1.0 −1.0
P(x)
−1.5 −1.5
Clearly, increasing the number of equidistant points from n = 6 (left panel) to n = 11 (right
panel) signicantly improves the approximation of f (x) by the polynomial P . In the right
panel, the 10th order interpolating polynomial (solid line) matches perfectly with the function
cos(x).
However, Lagrange interpolation is not always accurate. For instance, consider the polynomial
interpolating the Lorentz function, f (x) = 1/(1 + x2 ), through a set of equidistant points in
the interval [−5, 5].
1.0 2.0
1/(1+x2)
n=11
n=6 0.8
1.5
0.6
1.0
0.4 P(x)
0.5
0.2
0.0
0.0 −4 −2 0 2 4
−4 −2 0 2 4
−0.2 −0.5
Increasing the number of equidistant points from n = 6 (left panel) to n = 11 (right panel)
improves the polynomial interpolation in the central part of f (x), but large oscillations are
present in the at region.
20
0
−4 −2 0 2 4
−20
n=21 −40
−60
If the number of equidistant interpolation points is increased further, these oscillations get
even larger. The interpolating polynomial of degree n − 1, P (x), does not converge to the
function 1/(1 + x2 ) as n → ∞.