Download presentation
Presentation is loading. Please wait.
1
MATH 174: Numerical Analysis I
Lecturer: Jomar Fajardo Rabajante 1st Sem AY IMSP, UPLB
2
SPLINES
3
Spline Function A spline function is a conditional/piecewise function that consists of polynomial pieces joined together with certain smoothness conditions The points at which the function changes its character are termed knots. Runge phenomenon is avoided when using splines.
4
Spline Function A function S on [a,b] is called a spline of degree k if: The domain of S is the interval [a,b]. The S,S’, S’’,…, S(k-1) are all continuous functions on [a,b]. There are points (ti,S(ti)) (the knots of S) such that a=t0<t1<…<tn=b and such that S is a polynomial of degree at most k on each subinterval [ti ,ti+1]. Splines are unique given specific conditions and knots.
5
We will discuss: Linear splines Quadratic splines Cubic splines
B-splines (to be discussed under Parametric curves) Catmull-rom splines (to be discussed under Parametric curves)
6
Linear Splines “Sisiw!!!” Just use linear interpolation…
Just be sure that your conditional function is continuous. Modulus of continuity of f: Suppose f is defined on [a,b], If f is continuous on [a,b] then the modulus of continuity will tend to zero as h tends to zero. If f is not continuous, then the modulus of continuity will not tend to zero.
7
Linear Splines First-Degree Spline Accuracy Theorem
Let p be a linear spline having knots with abscissas a=x0<x1<…<xn=b. If p interpolates a function f at these knots, then with h=max{xi – xi-1} we have This theorem tells us that if more knots are inserted in such a way that the maximum spacing h goes to zero, then the corresponding linear spline will converge uniformly to f.
8
Quadratic Splines “Quadratic” includes all linear combinations of the polynomials 1, x and x2. And note that if Q is a quadratic spline, then QєC1[a,b]. Usual Quadratic Spline – the nodes for interpolation are the knots Subbotin Quadratic Spline – nodes for interpolation are chosen to be the first and last knots and the midpoints between the knots.
9
Usual Quadratic Spline
Let the nodes in our polynomial interpolation be our knots.
10
Usual Quadratic Spline
Example: Also, try this condition: Natural Quadratic Spline Check if S0 (1)=S1 (1) and if S0’ (1)=S1’ (1).
11
Cubic Splines Cubic splines are commonly used since
It is smooth up to the 2nd derivative, thus pleasing to the eye (unlike quadratic splines where slopes may change drastically from one knot to the other) Effects of 3rd and higher-order derivatives are not anymore visible to the eye Wild oscillations may occur for higher degree polynomials (cubic splines are the best functions to use for curve fitting --- refer to the Cubic Spline Smoothness/Minimality Theorem) It is useful in approximating functions with humps.
13
Cubic Splines Let the nodes in our polynomial interpolation be our knots.
14
DERIVATION of Cubic Splines
Interpolation and Continuity (2n equations): Derivative Continuity (2(n-1) equations):
15
DERIVATION of Cubic Splines
Derivatives of Si:
16
DERIVATION of Cubic Splines
Define: By some manipulations: Note:
17
Cubic Splines Let the nodes in our polynomial interpolation be our knots.
18
DERIVATION of Cubic Splines
We will have a system of equations of the form: Notice that our derivative conditions are applied only at interior knots. But, we can have arbitrary choices for the endpoint conditions.
19
DERIVATION of Cubic Splines
We can write the system of equations using a tridiagonal system: THE LHS:
20
DERIVATION of Cubic Splines
We can write the system of equations using a tridiagonal system: THE RHS:
21
NATURAL Cubic Spline Zero Curvature: THE LHS:
22
NATURAL Cubic Spline THE RHS:
23
CLAMPED/COMPLETE Cubic Spline
1st Derivative is specified: THE LHS:
24
CLAMPED/COMPLETE Cubic Spline
THE RHS:
25
NOT-A-KNOT Cubic Spline
Third derivative matching: THE LHS:
26
NOT-A-KNOT Cubic Spline
THE RHS:
27
PERIODIC Cubic Spline The conditions will be For your leisure: try to create an algorithm in obtaining the periodic cubic spline.
28
Algorithm for Natural Cubic Spline
1. Compute for i=0,1,…,n–1
29
Algorithm for Natural Cubic Spline
2. For i=2,3,…,n–1
30
Algorithm for Natural Cubic Spline
3. For i=n–1,n–2,…,1 The method assures that there will be no division by zero.
31
Algorithm for Natural Cubic Spline
4. The polynomials will be for i=0,1,…,n–1 where (In Nested Multiplication/Horner’s form)
32
Cubic Spline Error
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.