Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
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. .
Today’s class Romberg integration Gauss quadrature Numerical Methods
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Curve-Fitting Interpolation
CURVE FITTING ENGR 351 Numerical Methods for Engineers
Curve-Fitting Regression
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
CSE Interpolation Roger Crawfis.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Least-Squares Regression
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Today’s class Boundary Value Problems Eigenvalue Problems
Today’s class Numerical Integration Newton-Cotes Numerical Methods
CSE 330 : Numerical Methods
Simpson Rule For Integration.
V. Space Curves Types of curves Explicit Implicit Parametric.
Regression analysis Control of built engineering objects, comparing to the plan Surveying observations – position of points Linear regression Regression.
Review Taylor Series and Error Analysis Roots of Equations
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
1 Interpolation. 2 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 8 Curve Fitting.
Curve-Fitting Regression
Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Today’s class Roots of equation Finish up incremental search
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Spline Interpolation A Primer on the Basics by Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
Curve Fitting Introduction Least-Squares Regression Linear Regression Polynomial Regression Multiple Linear Regression Today’s class Numerical Methods.
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.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Exam 1 Oct 3, closed book Place ITE 119, Time:12:30-1:45pm One double-sided cheat sheet (8.5in x 11in) allowed Bring your calculator to the exam Chapters.
Fourier Approximation Related Matters Concerning Fourier Series.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Environmental Data Analysis with MatLab 2 nd Edition Lecture 22: Linear Approximations and Non Linear Least Squares.
Interpolation - Introduction
Curve-Fitting Spline Interpolation
Interpolation.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Solving Polynomial Functions
Chapter 15 Curve Fitting : Splines
Chapter 18.
Today’s class Multiple Variable Linear Regression
Splines and Piecewise Interpolation
Numerical Analysis Lecture 26.
MATH 174: Numerical Analysis I
Splines There are cases where polynomial interpolation is bad
INTERPOLATION For both irregulary spaced and evenly spaced data.
SKTN 2393 Numerical Methods for Nuclear Engineers
Theory of Approximation: Interpolation
Presentation transcript:

Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1

Lagrange & Newton Interpolation Noticing that the function (black line) has a sharp or sudden change at x = 0. Polynomial interpolations work poorly. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 2

Spline Interpolation Spline interpolation applies low-order polynomial to connect two neighboring points and uses it to interpolate between them. Typical Spline functions Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 3

Linear Splines Use straight lines to connect two neighboring points Shortcomings: Sharp angle at connections, or not smooth. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 4

Linear Splines Use either Lagrange or Newton interpolations to determine the equations for the straight lines To find y 5 at x 5, first find which interval x 5 is in and then use the linear Spline in that region to calculate y 5. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 5

Quadratic Spline Function Each two neighboring points are connected by a 2 nd -order (quadratic) polynomial. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 6

Quadratic Splines If number of points is n+1, there are two end points and n-1 interior points. The number of intervals is n. Since each interval has one quadratic polynomial, there are 3n unknown coefficients (a i, b i & c i ) to be determined. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 7

Conditions Used to Determine Coefficients At each interior point, the two neighboring quadratic polynomials have to pass this point, resulting in 2(n-1) equations The first and last quadratics must pass through the end points resulting in 2 more equations. At each interior point, the first-order derivatives of the two neighboring polynomials are equal, resulting in (n-1) equations. The last equation is obtained by letting the second- order derivative of the first polynomial equal zero (totally arbitrary and may be changed). Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 8

Equations Used to Determine Coefficients Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 9

Quadratic Splines Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 10

Cubic Spline Function Each two neighboring points are connected or interpolated by a 3 rd -order (Cubic) polynomial. If # of points is n+1, then there are two end points and n-1 interior points. # of intervals is n. Each interval has a cubic polynomial. There are totally 4n unknown coefficients (a i, b i, c i & d i ). Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 11

Conditions Used to Determine Coefficients At each interior point, the two neighboring cubic polynomials have to pass this point, resulting in 2(n-1) equations Only one cubic polynomial to pass an end point, resulting in 2 equations At each interior point, the first-order & second-order derivatives of the two neighboring polynomials are equal, resulting in 2(n-1) equations. There are totally 4n-2 equations, two more additional equations are needed by letting the second-order derivatives of the first and last polynomials equal zero. Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 12

Equations Used to Determine Coefficients Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 13 Second

Cubic Spline Functions Second derivative is a line Lagrange interpolating polynomial for second derivative Integrate twice to get f i (x) Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 14

Cubic Spline Functions Two constants can be evaluated by applying interval end conditions Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 15

Cubic Spline Functions First derivatives at knots must be equal Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 16 at x i

Cubic Spline Functions Rearranging terms we get the following relationship For all n-1 interior knots, this gives us n-1 equation with n-1 unknowns – the second derivatives Once we solve for the second derivatives, we can plug it into the previous equations to solve for the splines Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 17

Cubic Spline Functions Example: (3,2.5), (4.5,1), (7,2.5), (9,0.5) At x=x 1 =4.5 Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 18

Cubic Spline Functions Example: (3,2.5), (4.5,1), (7,2.5), (9,0.5) At x=x 2 =7 Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 19

Cubic Spline Equations Solve the system of equations to find the second derivatives Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 20

Cubic Spline Equations Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 21

Cubic Spline Equations Substituting for other intervals Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 22

Cubic Splines Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 23

Fourier Approximation What if the curve is periodic Use a sinusoidal function as the least- squares model Select coefficients to minimize least- squares sum Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 24

Least-Squares Approximation of Sinusoidal Functions Special case when the data points are spaced at equal intervals of Δt over one period Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 25

Fourier Series Any periodic function can be represented by a series of sinusoids of multiples of a common harmonic frequency [ ] Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 26

Fourier Series Example Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 27

Fourier Series Example Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 28

Fourier Series Example Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 29

Fourier Series Example Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 30

Fourier Series Example Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 31

Fourier Series Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 32

Next class Review Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 33