You are on page 1of 19

Cubic-Spline Interpolation

a)

Explain what is the method actually is all about.


Cubic spline interpolation is a special case for Spline interpolation that is used very often to avoid the
problem of Runges phenomenon. This method gives a interpolating polynomial that is smoother and has
smaller error than some other interpolating polynomials such as Lagrange polynomial and Newton
polynomial.

Cubic
splines
are
function

approximations that are function approximations that are continuous at merging points. They also have
continuous first and second derivatives where they join. Natural cubic spline is a cubic spline that has
second derivative equal to zero at end points. Unlike Lagrange polynomials, each point in the line does not
affect the entire line.

0S xi( x

Number of conditions

In cubic spline interpolation, we want to interpolate all n+1 points:

for

and

gives n+1 conditions.

1S
i

x
i'1
1S
i

x
"
i

1
1S i x
The continuity conditions for the spline, its derivative, and its second derivative are as following:

for

gives n-1 conditions.

for

gives n-1 conditions.

for

gives n-1 conditions.

Total conditions = (n+1) + (n-1) + (n-1) + (n-1) = 4n-2

To get a unique solution, must impose 2 extra conditions by imposing:

S x0
"

............................(resulting function called natural cubic spline)

b)

Find ONE simple example with its solution.

x1302
0

2
0
1
1
3
0
2
1302
Find the natural cubic spline interpolant to f at the points , , and where f, f, f and f.
Solution:

for

h0
x x
x0
sxi
, for .

for _____(1)

x 1
Sx1 x 2
,

for _____(2)

for _____(3)

1zii S
"

S 0x0
Let ,

for .

_________________(see condition )

_________(4)

_________(5)

1
bi 1
h
,

(4):

z1 4
1
0

(5):

z
0

0i
C
Dii
,

and

for

C
D11
C
D
,

and

x 0
Sx 0 x1
(1): ,

(2): ,

for

for

Sx 2 x 2
(3): ,

Answer:

for

c)

State the URL of the websites.


https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=21&ved=0ahUKEwid8afXtXJAhUECY4KHdQOASc4FBAWCBwwAA&url=http%3A%2F%2Fgeophysics-old.tau.ac.il%2Fheb
%2Fstudent%2Fexams%2Ffilelist.asp%3Faction%3Ddownload%26dir%3D%255C%25EB%25EC%25EC
%25E9%255C%25F9%25E9%25E8%25E5%25FA%2B%25EE%25FA%25EE
%25E8%25E9%25E5%25FA%2B
%25E1%25E2%25E9%25E0%25E5%25F4%25E9%25E6%25E9%25F7%25E4%255C
%25F1%25E9%25EB%25E5%25EE%25E9%25ED%2B%25E5%25E3%25F4%25E9%2B
%25F0%25E5%25F1%25E7%25E0%25E5%25FA%26file
%3Dcubic_spline_p1.pdf&usg=AFQjCNHr8HByUsdE_Ajr0K_6zMOUz3AIzg

d)

What has been presented and can be learned from each website?
i)

Introduction to Cubic Spline Interpolation

ii)

The conditions in Cubic Spline Interpolation

iii) The general computation of a Natural Cubic Spline

e)

What are the advantages of each website?


i)

The calculation is precise. What I mean about precise is that they provide a general step-bystep calculation and use a simple term for the formulas that make it easy for student to
calculate.

ii)

The wording, formulas, and calculations are very well organized that it makes it easy for
students to understand.

f)

What improvements can be made on each website?


i)

Other than the general computation of a Natural Cubic Spline, show also the general
computation for End Slope Spline, Periodic Spline and Not-a-Knot Spline as they are also
one of the alternatives to define the 2 extra boundary conditions just like Natural Cubic
Spline.

ii)

Provide examples with their solutions and exercises for Cubic Spline Interpolation topic.

iii)

Show what software and how to use it to compute Cubic Spline Interpolation (for example
MATLAB, C++, SciPy, Excel, Java and others).

You might also like