






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Define the error term as:
-^
If
f(x)
is an n
th
order polynomial
p
(x)n
is of course exact.
Otherwise, since there is a perfect match at
x
, x 0
,…,x 1
n
This function has at least
n
+1 roots at the interpolation
points.
n^
n
ε
0
1
( )
(^
)(
)^
(^
) ( )
n^
n
x^
x^
x^
x^
x^
x^
x^
h x
ε ∴
=
−
−
−
L
Suppose we want to measure error at a point
x
To make polynomial go through
x
, add to existing
polynomial divided difference term.
-^
This is the error we make using existing polynomial
-^
Comparing with Taylor series
0
1
0
1
0
n
n
n^
n^
n^
i
i
=
(^
)
0
1
n
n
Efficient polynomial evaluation
Given a polynomial in power form how many operationsdoes it take to evaluate it?
-^
a
p^
px
+ a
1
x + a
0
-^
Horner’s rule (Horner, 1819)
recursively
evaluates the polynomial
ap
x p^
+
L
+ a
1
x + a
0
as: ((
L
(a
p^
x + a
p-
)x+
L
)x + a
. 0 -^
costs
p
multiplications and
p
additions, no extra storage.
Reduces complexity from
O(p
2 )^
to
O(p)
Interpolation: the story so far
-^
Given a function at
N
points, find its value at other point(s)
-^
So far: polynomial interpolation^ –
Polynomials are guaranteed to approximate any given function in an interval asaccurately as we want
-^
Different polynomial bases^ –
Monomial or Power basis– Newton and Lagrange basis
-^
For a given set of points and function values^ –
interpolating polynomial is unique
-^
Interpolation problem requires solution of a linear system^ –
System is dense for Monomial/Power basis– Newton and Lagrange forms allow the direct solution of the polynomialinterpolation form– Newton form particularly convenient to add new values
-^
Error for interpolation with n points is related to the value of the(n+1)
th^
derivative of the underlying function
Examples of polynomial interpolation
Go to MATLAB demo^ – Vandermonde– Polynomial interpolation for small set– For larger set
-^
See that even for six points we have a problem^ – In between the data points, (especially in first and last
subintervals), function shows excessive variation.
used for data and curve fitting.
However we saw polynomial interpolation works wellwhen degree is low
Piecewise linear interpolation
Simple idea^ – Connect straight lines between data points– Any intermediate value read off from straight line
-^
The
local variable
s , is
s^
x - x
k
The
first divided difference
is
δ k
yk
- y
)/(xk
k +
–x
)k
With these quantities in hand, the interpolant is
-^
( x
y
k^
x – x
) ( k
yk
- y
)/(xk
k +
–x
)k
y
k^
s
δ k
Linear function that passes through (
xk
, y
) and ( k
xk
, y
k +
So we can reduce error by choosing small intervals where 2
nd
derivative is higher
Piecewise Cubic interpolation
While we expect function not to vary, we expect it to alsobe smooth
-^
So we could consider piecewise interpolants of higherdegree
-^
How many pieces of information do we need to fit acubic between two points?^ – y=a+bx+cx
2 +dx
3