MATH 174: Numerical Analysis I

Slides:



Advertisements
Similar presentations
Polynomial Approximation PSCI 702 October 05, 2005.
Advertisements

Numeriska beräkningar i Naturvetenskap och Teknik Today’s topic: Approximations Least square method Interpolations Fit of polynomials Splines.
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
MATH 685/ CSI 700/ OR 682 Lecture Notes
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Chapter 18 Interpolation The Islamic University of Gaza
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
Dr. S.M. Malaek Assistant: M. Younesi
Computational Methods in Physics PHYS 3437
EARS1160 – Numerical Methods notes by G. Houseman
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Offset of curves. Alina Shaikhet (CS, Technion)
Curve-Fitting Interpolation
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
MATH 175: NUMERICAL ANALYSIS II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Semester AY
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
Scientific Computing Linear and Quadratic Splines.
MATH 175: Numerical Analysis II Lecturer: Jomar Fajardo Rabajante 2 nd Sem AY IMSP, UPLB.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Section 14.7 Second-Order Partial Derivatives. Old Stuff Let y = f(x), then Now the first derivative (at a point) gives us the slope of the tangent, the.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
L5 – Curves in GIS NGEN06 & TEK230: Algorithms in Geographical Information Systems by: Sadegh Jamali (source: Lecture notes in GIS, Lars Harrie) 1 L5-
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
Spline Interpolation A Primer on the Basics by Don Allen.
 3.3 Hermite Interpolation Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Find the osculating polynomial P(x) such that.
By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
Math 495B Polynomial Interpolation Special case of a step function. Frederic Gibou.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
The textbook gives the following example at the start of chapter 4: The mileage of a certain car can be approximated by: At what speed should you drive.
LECTURE 17: BEYOND LINEARITY PT. 2 March 30, 2016 SDS 293 Machine Learning.
MATH 175: Numerical Analysis II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Sem AY
Interpolation - Introduction
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
4.1 Extreme Values of Functions.
MATH 175: Numerical Analysis II
CHAPTER 3 NUMERICAL METHODS
Piecewise Polynomials and Splines
© University of Wisconsin, CS559 Spring 2004
Announcements Topics: Work On:
Curve-Fitting Spline Interpolation
Numerical Analysis Lecture 25.
Chapter 15 Curve Fitting : Splines
Parametric Curves.
The mileage of a certain car can be approximated by:
Spline Interpolation Class XVII.
MATH 175: Numerical Analysis II
Extreme Values of Functions
MATH 175: NUMERICAL ANALYSIS II
Numerical Analysis Lecture 26.
MATH 174: Numerical Analysis
Extreme Values of Functions
MATH 174: NUMERICAL ANALYSIS I
Splines There are cases where polynomial interpolation is bad
SKTN 2393 Numerical Methods for Nuclear Engineers
MATH 175: Numerical Analysis II
5.1 Extreme Values of Functions
MATH 175: Numerical Analysis II
MATH 175: NUMERICAL ANALYSIS II
Presentation transcript:

MATH 174: Numerical Analysis I Lecturer: Jomar Fajardo Rabajante 1st Sem AY 2018-2019 IMSP, UPLB

SPLINES

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.

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.

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)

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.

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.

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.

Usual Quadratic Spline Let the nodes in our polynomial interpolation be our knots.

Usual Quadratic Spline Example: Also, try this condition: Natural Quadratic Spline Check if S0 (1)=S1 (1) and if S0’ (1)=S1’ (1).

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.

Cubic Splines Let the nodes in our polynomial interpolation be our knots.

DERIVATION of Cubic Splines Interpolation and Continuity (2n equations): Derivative Continuity (2(n-1) equations):

DERIVATION of Cubic Splines Derivatives of Si:

DERIVATION of Cubic Splines Define: By some manipulations: Note:

Cubic Splines Let the nodes in our polynomial interpolation be our knots.

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.

DERIVATION of Cubic Splines We can write the system of equations using a tridiagonal system: THE LHS:

DERIVATION of Cubic Splines We can write the system of equations using a tridiagonal system: THE RHS:

NATURAL Cubic Spline Zero Curvature: THE LHS:

NATURAL Cubic Spline THE RHS:

CLAMPED/COMPLETE Cubic Spline 1st Derivative is specified: THE LHS:

CLAMPED/COMPLETE Cubic Spline THE RHS:

NOT-A-KNOT Cubic Spline Third derivative matching: THE LHS:

NOT-A-KNOT Cubic Spline THE RHS:

PERIODIC Cubic Spline The conditions will be For your leisure: try to create an algorithm in obtaining the periodic cubic spline.

Algorithm for Natural Cubic Spline 1. Compute for i=0,1,…,n–1

Algorithm for Natural Cubic Spline 2. For i=2,3,…,n–1

Algorithm for Natural Cubic Spline 3. For i=n–1,n–2,…,1 The method assures that there will be no division by zero.

Algorithm for Natural Cubic Spline 4. The polynomials will be for i=0,1,…,n–1 where (In Nested Multiplication/Horner’s form)

Cubic Spline Error