Professional Documents
Culture Documents
Outline
Outline
Outline
Outline
Theorem
Theorem
Suppose x0 , x1 , . . . , xn are distinct numbers in the interval [a, b] and
f ∈ C n+1 [a, b].
Theorem
Suppose x0 , x1 , . . . , xn are distinct numbers in the interval [a, b] and
f ∈ C n+1 [a, b]. Then, for each x in [a, b], a number ξ(x) (generally
unknown) between x0 , x1 , . . . , xn , and hence in (a, b), exists with
f (n+1) (ξ(x))
f (x) = P(x) + (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
Theorem
Suppose x0 , x1 , . . . , xn are distinct numbers in the interval [a, b] and
f ∈ C n+1 [a, b]. Then, for each x in [a, b], a number ξ(x) (generally
unknown) between x0 , x1 , . . . , xn , and hence in (a, b), exists with
f (n+1) (ξ(x))
f (x) = P(x) + (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
f (n+1) (ξ(x))
f (x) = P(x) + (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
f (n+1) (ξ(x))
f (x) = P(x) + (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
(t − x0 )(t − x1 ) · · · (t − xn )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − x0 )(x − x1 ) · · · (x − xn )
n
Y (t − xi )
= f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
n
Y (t − xi )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
n
Y (t − xi )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
n
Y (t − xi )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
n
Y (t − xi )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
n
Y (t − xi )
g(t) = f (t) − P(t) − [f (x) − P(x)]
(x − xi )
i=0
0 = g (n+1) (ξ)
" n #
(n+1) (n+1) d n+1 Y (t − xi )
= f (ξ) − P (ξ) − [f (x) − P(x)] n+1
dt (x − xi )
i=0 t=ξ
0 = g (n+1) (ξ)
" n #
(n+1) (n+1) d n+1 Y (t − xi )
= f (ξ) − P (ξ) − [f (x) − P(x)] n+1
dt (x − xi )
i=0 t=ξ
n
Y (t − xi ) 1
= Qn t n+1 + (lower-degree terms in t),
(x − xi ) i=0 (x − xi )
i=0
n
Y (t − xi ) 1
= Qn t n+1 + (lower-degree terms in t),
(x − xi ) i=0 (x − xi )
i=0
and
n
d n+1 Y (t − xi ) (n + 1)!
n+1
= Qn
dt (x − xi ) i=0 (x − xi )
i=0
Outline
1
Example: Second Lagrange Polynomial for f (x) = x
In an earlier example, Original Example we found the second Lagrange
polynomial for f (x) = x1 on [2, 4] using the nodes x0 = 2, x1 = 2.75,
and x2 = 4.
Lagrange Interpolating Polynomial Error Bound
1
Example: Second Lagrange Polynomial for f (x) = x
In an earlier example, Original Example we found the second Lagrange
polynomial for f (x) = x1 on [2, 4] using the nodes x0 = 2, x1 = 2.75,
and x2 = 4. Determine the error form for this polynomial, and the
maximum error when the polynomial is used to approximate f (x) for
x ∈ [2, 4].
Lagrange Interpolating Polynomial Error Bound
1
Example: Second Lagrange Polynomial for f (x) = x
In an earlier example, Original Example we found the second Lagrange
polynomial for f (x) = x1 on [2, 4] using the nodes x0 = 2, x1 = 2.75,
and x2 = 4. Determine the error form for this polynomial, and the
maximum error when the polynomial is used to approximate f (x) for
x ∈ [2, 4].
Note
We will make use of the theoretical result Theorem written in the form
n
f (n+1) (ξ) Y
|f (x) − P(x)| ≤ max · max (x − xi )
[2,4] (n + 1)! [2,4]
i=0
with n = 2
Error Bound Error Example 1 Error Example 2
Solution (1/3)
Because f (x) = x −1 , we have
1 2 6
f 0 (x) = − , f 00 (x) = , and f 000 (x) = −
x2 x3 x4
Solution (1/3)
Because f (x) = x −1 , we have
1 2 6
f 0 (x) = − , f 00 (x) = , and f 000 (x) = −
x2 x3 x4
As a consequence, the second Lagrange polynomial has the error form
f 000 (ξ(x)) 1
(x − x0 )(x − x1 )(x − x2 ) = − (x − 2)(x − 2.75)(x − 4)
3! ξ(x)4
Solution (1/3)
Because f (x) = x −1 , we have
1 2 6
f 0 (x) = − , f 00 (x) = , and f 000 (x) = −
x2 x3 x4
As a consequence, the second Lagrange polynomial has the error form
f 000 (ξ(x)) 1
(x − x0 )(x − x1 )(x − x2 ) = − (x − 2)(x − 2.75)(x − 4)
3! ξ(x)4
1
for ξ(x) in (2, 4). The maximum value of ξ(x)4
on the interval is
1
24
= 1/16.
Solution (2/3)
We now need to determine the maximum value on [2, 4] of the
absolute value of the polynomial
35 2 49
g(x) = (x − 2)(x − 2.75)(x − 4) = x 3 − x + x − 22
4 2
Solution (2/3)
We now need to determine the maximum value on [2, 4] of the
absolute value of the polynomial
35 2 49
g(x) = (x − 2)(x − 2.75)(x − 4) = x 3 − x + x − 22
4 2
Because
35 49 1
g 0 (x) = 3x 2 − x+ = (3x − 7)(2x − 7),
2 2 2
the critical points occur at
7 7 25 7 7 9
x = with g = and x = with g =−
3 3 108 2 2 16
Solution (3/3)
Hence, the maximum error is
f 000 (ξ(x))
max · max |(x − x0 )(x − x1 )(x − x2 )|
[2,4] 3! [2,4]
Solution (3/3)
Hence, the maximum error is
f 000 (ξ(x))
max · max |(x − x0 )(x − x1 )(x − x2 )|
[2,4] 3! [2,4]
1 1 9
≤ · ·
3! 16 16
Solution (3/3)
Hence, the maximum error is
f 000 (ξ(x))
max · max |(x − x0 )(x − x1 )(x − x2 )|
[2,4] 3! [2,4]
1 1 9
≤ · ·
3! 16 16
3
=
512
Solution (3/3)
Hence, the maximum error is
f 000 (ξ(x))
max · max |(x − x0 )(x − x1 )(x − x2 )|
[2,4] 3! [2,4]
1 1 9
≤ · ·
3! 16 16
3
=
512
≈ 0.00586
Outline
Solution (1/3)
The step size is h, so xj = jh, xj+1 = (j + 1)h, and
|f (2) (ξ)|
|f (x) − P(x)| ≤ |(x − jh)(x − (j + 1)h)|.
2!
Solution (1/3)
The step size is h, so xj = jh, xj+1 = (j + 1)h, and
|f (2) (ξ)|
|f (x) − P(x)| ≤ |(x − jh)(x − (j + 1)h)|.
2!
Hence
maxξ∈[0,1] eξ
|f (x) − P(x)| ≤ max |(x − jh)(x − (j + 1)h)|
2 xj ≤x≤xj+1
e
≤ max |(x − jh)(x − (j + 1)h)|.
2 xj ≤x≤xj+1
Solution (2/3)
Consider the function g(x) = (x − jh)(x − (j + 1)h), for
jh ≤ x ≤ (j + 1)h.
Solution (2/3)
Consider the function g(x) = (x − jh)(x − (j + 1)h), for
jh ≤ x ≤ (j + 1)h. Because
0 h
g (x) = (x − (j + 1)h) + (x − jh) = 2 x − jh − ,
2
Solution (2/3)
Consider the function g(x) = (x − jh)(x − (j + 1)h), for
jh ≤ x ≤ (j + 1)h. Because
0 h
g (x) = (x − (j + 1)h) + (x − jh) = 2 x − jh − ,
2
Solution (2/3)
Consider the function g(x) = (x − jh)(x − (j + 1)h), for
jh ≤ x ≤ (j + 1)h. Because
0 h
g (x) = (x − (j + 1)h) + (x − jh) = 2 x − jh − ,
2
Solution (3/3)
This implies that
e e h2 eh2
|f (x) − P(x)| ≤ max |g(x)| ≤ · = .
2 xj ≤x≤xj+1 2 4 8
Solution (3/3)
This implies that
e e h2 eh2
|f (x) − P(x)| ≤ max |g(x)| ≤ · = .
2 xj ≤x≤xj+1 2 4 8
eh2
≤ 10−6 . This implies that h < 1.72 × 10−3 .
8
Solution (3/3)
This implies that
e e h2 eh2
|f (x) − P(x)| ≤ max |g(x)| ≤ · = .
2 xj ≤x≤xj+1 2 4 8
eh2
≤ 10−6 . This implies that h < 1.72 × 10−3 .
8
f (x) = 0
f (n) (c) = 0
Return to Error Bound Theorem
The Lagrange Polynomial: Theoretical Error Bound
f (n+1) (ξ(x))
f (x) = P(x) + (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
1
Example: f (x) = x
Use the numbers (called nodes) x0 = 2, x1 = 2.75 and x2 = 4 to find
the second Lagrange interpolating polynomial for f (x) = x1 .
Solution (Summary)
2
X
P(x) = f (xk )Lk (x)
k =0
1 64 1
= (x − 2.75)(x − 4) − (x − 2)(x − 4) + (x − 2)(x − 2.75)
3 165 10
1 2 35 49
= x − x+
22 88 44
Return to Second Lagrange Interpolating Polynomial Example