Docsity

Error Analysis in Polynomial and Lagrange Interpolation, Study notes of Calculus

Toggle sidebar
bg1
Math 128A Problem Set 5: Interpolation
Adrian Down
February 22, 2006
Problem 1
Assume for the sake of contradiction that
p(x) = anxn+...+a1x+a0
has m > n distinct real roots, call them {bk}. For each pair of successive
zeros bkand bk+1, a zero ckof p′(x) can be constructed using the Mean Value
Theorem,
∃ck∈(bk, bk+1) st p′(ck) = p(bk+1)−p(bk)
bk+1 −bk
=0
bk+1 −bk
= 0
Since there are m−1 such pairs of zeros of p(x), m−1 zeros of p′(x) can be
constructed in this manner.
Using the same argument, m−2 distinct real zeros of p′(x) can be con-
structed using the Mean Value Theorem. In general, the Mean Value Theo-
rem can be used to construct m−jzeros of p(j)(x).
Taking the case of j=n, the Mean Value Theorem can be used to produce
m−n > 0 distinct real zeros of p(n)(x). However, this differentiation can
be performed term by term on the expression for p(x) above. The only
remaining term is a constant,
p(n)(x) = ann!6= 0
Hence p(n)(x) cannot have any zeros. The contradiction shows that the num-
ber of distinct real zeros of p(x) cannot be greater than n, the degree of
p(x).
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Error Analysis in Polynomial and Lagrange Interpolation and more Study notes Calculus in PDF only on Docsity!

Math 128A Problem Set 5: Interpolation

Adrian Down

February 22, 2006

Problem 1

Assume for the sake of contradiction that

p(x) = anxn^ +... + a 1 x + a 0

has m > n distinct real roots, call them { bk }. For each pair of successive zeros bk and bk+1, a zero ck of p′(x) can be constructed using the Mean Value Theorem,

∃ck ∈ (bk, bk+1) st p′(ck) =

p(bk+1) − p(bk) bk+1 − bk

bk+1 − bk

Since there are m − 1 such pairs of zeros of p(x), m − 1 zeros of p′(x) can be constructed in this manner. Using the same argument, m − 2 distinct real zeros of p′(x) can be con- structed using the Mean Value Theorem. In general, the Mean Value Theo- rem can be used to construct m − j zeros of p(j)(x). Taking the case of j = n, the Mean Value Theorem can be used to produce m − n > 0 distinct real zeros of p(n)(x). However, this differentiation can be performed term by term on the expression for p(x) above. The only remaining term is a constant,

p(n)(x) = ann! 6 = 0

Hence p(n)(x) cannot have any zeros. The contradiction shows that the num- ber of distinct real zeros of p(x) cannot be greater than n, the degree of p(x).

Problem 2

Part a

I compute each component polynomial of the Lagrange interpolation formula,

L 1 (x) =

j 6 =

(x − xj ) (ǫ − xj )

x(x + ǫ) ǫ(ǫ + ǫ)

x(x + ǫ) 2 ǫ^2

L 2 (x) =

j 6 =

(x − xj ) −xj

(x + ǫ)(x − ǫ) −ǫ^2

x^2 − ǫ^2 ǫ^2

L 3 (x) =

j 6 =

(x − xj ) (ǫ − xj )

x(x − ǫ) ǫ(ǫ + ǫ)

x(x − ǫ) 2 ǫ^2

Thus the total Lagrange polynomial is,

p(x) =

2 ǫ^2

f (−ǫ)(x^2 − xǫ) − 2 f (0)

x^2 − ǫ^2

  • f (ǫ)

x^2 + xǫ

2 ǫ^2

x^2 (f (−ǫ) − 2 f (0) + f (ǫ)) + x (f (ǫ) − f (−ǫ)) − 2 f (0)ǫ^2

Part b

Using Taylor expansions, finite difference approximations of the first and second derivative of f (x) about x = 0 can be found,

f ′′(0) =

f (−ǫ) − 2 f (0) + f (ǫ) ǫ^2

  • O(ǫ^3 ) f ′(0) =

f (ǫ) − f (−ǫ) 2 ǫ

  • O(ǫ^2 )

The finite difference approximations of f ′′(0) and f ′(0) are clearly visible in the expression for p(x) above. In the limit as ǫ → 0, terms of order 2 and higher in ǫ approach 0. Thus,

p(x) = f (0) + f ′(0)ǫ +

f ′′(0) 2

ǫ^2

In the limit as ǫ → 0, the Lagrange interpolation polynomial becomes the second degree Taylor approximation of f about the point x = 0.

ρ < 12 by assumption, so I use this bound to evaluate the error of the polynomial approximation,

ρ <

⇒ 1 − ρ >

