



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The main points are: Spline Interpolation Method, Choice of Interpolants, Differentiate and Integrate, Equidistantly Spaced Points, Exact Function, Polynomial Interpolation, Linear Interpolation, Linear Splines, Simply Slopes
Typology: Slides
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















Why Splines?
2 1 25
1 ( )
x
f x
=
Table : Six equidistantly spaced points in [-1, 1]
Figure : 5
th order polynomial vs. exact function
x (^) 2 1 25
1
x
y
=
0.2 0.
0.6 0.
1.0 0.
Why Splines?
-0.
-0.
0
-1 -0.5 0 0.5 1
x
y
19th Order Polynomial f (x) 5th Order Polynomial
( ),
( ) ( ) ( ) ( ) 0 1 0
1 0 0 x x x x
f x f x f x f x โ โ
โ = + x (^) 0 โค x โค x 1
( ),
( ) ( ) ( ) 1 2 1
2 1 1 x x x x
f x f x f x โ โ
โ = + x 1 (^) โค x โค x 2
.
.
.
( ),
( ) ( ) ( ) 1 1
1 1 โ โ
โ โ โ โ
โ = + n n n
n n n x x x x
f x f x f x x (^) n โ 1 โค x โค xn
1
( ) ( 1 )
โ
โ โ
โ
i i
i i x x
f x f x
The upward velocity of a rocket is given as a function
of time in Table 1. Find the velocity at t=16 seconds
using linear splines.
Table Velocity as a
function of time
t v ( t )
Given ( x (^) 0 , y 0 ) (, x 1 , y 1 ),......, ( xn โ 1 , yn โ 1 ) (, xn , yn ), fit quadratic splines through the data. The splines
are given by
( ) 1 1 ,
2 f x = a 1 x + bx + c x (^) 0 โค x โค x 1
2 2 ,
2 = a (^) 2 x + b x + c x 1 (^) โค x โค x 2
.
.
.
,
2 = a (^) n x + bnx + c n x (^) n โ 1 โค x โค xn
Each quadratic spline goes through two consecutive data points
1 0 1 (^0 )
2 a 1 (^) x 0 + bx + c = f x
1 1 1 (^1 )
2 a 1 (^) x 1 + bx + c = f x.
.
.
1 (^1 )
2 ai xi โ 1 + bixi โ + ci = f xi โ
( )
2 a (^) i xi + bixi + ci = f x i.
.
.
1 (^1 )
2 an xn โ 1 + bnxn โ + cn = f xn โ
( )
2 a (^) n xn + bnxn + cn = f x n
This condition gives 2n equations
Similarly at the other interior points,
2 a 2 x 2 + b 2 โ 2 a 3 x 2 โ b 3 = 0
.
.
.
2 ai xi + bi โ 2 ai + 1 xi โ bi + 1 = 0
.
.
.
2 an โ 1 xn โ 1 + bn โ 1 โ 2 anxn โ 1 โ bn = 0
We have (n-1) such equations. The total number of equations is ( 2 n ) + ( n โ 1 )=( 3 n โ 1 ).
We can assume that the first spline is linear, that is a 1 = 0
( ) 1 1 ,
2 f x = a 1 x + b x + c x 0 (^) โค x โค x 1
2 2 ,
2 = a (^) 2 x + b x + c x 1 (^) โค x โค x 2
.
.
.
,
2 = a (^) n x + bnx + c n x (^) n โ 1 โค x โค xn
1 1
2
1
, 2 2
2
2
= a t + b t + c 10 โค t โค 15
, 3 3
2
3
= a t + b t + c 15 โค t โค 20
, 4 4
2
4
= a t + b t + c 20 โค t โค 22. 5
, 5 5
2
5
= a t + b t + c 22. 5 โค t โค 30
Let us set up the equations
Each Spline Goes Through Two
Consecutive Data Points
( ) , 1 1
2
1
v t = a t + b t + c 0 โค t โค 10
( 0 ) ( 0 ) 0 1 1
2
1
a + b + c =
( 10 ) ( 10 ) 227. 04 1 1
2
1
a + b + c =
2 2
2
2
2 ( 10 ) 2 ( 10 ) 0 1 1 2 2
a + b โ a โ b =
2 ( 15 ) 2 ( 15 ) 0 2 2 3 3
a + b โ a โ b =
2 ( 20 ) 2 ( 20 ) 0 3 3 4 4
a + b โ a โ b =
2 ( 22. 5 ) 2 ( 22. 5 ) 0 4 4 5 5
a + b โ a โ b =
At t=
At t=
At t=
At t=22.