0% found this document useful (0 votes)
27 views

Problem 1

This document discusses polynomial interpolation methods. It contains questions about Lagrange interpolation polynomials with different numbers of nodes and computing derivatives and errors using divided differences. Numerical examples are provided to compute interpolation polynomials and errors at specific points for the cosine function.

Uploaded by

Djaafer Mezhoud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Problem 1

This document discusses polynomial interpolation methods. It contains questions about Lagrange interpolation polynomials with different numbers of nodes and computing derivatives and errors using divided differences. Numerical examples are provided to compute interpolation polynomials and errors at specific points for the cosine function.

Uploaded by

Djaafer Mezhoud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MATH3476 Numerical Methods

Problem Set 1
Polynomial Interpolation

The following questions are based upon the material in sections 1.1.1 to 1.1.3 of the notes.
Q1 (i) With u(x) = cos x for x ∈ [0, π2 ], obtain the Lagrange interpolating polynomial (1.1) with
regularly spaced nodes and n = 2 and so show that


p2 ( π5 ) = 3
25 (1 + 4 2) ,

π Pn
and compute the error E2 at the interpolation point x = 5. Evaluate i=0 `i (x) and comment on your
answer.
(ii) Obtain the Lagrange polynomial when n = 3 and so show that


p3 ( π5 ) = 3
50 + 54
125 3,

π Pn
and compute the error E3 at the interpolation point x = 5. Evaluate i=0 `i (x) and comment on your
answer.

Q2 Obtain the Lagrange interpolating polynomial p2 (x) for a function u(x) given at regularly spaced
nodes x0 = −h, x1 = 0 and x2 = h. Hence, using the error formula (1.9) in the notes, proceed along
the lines of Example 1.3 to deduce that

(2x − h)u(x0 ) − 4xu(x1 ) + (2x + h)u(x2 ) 3x2 − h2 000


u0 (x) = + u (ξ) ,
2h2 6

where x, ξ ∈ [−h, h], and so write down approximations for u0 (x0 ), u0 (x1 ) and u0 (x2 ), including the
error terms. Where is the error minimised and maximised?

(0,2) (1,3)
Q3 Let p2 (x) and p2 (x) denote quadratic Lagrange polynomials that interpolate the data at
{(x0 , u0 ), (x1 , u1 ), (x2 , u2 )} and {(x1 , u1 ), (x2 , u2 ), (x3 , u3 )} respectively. Show that
(0,2) (1,3)
(x3 − x)p2 (x) + (x − x0 )p2 (x)
P ≡
x3 − x0

is the cubic Lagrange polynomial p3 (x) interpolating the data {(x0 , u0 ), (x1 , u1 ), (x2 , u2 ), (x3 , u3 )}.

Q4 Using “property (i)” of divided differences and the fundamental definition of a derivative,

f (x + h) − f (x)
f 0 (x) = lim ,
h→0 h

1
deduce that
d
u[x0 , x1 , . . . , xn , x] = u[x0 , x1 , . . . , xn , x, x].
dx
This formula is used to compute interpolation errors when divided differences are used for numerical
differentiation.

Q5 Use equations (1.16) to (1.18) in the notes to show that the divided-difference interpolating
polynomial p2 (x) for the function u(x) = cos x with nodes at xi = 0.2 i, i = 0, 1, 2 . . . is

p2 (x) ≈ 1 − 0.001986706 x − 0.488402022 x2 ,

and use this to compute approximations p2 (0.1) and p2 (0.3) to cos 0.1 and cos 0.3 respectively.
Without evaluating p3 (x) explicitly, determine the correction term to be added to p2 (x) and so com-
pute the refined approximations p3 (0.1) and p3 (0.3). Hence determine the errors E2 and E3 at both
x = 0.1 and x = 0.3 and comment on your results.
Take the Python script 3476 1.4.py from the course homepage, modify it and use it to calculate
p4 (0.1) and E4 (0.1). Equation (1.19) in the notes will be useful here.

Quick-check answers to numerical questions


A1 (i) E2 ( π5 ) ≈ 1.02 × 10−2 and E3 ( π5 ) ≈ 7.71 × 10−4 .
A5 E2 (0.1) ≈ 8.69 × 10−5 , E2 (0.3) ≈ −1.11 × 10−4 , E3 (0.1) ≈ −6.02 × 10−5 and E3 (0.3) ≈
3.57 × 10−5 .

You might also like