1 − ρ

ρ 1 − ρ

⇒ lim n→∞

ρ 1 − ρ

)n+ = 0

⇒ lim n→∞ |f (x) − p(x)| = 0

Thus |f (x) − p(x)| → 0 as n → ∞.

Problem 4

I use the form of the Hermite approximating polynomial discussed in class,

p(x) = f (a)H(x) + f (b) Hˆ(x) + f ′(a)G(x) + f ′(b) Gˆ(x)

where

H(x) =

x − a b − a

b − x b − a

H^ ˆ(x) =

b − x b − a

x − a b − a

G(x) = (x − a)

b − x b − a

G^ ˆ(x) = (x − b)

x − a b − a

In this case, f (x) = 1 + cos^2 x, a = 0, and b = π 2.

Evaluating the coefficients of the polynomials,

f (0) = 1 + cos^2 (0) = 2 f

(π

2

= 1 + cos^2

(π

2

f ′(0) = −2 cos

(π

2

sin

(π

2

= 0 f ′

(π

2

= −2 cos

( (^) π

2

sin

(π

2

Thus the coefficients of G and Gˆ are 0, so I need only compute H and Hˆ. In what follows, let ˜x = (^2) πx ,

H(x) =

x π 2

) ( (^) π 2 −^ x π 2

= (1 + 2˜x) (1 − ˜x)^2 = (1 + 2˜x)

1 − 2˜x + ˜x^2

= 1 − (^) 2˜x + x^2 + (^) 2˜x − 4˜x^2 + 2˜x^3 = 2˜x^3 − 3˜x^2 + 1

Hˆ(x) =

π 2 −^ x π 2

x π 2

= (1 − 2(1 − ˜x)) ˜x^2 = 3˜x^2 − 2˜x^3 ⇒ p(x) = 2H(x) + Hˆ(x) = 2(2˜x^3 − 3˜x^2 + 1) +

3˜x^2 − 2˜x^3

= 2˜x^3 − 3˜x^2 + 2

Problem 5

Part a

Let

w(t) =

∏^ n

j=

(t − xj )^2

Since w(t) contains n+1 monic quadratic factors, w(t) is a monic polynomial in t of degree 2n + 2. Also, note that φ(xj ) = 0 ∀xj since one term in the product defining w(t) is zero for any such xj. Let

φ(t) = f (t) − p(t) − λw(t)

−0.015 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.

−0.

−0.

0

f(x) − g(x)

φ′(xj ) = 0 for any xj. For any particular xk, I can write w(t) as,

φ(t) = (t − xk)^2

∏^ n

j 6 =k

(t − xj )^2

Taking the derivative using the product rule,

φ′(t) = 2(t − xk)

∏^ n

j 6 =k

(t − xj )^2 + (t − xk)^2 ·

d dt

∏^ n

j 6 =k

(t − xj )^2

Clearly φ′(xk) = 0. Since this same procedure can be performed for any xj , φ′(xj ) = 0 for any xj , as claimed. Thus φ′(t) has (n + 1) + (n + 1) = 2n + 2 distinct real roots. By the mean value theorem, φ(2n+2)^ has at least 2n + 2 − (2n + 1) = 1 real root ζ ∈ (a, b). Because w(t) is a monic polynomial of degree 2n + 2, only terms resulting from differentiating the leading term are left after repeated differentiation,

w(2n+2)(t) = (2n + 2)!

Since p(x) interpolates 2(n + 1) values of f and f ′, p(x) must have 2n + 2 degrees of freedom in its coefficients, which means it must be of degree 2n+1, including a constant term. Hence taking the derivative, p^2 n+2(t) = 0. Combining these results,

φ(2n+2)^ (ζ) = = f (2n+2)(ζ) + λ(2n + 2)!

⇒ λ =

f (2n+2)(ζ) (2n + 2)!

Equating this expression for λ with that found above,

f (x) − p(x) w(x)

f (2n+2)(ζ) (2n + 2)!

⇒ f (x) − p(x) =

f (2n+2)(ζ) (2n + 2)!

∏^ n

j=

(x − xj )^2

Part b

In problem 4, the function f was interpolated at 2 points, and hence n = 1. The error formula becomes,

|f (x) − p(x)| ≤

∣f (4)(ζ)

· x^2

x −

π 2

The maximum of the function of x can be found by differentiating,

d dx

x^2

x −

π 2

= 2x

x −

π 2

− 2 x^2

x −

π 2

At extremum, the derivative with respect to x is equal to 0,

2 x

x −

π 2

− 2 x^2

x −

π 2

x −

π 2

  • x = 0

⇒ x =

π 4

Note. The solutions x = 0 and x = π 2 , which were factored out in the second step above, correspond to minima.