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

Lec 3 Spline Interpolation

This chapter discusses cubic spline interpolation. Cubic spline interpolation divides the approximation interval into subintervals and constructs a cubic polynomial on each subinterval. This ensures the interpolant is continuously differentiable and has a continuous second derivative. Two common types of cubic splines are natural splines, which use boundary conditions that approximate the shape of a flexible rod through data points, and clamped splines, which include more information about the function through their boundary conditions. The chapter provides an example of constructing a natural cubic spline and discusses solving the system of equations to determine the spline coefficients.

Uploaded by

Muhammad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
189 views

Lec 3 Spline Interpolation

This chapter discusses cubic spline interpolation. Cubic spline interpolation divides the approximation interval into subintervals and constructs a cubic polynomial on each subinterval. This ensures the interpolant is continuously differentiable and has a continuous second derivative. Two common types of cubic splines are natural splines, which use boundary conditions that approximate the shape of a flexible rod through data points, and clamped splines, which include more information about the function through their boundary conditions. The chapter provides an example of constructing a natural cubic spline and discusses solving the system of equations to determine the spline coefficients.

Uploaded by

Muhammad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Chapter 3

Cubic Spline Interpolation

Topics Covered
• Why Spline Interpolation is important
• Cubic Spline Interpolation
• Natural Spline Condition
• Clamped Spline Condition

Prepared By: Dr. Tayyab Hussain


Email: [email protected]
Why Cubic Spline Interpolation
• The previous sections concerned the approximation of arbitrary
functions on closed intervals using a single polynomial. However,
high-degree polynomials can oscillate erratically, that is, a minor
fluctuation over a small portion of the interval can induce large
fluctuations over the entire range.
• An alternative approach is to divide the approximation interval
into a collection of subintervals and construct a (generally)
different approximating polynomial on each subinterval. This is
called piecewise-polynomial approximation.
• The simplest piecewise-polynomial approximation is piecewise-
linear interpolation, which consists of joining a set of data points
by a series of straight lines
A disadvantage of linear function approximation is that there is likely no
differentiability at the endpoints of the subintervals, which, in a geometrical
context, means that the interpolating function is not “smooth.”
Splines
The root of the word “spline” is the same as that of splint. It was originally a
small strip of wood that could be used to join two boards. Later the word was
used to refer to a long flexible strip, generally of metal, that could be used to
draw continuous smooth curves by forcing the strip to pass through specified
points and tracing along the curve.
Cubic Spline Interpolation
• The most common piecewise-polynomial approximation
uses cubic polynomials between each successive pair of
nodes and is called cubic spline interpolation.
• A general cubic polynomial involves four constants

• The cubic spline procedure ensures that the interpolant is


not only continuously differentiable on the interval, but also
has a continuous second derivative.
• We can construct a third order polynomial on each
subinterval
• The number of splines will be equal to number of
subintervals
• Although cubic splines are defined with other boundary
conditions, the conditions given in (f) are sufficient for our
purposes.
• When the free boundary conditions occur, the spline is
called a natural spline, and its graph approximates the shape
that a long flexible rod would assume if forced to go
through the data points

• In general, clamped boundary conditions lead to more


accurate approximations because they include more
information about the function.
Example 1 Construct a natural cubic spline that passes through
the points (1, 2), (2, 3), and (3, 5).
For the interval [1, 2],

for [2, 3],

There are 8 constants to be determined, which requires 8


conditions
Four conditions come from the fact that the splines must
agree with the data at the nodes

Two more come from the fact that


Two come from the natural boundary conditions

Solving this system of equations gives the


spline

Construction of a Cubic Spline


A spline defined on an interval that is divided into n
subintervals will require determining 4n constants
becomes
First derivative of spline is

Using values of d and separating b we will get

Replace j with j-1 and then using above


values of b we get
The major question that arises in connection with this construction
is whether the values of {c_n} can be found using the system of
equations. If it’s so, are they unique??

By expanding we can write down a system of equation


Spline approximation

Lagrange approximation
To Think…

• Is spline interpolation better than Lagrange and divided


difference interpolation?
• Is natural spline better or clamped spline??
• If there are n data points, How many splines we have to
define ??
• What is the smoothness condition in spline??
• Is spline applicable to equally spaced data set or unequally
spaced data??
• Can we construct Quadratic splines like cubic splines??
• Can we define new conditions at end points other than
natural or clamped?

You might also like