I NTRODUCTIONA census of the population of the USA is taken every 10 years.. The following table lists the population, in thousands of people, from 1950 to 2000, and the data are also re
Trang 1INTERPOLATION AND POLYNOMIAL
APPROXIMATION
E LECTRONIC VERSION OF LECTURE
Dr Lê Xuân Đại
HoChiMinh City University of Technology Faculty of Applied Science, Department of Applied Mathematics
Email: ytkadai@hcmut.edu.vn
HCMC — 2019.
Trang 2O UTLINE
2 L AGRANGE I NTERPOLATING P OLYNOMIALS
3 N EWTON ’ S D IVIDED D IFFERENCE M ETHOD
4 C UBIC S PLINE I NTERPOLATION
Trang 3I NTRODUCTION
A census of the population of the USA is
taken every 10 years The following table
lists the population, in thousands of people, from 1950 to 2000, and the data are also
represented in the figure
Trang 5In the reviewing these data, we might ask whether they could be used to provide a
reasonable estimate of the population, for instance, in 1975 or even in the year 2020 Predictions of this type can be obtained by using a function that fits the given data.
This process is called interpolation
Trang 6One of the most useful and well-known
classes of functions mapping the set of real numbers into itself is the algebraic
form P n (x) = a n x n + a n−1 x n−1 + + a1x + a0,
where nis a non-negative integer and
a0, a1, , a n are real constants.
The polynomial which satisfies
P n (x i ) = y i , i = 0,1,2, ,n is called
Trang 7Consider the construction of a polynomial
of degree at most n
y = P n (x) = a n x n + a n−1 x n−1 + + a1x + a0that passes through the (n + 1) points
M i (x i , y i ), i = 0,1,2, ,n.
Trang 8THEOREM 1.1
The interpolation polynomial P n (x) for f (x),
is unique.
Construct a interpolation polynomial for
y = f (x), which is defined by the table
x 0 1 3
y 1 -1 2
Trang 10Let y = f (x) be given by the table:
Trang 11EXAMPLE 2.1
Construct the Lagrange interpolating
polynomial for y = sin(πx) using the numbers called nodesx0= 0, x1= 16, x2= 12
Trang 14EXAMPLE 2.2
Let y be defined by x 0 1 3 4
y 1 1 2 -1 Use the Lagrange interpolating polynomial to
approximate the value of y when x = 2.
Trang 15Let function f (x) be defined by the table
which is called the first divided difference of
f with respect to x k andx k+1
Trang 16The second divided difference of f in
Trang 18The first divided difference of f in [x, x0]is
Trang 19Continuing the process to step n, we have
Trang 20DEFINITION 3.2
The formula N (1)
n (x) is called the Newton forward divided-difference formula starting from x0 off and R n (x) is called the error of the interpolating polynomial.
Similarly, we can construct the Newton
forward divided-difference formula starting from x n of f as following
Trang 22EXAMPLE 3.2
Let y = f (x) be defined by the table of data
x 0 2 3 5 6
y 1 3 2 5 6
1 Construct Newton forward
divided-difference formula, starting from
x0 of functiony = f (x)
2 Using the obtained interpolating
polynomial, estimate f (1.25)
Trang 24Therefore, the Newton forward
Trang 25DEFINITION 4.1
Given a function f defined on [a, b] and a set of nodes
a = x0< x1< x2= b Let y0= f (x0), y1= f (x1), y2= f (x2 ).A cubic spline interpolant for f on [a, b] is a function g that satisfies the following conditions:
1 g(x) has continuous derivatives to the second
Trang 27Consider [x0, x1] Let h0= x1− x0 Sinceg0(x) is the cubic polynomial then
b0= y1− y0
h0 − c0h0− d0h20
Trang 28Consider [x1, x2] Let h1= x2− x1 Sinceg1(x) is the cubic polynomial then
b1= y2− y1
h1 − c1h1− d1h21
Trang 29Because the first and the second derivatives
Trang 30Because the first and the second derivatives
Trang 32N ATURAL C UBIC S PLINE
The boundary condition for natural cubic spline is
Trang 33Then we can define the coefficients of g0
Trang 34EXAMPLE 4.1
Construct a natural cubic spline for a
function defined by the table x 0 2 5
y 1 1 4
h0= 2, h1= 3 Because this is a natural cubic spline so c0= c2= 0 The coefficient c1 can be defined by the formula
Trang 35Then we can define the coefficients of g0
Trang 36Therefore, the required natural cubic spline is
Trang 37C LAMPED C UBIC S PLINE
The boundary condition for clamped cubic spline is
Trang 39Then we will have 2 equations
The coefficients of g k (x) (k = 0,1) can be
found by the formula
Trang 40EXAMPLE 4.2
Construct the clamped cubic spline for a
function defined by the table x 0 1 2
y 1 2 1 which satisfies y0(0) = 0,y0(2) = 0
coefficients c0, c1, c2 can be found by solving the system
Trang 42Then we can define the coefficients of g0
Trang 43Therefore, the required clamped cubic
Trang 44THANK YOU FOR YOUR ATTENTION