Professional Documents
Culture Documents
Let f (x) be a function with its value given at n + 1 points say, x0 , x1 , . . . , xn such that x0 < x1 < · · · < xn . We
determine a unique polynomial P (x) called as interpolating polynomial of degree n which satisfies the conditions:
Clearly, the polynomial coincides with the function f(x) at node points and E(f;x)=0 at x = xi , for i = 1,2,...n
Also, maximum error = M22 max |(x − x0 )(x − x1 )| where M2 = max |f (x)| .
x0 <ξ<x1 x0 <ξ<x1
Proof: We notice that if x = x0 ,or x = x1 ,then E1 (f ; x) = 0. If x(x0 , x1 ) then for this x we define a function G(t)
as
(t − x0 )(t − x1 )
G(t) = f (t) − P (t) − [f (x) − P (x)] (3)
(x − x0 )(x − x1 )
We can verify that
G(t)|t=x0 = 0
G(t)|t=x1 = 0
G(t)|t=x = 0,
1
Setting G00 (ξ) = 0, we get
(x − x0 )(x − x1 ) 00
E1 (f ; x) = f (ξ)
2
(x−x0 )(x−x1 )
For maximum of error, we will find maximum of 2
Let
(x − x0 )(x − x1 )
H(x) =
2
which implies
(x − x1 ) (x − x0 )
H 0 (x) = +
2 2
For critical point,
x0 + x1
H 0 (x) = 0 ⇒ x =
2
which gives maximum value of H(x) as
x0 +x1
( 2 − x0 )( x0 +x − x1 ) (x1 − x0 )2 h2
1
2
= =
2 4 4
h2
|E1 (x)| < M2
8
If the acceptable error is > 0, we must have
Task 1: Similarly prove that for quadratic interpolation for three nodes, the truncation error is given
by:
Further, if the stepsize is h, then the quadratic interpolation with error bound must satisfy the folllowing condition:
√ !1/3
9 3
h<
M3
Task 2:
1. Determine the step size h that can be used in the tabulation of f (x) = sin(x) in [0, π4 ] of equally spaced points
so that the truncation error of quadratic interpolation is less that 5 × 10−8 .
2. Determine the maximum value of uniform step size h that can be used in the tabulation of f (x) = (2 + x)4 in
[1, 2] of equally spaced points so that the truncation error of quadratic interpolation is less that 10−4 .