III 5 Interpolation
III 5 Interpolation
∫ f (x)w(x)dx ≈ ∑ wj f (xj ).
a
j=1
In these notes we see that the two concepts are intrinsically linked꞉ interpolation leads
naturally to quadrature rules.
1. Polynomial Interpolation꞉ we describe how to interpolate a function by a polynomial
and a set of points.
2. Interpolatory quadrature rule꞉ polynomial interpolation leads naturally to ways to
integrate
functions, but onely realisable in the simplest cases.
1. Polynomial Interpolation
We already saw a special case of polynomial interpolation, where we saw that the
polynomial
n−1
n k
f (z) ≈ ∑ f̂ z
k
k=0
following꞉
Definition 1 (interpolatory polynomial) Given distinct points
n and x1 , … , xn ∈ R n
p(xj ) = fj
The easiest way to solve this problem is to invert the Vandermonde system꞉
Definition 2 (Vandermonde) The Vandermonde matrix associated with distinct points n
x1 , … , xn ∈ R is the matrix
n−1
1 x1 ⋯ x
⎡ 1 ⎤
⎢ ⎥
V ꞉= ⎢ ⎥
⎢ ⋮ ⋮ ⋱ ⋮ ⎥
⎣ n−1 ⎦
1 xn ⋯ xn
Proposition 1 (interpolatory polynomial uniqueness) The interpolatory polynomial is
unique, and the Vandermonde matrix is invertible.
Proof Suppose and are both interpolatory polynomials. Then
p p̃ vanishes
p(x) − p̃(x)
p = p̃.
For the second part, if for
Vc = 0 then for
c ∈ R we have
q(x) = c1 + ⋯ + cn x
n−1
⊤
q(xj ) = e Vc = 0
j
But it turns out we can also construct the interpolatory polynomial directly. We will use
the following which equal at one grid point and zero at the others꞉
1
2 2 2
= (1/2 − e + e /2)x + (−3/2 + 2e − e /2)x + 1
where
b
wj ꞉= ∫ ℓj (x)w(x)dx
a
w,x
∫ p(x)w(x)dx = Σn [p]
a
Example 2 (arbitrary points) Find the interpolatory quadrature rule for w(x) = 1 on
with points
[0, 1] ? We have꞉
[x1 , x2 , x3 ] = [0, 1/4, 1]
1 1
(x − 1/4)(x − 1)
w1 = ∫ w(x)ℓ1 (x)dx = ∫ dx = −1/6
0 0
(−1/4)(−1)
1 1
x(x − 1)
w2 = ∫ w(x)ℓ2 (x)dx = ∫ dx = 8/9
0 0
(1/4)(−3/4)
1 1
x(x − 1/4)
w3 = ∫ w(x)ℓ3 (x)dx = ∫ dx = 5/18
0 0
3/4
That is we have
f (0) 8f (1/4) 5f (1)
w,x
Σn [f ] = − + +
6 9 18
case of Gaussian quadrature which we will approach in another way below. We use꞉
1 1 1
2
∫ w(x)dx = π, ∫ xw(x)dx = 0, ∫ x w(x)dx = π/2
−1 −1 −1
1 1
(x − √3/2)(x + √3/2) π
w2 = ∫ w(x)ℓ2 (x)dx = ∫ dx =
(−3/4)√1 − x2 3
−1 −1
1 1
(x − √3/2)x π
w3 = ∫ w(x)ℓ3 (x)dx = ∫ dx =
(−√3)(−√3/2)√1 − x2 3
−1 −1
(It's not a coincidence that they are all the same but this will differ for roots of other
OPs.) That is we have
π
w,x
Σn [f ] = (f (√3/2) + f (0) + f (−√3/2)
3
This is indeed exact for polynomials up to degree n − 1 = 2 , but it goes all the way up
to2n − 1 = 5 ꞉
π
w,x w,x w,x 2
Σn [1] = π, Σn [x] = 0, Σn [x ] = ,
2
3π
w,x 3 w,x 4 w,x 5
Σn [x ] = 0, Σn [x ] = , Σn [x ] = 0
8
9π 5π
w,x 6
Σn [x ] = ≠
32 16
We shall explain this miracle in the next chapter.