Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

Size: px
Start display at page:

Download "Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?"

Transcription

1 Applied Numerical Analysis Interpolation Lecturer: Emad Fatemizadeh

2 Interpolation Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x What for x = 1.?

3 Interpolation Piecewise-Linear ea Interpolation: o Draw a line from (x k,y k ) to (x k+1,y k+1 ) (x k+1,y k+1 ) (x k,y k ) k k 1 x xk f x = y + y + 1 y x x ( ) ( ) k k k k k+ 1 k x x x + Result is continuous but NOT Differentiable!

4 Piecewise-Linear Interpolation

5 Interpolation Polynomial Interpolation: Why Polynomial: Taylor Series of a f(x) near x 0: ( ) k = 0 n! ( k ) ( x0 ) ( ) N f f x x x Computation is to simple Practical Application: Complex function in engineering problems! 0 k

6 Interpolation Polynomial Interpolation Simple approach: We have ( x, y ) We have { } n i i i= 0 n n k i i k i k = 0 k = 0 k k ( ) = = ( ) =, = 0,1,, f x a x y f x a x i n 1 n n y 0 = a0 + ax anx 0 1 x a 0 x 0 0 y 0 1 n n y 1 = a0 + ax anx1 1 x a 1 x 1 1 y 1 = 1 n n y 1 n = a0 + ax 1 n + + a x a nx n n x n n y n a= 1 X y

7 Interpolation Example: Data: {( 0,6 ),( 1,0 ),(,) } a a a1 = 0 f ( x) = 4x 10x+ 6

8 Polynomial Interpolation

9 Interpolation Problems of the this formulation: Matrix Inversion is time consuming. Matrix Inversion is erroneous.

10 Interpolation Lagrange Method: n f ( x ) = Lk ( x ) y k k = 0 f ( x i) = y i 1 x = x i Li ( x ) = 0 x x i x x 0 x x k 1 x x k + 1 x x n Lk ( x ) = x x x x x x x x ( ) ( )( ) ( ) ( k 0 ) ( k k 1 )( k k + 1 ) ( k n ) ( ) = 1, ( ) = 0, L x L x x x k k k i i k

11 Interpolation Example: {( ) ( ) ( )} ( x 1)( x ) x 3x + ( x) = = ( 0 1)( 0 ) ( x 0)( x ) x x ( x) = = ( 1 0)( 1 ) 1 ( x 0)( x 1) x x ( x) = = ( 0)( 1) ( ) ( ) ( ) ( ) Data: 0,6, 1,0,, L L L 0 1 f x = 6L x + 0L x + L x = 4x 10x

12 Interpolation Error: ( ) ( x x )( x x ) ( x xn ) ( N + 1! ) ( ) 0 1 ( N + 1) EN x = f c x0 c xn,

13 Interpolation Newton Method: x y ( ) = = ( ) ( ) ( ) ( ) P1( x1) = y1 ( ) ( ) ( ) ( )( ) P( x) = y ( ) ( ) ( ) ( )( )( ) P3( x3) = y3 ( ) P x y P x = P x + c x x = 5+ c x 0 P x = 5+ x P x = P x + c x x x x P x = 5+ x 4 x( x 1) P x = P x + c x x x x x x P x = 5+ x 4 x ( x 1) ( ) ( ) ( )( )( )( ) P x = y P x P x c x x x x x x x x P x ( ) 8x( x 1)( x+ 1) ( ) 5 x x x + ( )( + ) + ( )( + )( ) = + = + 4 ( 1) 8x x 1 x 1 3x x 1 x 1 x

14 Matlab Commands polyfit: Find polynomial p = polyfit(x,y,n);

15 Interpolation Radial Basis Function: Symmetric Function (1D) ( ) Consider, then f or radial basis. D example: f x ( ) exp f x f ( x ) ( x y ) = exp ( r )

16 Interpolation If φ(x) be a radial basis function: ( x y ) Data:, n { } i i i = 1 n = k k = 1 ( ) ϕ ( ) f x w x x n ( ) ϕ ( ) i i k i k k = 1 k f x = y = w x x, i = 1,,, n ( ) ϕ = ϕ x x y = wϕ ik, i k i k ik, k = 1 n

17 Interpolation y1 ϕ1,1 ϕ1, ϕ1, n w1 y ϕ,1 ϕ, ϕ, n w =, ϕ ik, = ϕ ki,, ϕ ii, = ϕ 0 y ϕ n n,1 ϕn, ϕn, n wn 1 w1 ϕ1,1 ϕ1, ϕ1, n y1 w ϕ,1 ϕ, ϕ, n y = w ϕ n n,1 ϕn, ϕn, n yn ( )

18 Interpolation Sample of RBF function: r = x x exp r r r r r 3 i ( r ) log j ( r ) 1 + c + c

19 { x } { y } i Numerical Example = [ 101], = [ 15] i ( ) ( ) ( ) ( ) 1exp 1 exp 3exp 3 y = f x = w x x + w x x + w x x ( ( ) ) ( ) ( ) ( ) y = w exp x w exp x + w exp x ( ) ( ) ( ) y = f x = w e + w e + w e = 1 1 e e 1 y f x w e w e w e e = y f x w e w e w w = = e = 1 w = 3 = e = 5 e e w 3 w w = w ( ) ( ) ( ) ( ) ( ( ) ) y = f x = exp x exp x exp x 1

20 Numerical Example

21 Matlab Coding Hints What we need: φ = ϕ ( x ) i x j What we need: First we calculate: r = x x First Method: a for loop. x = [-1 0 1]'; y = [-1 5]'; r = zeros(length(x)); for i=1:length(x), for j=1:length(x), end; end r(i,j)=abs(x(i)-x(j)); x(j)); i j

22 Matlab Coding Hints Another Methods: Note that: * [ ] = = Tabe absolute value: T

23 Matlab Coding Hints Matlab Code: Other parts: x = [-1 0 1]'; y = [-1 5]'; Tmp = x*ones(1,3); r = abs(tmp-tmp'); Phi = exp(-r.^); w = inv(phi)*y;

24 Spline Consider two discussed approach: A single polynomial to N points. (N-1) line between two successive point. Now we could do a combination!

25 Linear Splines The simplest connection between two points is a straight line: f ( x ) = f ( x0 ) + m0 ( x x0 ), x0 x x1 f ( x) = f ( x ) + m ( x x ), x x x ( ) ( ) ( ) f ( x ) f ( x ) f x = f x + m x x, x x x m i = i+ 1 x i+ 1 n 1 n 1 n 1 n 1 n x i i

26 Linear Spline Continuous at knots Not differentiable at knots. Knots

27 Quadratic Splines Goal: Derive a nd order polynomial for each interval between data points ( ) f x = a x + bx+ c i i i i x i-1 x i

28 Quadratic Splines For (n+1) points (0,1,,,n), we have n interval, 3n unknown parameters (a i, b i, and c i ). Thus we need 3n conditions

29 Quadratic Splines The function value of adjacent polynomials must be equal at interior knots. (i=1, i=n-1); ai 1xi 1+ bi 1xi 1+ ci 1 = f ( xi 1), fi 1 at upper bound ax + bx + c = f ( x ), f at lower bound i i 1 i i 1 i i 1 i i=,3,,n (n-1) conditions (we need 3n)

30 Quadratic Splines The function value of first and last polynomials must pass through the end points. (i=0, i=n); ax + bx + c = f x ( ) ( ) ax + bx + c = f x n n n n n n conditions (n-1)+=n conditions (we need 3n)

31 Quadratic Splines The first derivatives at interior knots must be equal (i=0, i=n); a x + b = a x + b i 1 i 1 i 1 i i 1 i i =,3,, n n-1 conditions n+n-1=3n-11 conditions (we need 3n)

32 Quadratic Splines An arbitrary condition: nd derivative at first point is zero.! 1 conditions a = 1 0 3n-1+1=3n conditions (we need 3n)

33 Example x=[3, , 7, 9] and y=[.5, y=[5 1,.5, 5 0.5] 05] n=3; x a1 b1 c1 = 4.5: = 1 x = 45: 4.5: a b + c = 1 x= 7: 49a + 7b + c =.5 Function value x = 7: 49 a b 3 + c 3 =.5 x= 3: 9a1+ 3b1+ c1 =.5, First point x = 9: 81a + 9b + c = , Last point x= 4.5: 9a1+ b1 = 9a + b Function Deriv. x = 7 : 17a + b = 14a + b a 1 = 0 3 3

34 Example x x f ( x) = 0.64x 6.76x x x x x 9

35 Cubic Splines Goal: Derive a 3 rd order polynomial for each interval between data points ( ) 3 f x = a x + bx + cx+ d i i i i i x i-1 x i

36 Cubic Splines Conditions: o The function value must be equal at the interior knots (i=,n-1) 1)-> n- The first and last function must pass through the end points (i=0,n)-> The first derivatives at the interior knots must be equal (i=,n-1) -> n-1 The second derivatives at the interior knots must be equal (i=,n-1) -> n-1 The second derivatives at the end knots are zeros (i=0,n) -> 4n condition and 4n parameters!

37 Cubic Splines Special case: x i+1 -x i =h, i=n-1 1,,0 x x x i 1 i ( x x ) i ( x xi 1)( x xi) 3 fi( x) = + f h h i 1 ( x x ) ( x x ) ( x x ) + h i 1 i 1 i 3 ( x x )( x x ) ( x x ) ( x x ) + S + h h i 1 i i 1 i i 1 h f i S i

38 Cubic Splines Condition: fi( xi) = yi ( ) i ( i ) = i + ( i ) ( ) i( i) = i+ ( i) fi( xi) = fi+ 1 ( xi) ( ) 1 1( 0) = 0 fn( xn) yn ( ) 1 1( 0) = 0 f ( x ) = 0 f 1 x x 0 x x 1 f x f 1 x f x x1 x x f x f 1 x fi x xi x xi f x y = fn x xn x xn f x n n

39 Cubic Splines 3 S i + 4 S i S i + = ( y i + y i ) i = 0,1,, n h Si = 0 i = 0, n

40 Example x=[3, 3.5, 4] y=[1.098, 1.53, 1.386] S 0 = S = 0 3 4S1 = ( ) S1 =

41 Matlab Command Spline Ynew = spline(xold,yold,xnew) Xnew) x=[ ]; y=[ ]; xx=0:.01:8; yy=spline(x,y,xx);

42 Example

43 Two Dimensional Interpolation We have z=f(x,y) at limited (x i,y i ): Goal: Find f(x,y) at arbitrary (x,y) among (x i,y i ).

44 Lagrange Method Lagrange Method M N f ( x, y ) = Lij ( x, y ) z ij i= 1 j= 1 f ( x, y ) = z 1 x = x i and y = y i Lij ( x, y ) = 0 O.W. L x, y = L x L y L i i ij ( ) ( ) ( ) ( x x 0 ) ( x x k 1 )( x x k + 1 ) ( x x n ) ( x ) = ( x k x 0) ( x k x k 1)( x k x k + 1) ( x k x n) ( ) = 1, ( ) = 0, ij i j k L x L x x x k k k i i k

45 Bilinear A quadratic D spline Data is regular. (, ) = (, ), f x y z i i i j f x y = z i+ 1 i i+ 1, j (, ) f x y + = z + i j+ 1 i, j+ 1 (, ) f x y = z i+ 1 j+ 1 i+ 1, j+ 1

46 Bilinear Interpolation Formulation: (, ) = + + +, i i+ 1, i i+ 1 = (, ) = f x y axy bx cy d x x x y y y z f x y ax y bx cy d ij i i i i i i

47 RBF function Formulation is very similar f = f ( x, x,, x ), i = 1,,, N i 1 L L = 1 L i = = p p p= 1 T ( x, x,, x ) f f ( ), ( x y ) x x x y N k x xk k = 1 N ( ) = ( ) f x wϕ ( ) ( ) i i kϕ k f x = f = w x x, i = 1,,, N k = 1 ( x x ) ϕ, = ϕ y = wϕ, ik k i k ik k = 1 N

Curve Fitting and Interpolation

Curve Fitting and Interpolation Chapter 5 Curve Fitting and Interpolation 5.1 Basic Concepts Consider a set of (x, y) data pairs (points) collected during an experiment, Curve fitting: is a procedure to develop or evaluate mathematical

More information

Interpolation Theory

Interpolation Theory Numerical Analysis Massoud Malek Interpolation Theory The concept of interpolation is to select a function P (x) from a given class of functions in such a way that the graph of y P (x) passes through the

More information

3.1 Interpolation and the Lagrange Polynomial

3.1 Interpolation and the Lagrange Polynomial MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate

More information

Curve Fitting. Objectives

Curve Fitting. Objectives Curve Fitting Objectives Understanding the difference between regression and interpolation. Knowing how to fit curve of discrete with least-squares regression. Knowing how to compute and understand the

More information

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20 Exam 2 Average: 85.6 Median: 87.0 Maximum: 100.0 Minimum: 55.0 Standard Deviation: 10.42 Fall 2011 1 Today s class Multiple Variable Linear Regression Polynomial Interpolation Lagrange Interpolation Newton

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

November 20, Interpolation, Extrapolation & Polynomial Approximation

November 20, Interpolation, Extrapolation & Polynomial Approximation Interpolation, Extrapolation & Polynomial Approximation November 20, 2016 Introduction In many cases we know the values of a function f (x) at a set of points x 1, x 2,..., x N, but we don t have the analytic

More information

Interpolation and extrapolation

Interpolation and extrapolation Interpolation and extrapolation Alexander Khanov PHYS6260: Experimental Methods is HEP Oklahoma State University October 30, 207 Interpolation/extrapolation vs fitting Formulation of the problem: there

More information

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

Applied Numerical Analysis Homework #3

Applied Numerical Analysis Homework #3 Applied Numerical Analysis Homework #3 Interpolation: Splines, Multiple dimensions, Radial Bases, Least-Squares Splines Question Consider a cubic spline interpolation of a set of data points, and derivatives

More information

Computational Physics

Computational Physics Interpolation, Extrapolation & Polynomial Approximation Lectures based on course notes by Pablo Laguna and Kostas Kokkotas revamped by Deirdre Shoemaker Spring 2014 Introduction In many cases, a function

More information

Interpolation and Polynomial Approximation I

Interpolation and Polynomial Approximation I Interpolation and Polynomial Approximation I If f (n) (x), n are available, Taylor polynomial is an approximation: f (x) = f (x 0 )+f (x 0 )(x x 0 )+ 1 2! f (x 0 )(x x 0 ) 2 + Example: e x = 1 + x 1! +

More information

Engineering 7: Introduction to computer programming for scientists and engineers

Engineering 7: Introduction to computer programming for scientists and engineers Engineering 7: Introduction to computer programming for scientists and engineers Interpolation Recap Polynomial interpolation Spline interpolation Regression and Interpolation: learning functions from

More information

Common Core Algebra 2 Review Session 1

Common Core Algebra 2 Review Session 1 Common Core Algebra 2 Review Session 1 NAME Date 1. Which of the following is algebraically equivalent to the sum of 4x 2 8x + 7 and 3x 2 2x 5? (1) 7x 2 10x + 2 (2) 7x 2 6x 12 (3) 7x 4 10x 2 + 2 (4) 12x

More information

Math Numerical Analysis Mid-Term Test Solutions

Math Numerical Analysis Mid-Term Test Solutions Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)

More information

Applied Numerical Analysis Quiz #2

Applied Numerical Analysis Quiz #2 Applied Numerical Analysis Quiz #2 Modules 3 and 4 Name: Student number: DO NOT OPEN UNTIL ASKED Instructions: Make sure you have a machine-readable answer form. Write your name and student number in the

More information

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines Cubic Splines MATH 375 J. Robert Buchanan Department of Mathematics Fall 2006 Introduction Given data {(x 0, f(x 0 )), (x 1, f(x 1 )),...,(x n, f(x n ))} which we wish to interpolate using a polynomial...

More information

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1

More information

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes). CE 025 - Lecture 6 LECTURE 6 GAUSS QUADRATURE In general for ewton-cotes (equispaced interpolation points/ data points/ integration points/ nodes). x E x S fx dx hw' o f o + w' f + + w' f + E 84 f 0 f

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter Key References: Interpolation 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter 6. 2. Press, W. et. al. Numerical Recipes in C, Cambridge: Cambridge University Press. Chapter 3

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n . - Piecewise Linear-Quadratic Interpolation Piecewise-polynomial Approximation: Problem: Givenn pairs of data points x i, y i, i,,...,n, find a piecewise-polynomial Sx S x if x x x Sx S x if x x x 2 :

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes Jim Lambers MAT 419/519 Summer Session 2011-12 Lecture 13 Notes These notes correspond to Section 4.1 in the text. Least Squares Fit One of the most fundamental problems in science and engineering is data

More information

Cubic Splines; Bézier Curves

Cubic Splines; Bézier Curves Cubic Splines; Bézier Curves 1 Cubic Splines piecewise approximation with cubic polynomials conditions on the coefficients of the splines 2 Bézier Curves computer-aided design and manufacturing MCS 471

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Polynomial Interpolation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 24, 2013 1.1 Introduction We first look at some examples. Lookup table for f(x) = 2 π x 0 e x2

More information

Least squares regression

Least squares regression Curve Fitting Least squares regression Interpolation Two categories of curve fitting. 1. Linear least squares regression, determining the straight line that best fits data points. 2. Interpolation, determining

More information

Chapter 1 Numerical approximation of data : interpolation, least squares method

Chapter 1 Numerical approximation of data : interpolation, least squares method Chapter 1 Numerical approximation of data : interpolation, least squares method I. Motivation 1 Approximation of functions Evaluation of a function Which functions (f : R R) can be effectively evaluated

More information

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Engg. Math. II (Unit-IV) Numerical Analysis

Engg. Math. II (Unit-IV) Numerical Analysis Dr. Satish Shukla of 33 Engg. Math. II (Unit-IV) Numerical Analysis Syllabus. Interpolation and Curve Fitting: Introduction to Interpolation; Calculus of Finite Differences; Finite Difference and Divided

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning 76 Chapter 7 Interpolation 7.1 Interpolation Definition 7.1.1. Interpolation of a given function f defined on an interval [a,b] by a polynomial p: Given a set of specified points {(t i,y i } n with {t

More information

BSM510 Numerical Analysis

BSM510 Numerical Analysis BSM510 Numerical Analysis Polynomial Interpolation Prof. Manar Mohaisen Department of EEC Engineering Review of Precedent Lecture Polynomial Regression Multiple Linear Regression Nonlinear Regression Lecture

More information

Interpolation (Shape Functions)

Interpolation (Shape Functions) Mètodes Numèrics: A First Course on Finite Elements Interpolation (Shape Functions) Following: Curs d Elements Finits amb Aplicacions (J. Masdemont) http://hdl.handle.net/2099.3/36166 Dept. Matemàtiques

More information

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations MA3457/CS4033: Numerical Methods for Calculus and Differential Equations Course Materials P A R T II B 14 2014-2015 1 2. APPROXIMATION CLASS 9 Approximation Key Idea Function approximation is closely related

More information

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1 Data Analysis-I Interpolation Soon-Hyung Yook December 4, 2015 Soon-Hyung Yook Data Analysis-I December 4, 2015 1 / 1 Table of Contents Soon-Hyung Yook Data Analysis-I December 4, 2015 2 / 1 Introduction

More information

Basic Linear Algebra in MATLAB

Basic Linear Algebra in MATLAB Basic Linear Algebra in MATLAB 9.29 Optional Lecture 2 In the last optional lecture we learned the the basic type in MATLAB is a matrix of double precision floating point numbers. You learned a number

More information

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, 1 Interpolation 11 Introduction In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, {x i, y i = f(x i ) i = 1 n, obtained,

More information

Chapter 2 Interpolation

Chapter 2 Interpolation Chapter 2 Interpolation Experiments usually produce a discrete set of data points (x i, f i ) which represent the value of a function f (x) for a finite set of arguments {x 0...x n }. If additional data

More information

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27 Chapter 11 Taylor Series Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27 First-Order Approximation We want to approximate function f by some simple function. Best possible approximation

More information

Empirical Models Interpolation Polynomial Models

Empirical Models Interpolation Polynomial Models Mathematical Modeling Lia Vas Empirical Models Interpolation Polynomial Models Lagrange Polynomial. Recall that two points (x 1, y 1 ) and (x 2, y 2 ) determine a unique line y = ax + b passing them (obtained

More information

Chapter 3 Interpolation and Polynomial Approximation

Chapter 3 Interpolation and Polynomial Approximation Chapter 3 Interpolation and Polynomial Approximation Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Polynomial Interpolation

More information

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

Q1. Discuss, compare and contrast various curve fitting and interpolation methods Q1. Discuss, compare and contrast various curve fitting and interpolation methods McMaster University 1 Curve Fitting Problem statement: Given a set of (n + 1) point-pairs {x i,y i }, i = 0,1,... n, find

More information

Convergence rates of derivatives of a family of barycentric rational interpolants

Convergence rates of derivatives of a family of barycentric rational interpolants Convergence rates of derivatives of a family of barycentric rational interpolants J.-P. Berrut, M. S. Floater and G. Klein University of Fribourg (Switzerland) CMA / IFI, University of Oslo jean-paul.berrut@unifr.ch

More information

Math 578: Assignment 2

Math 578: Assignment 2 Math 578: Assignment 2 13. Determine whether the natural cubic spline that interpolates the table is or is not the x 0 1 2 3 y 1 1 0 10 function 1 + x x 3 x [0, 1] f(x) = 1 2(x 1) 3(x 1) 2 + 4(x 1) 3 x

More information

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000:

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000: MATH4414.01 ASSIGNMENT 07 SOLUTIONS 8.1 Following is census data showing the population of the US between 1900 and 2000: Years after 1900 Population in millions 0 76.0 20 105.7 40 131.7 60 179.3 80 226.5

More information

5. Polynomial Functions and Equations

5. Polynomial Functions and Equations 5. Polynomial Functions and Equations 1. Polynomial equations and roots. Solving polynomial equations in the chemical context 3. Solving equations of multiple unknowns 5.1. Polynomial equations and roots

More information

Section 8.3 Partial Fraction Decomposition

Section 8.3 Partial Fraction Decomposition Section 8.6 Lecture Notes Page 1 of 10 Section 8.3 Partial Fraction Decomposition Partial fraction decomposition involves decomposing a rational function, or reversing the process of combining two or more

More information

Interpolation APPLIED PROBLEMS. Reading Between the Lines FLY ROCKET FLY, FLY ROCKET FLY WHAT IS INTERPOLATION? Figure Interpolation of discrete data.

Interpolation APPLIED PROBLEMS. Reading Between the Lines FLY ROCKET FLY, FLY ROCKET FLY WHAT IS INTERPOLATION? Figure Interpolation of discrete data. WHAT IS INTERPOLATION? Given (x 0,y 0 ), (x,y ), (x n,y n ), find the value of y at a value of x that is not given. Interpolation Reading Between the Lines Figure Interpolation of discrete data. FLY ROCKET

More information

SPLINE INTERPOLATION

SPLINE INTERPOLATION Spline Background SPLINE INTERPOLATION Problem: high degree interpolating polynomials often have extra oscillations. Example: Runge function f(x = 1 1+4x 2, x [ 1, 1]. 1 1/(1+4x 2 and P 8 (x and P 16 (x

More information

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation See your notes. 1. Lagrange Interpolation (8.2) 1 2. Newton Interpolation (8.3) different form of the same polynomial as Lagrange

More information

A Parent s Guide to Understanding Family Life Education in Catholic Schools (and how it connects with Ontario s revised Health and Physical Education

A Parent s Guide to Understanding Family Life Education in Catholic Schools (and how it connects with Ontario s revised Health and Physical Education P i i Fiy i i i ( i i i vi Pyi i i) Bi i Fy 05 i iiy i vii & Pyi i (P) i i i i i ii i 05 B v vi P i i 998 i i i i y ik xi i ii y i iviy P i i i i i i i i i x i iy i k i i i i i v Wii iy ii v vi i i v i

More information

Radial Basis Functions I

Radial Basis Functions I Radial Basis Functions I Tom Lyche Centre of Mathematics for Applications, Department of Informatics, University of Oslo November 14, 2008 Today Reformulation of natural cubic spline interpolation Scattered

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

Polynomial Interpolation

Polynomial Interpolation Capter 4 Polynomial Interpolation In tis capter, we consider te important problem of approximatinga function fx, wose values at a set of distinct points x, x, x,, x n are known, by a polynomial P x suc

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018) MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018) COURSEWORK 3 SOLUTIONS Exercise ( ) 1. (a) Write A = (a ij ) n n and B = (b ij ) n n. Since A and B are diagonal, we have a ij = 0 and

More information

Math 4263 Homework Set 1

Math 4263 Homework Set 1 Homework Set 1 1. Solve the following PDE/BVP 2. Solve the following PDE/BVP 2u t + 3u x = 0 u (x, 0) = sin (x) u x + e x u y = 0 u (0, y) = y 2 3. (a) Find the curves γ : t (x (t), y (t)) such that that

More information

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Interpolation Escuela de Ingeniería Informática de Oviedo (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Outline 1 Introduction 2 Lagrange interpolation 3 Piecewise polynomial

More information

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1 ath 651 Introduction to Numerical Analysis I Fall 2010 SOLUTIONS: Homework Set 1 1. Consider the polynomial f(x) = x 2 x 2. (a) Find P 1 (x), P 2 (x) and P 3 (x) for f(x) about x 0 = 0. What is the relation

More information

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University Interpolation Sanzheng Qiao Department of Computing and Software McMaster University January, 2014 Outline 1 Introduction 2 Polynomial Interpolation 3 Piecewise Polynomial Interpolation 4 Natural Cubic

More information

Numerical Marine Hydrodynamics

Numerical Marine Hydrodynamics Numerical Marine Hydrodynamics Interpolation Lagrange interpolation Triangular families Newton s iteration method Equidistant Interpolation Spline Interpolation Numerical Differentiation Numerical Integration

More information

Introduction Linear system Nonlinear equation Interpolation

Introduction Linear system Nonlinear equation Interpolation Interpolation Interpolation is the process of estimating an intermediate value from a set of discrete or tabulated values. Suppose we have the following tabulated values: y y 0 y 1 y 2?? y 3 y 4 y 5 x

More information

Cubic Splines. Antony Jameson. Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305

Cubic Splines. Antony Jameson. Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305 Cubic Splines Antony Jameson Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305 1 References on splines 1. J. H. Ahlberg, E. N. Nilson, J. H. Walsh. Theory of

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

More information

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University Interpolation Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Introduction 2 Polynomial Interpolation 3 Piecewise Polynomial Interpolation 4 Natural Cubic Spline

More information

Algebra III Chapter 2 Note Packet. Section 2.1: Polynomial Functions

Algebra III Chapter 2 Note Packet. Section 2.1: Polynomial Functions Algebra III Chapter 2 Note Packet Name Essential Question: Section 2.1: Polynomial Functions Polynomials -Have nonnegative exponents -Variables ONLY in -General Form n ax + a x +... + ax + ax+ a n n 1

More information

Piecewise Polynomial Interpolation

Piecewise Polynomial Interpolation Piecewise Polynomial Interpolation 1 Piecewise linear interpolation Suppose we have data point (x k,y k ), k =0, 1,...N. A piecewise linear polynomial that interpolates these points is given by p(x) =p

More information

arxiv: v1 [math.na] 1 May 2013

arxiv: v1 [math.na] 1 May 2013 arxiv:3050089v [mathna] May 03 Approximation Properties of a Gradient Recovery Operator Using a Biorthogonal System Bishnu P Lamichhane and Adam McNeilly May, 03 Abstract A gradient recovery operator based

More information

, B = (b) Use induction to prove that, for all positive integers n, f(n) is divisible by 4. (a) Use differentiation to find f (x).

, B = (b) Use induction to prove that, for all positive integers n, f(n) is divisible by 4. (a) Use differentiation to find f (x). Edexcel FP1 FP1 Practice Practice Papers A and B Papers A and B PRACTICE PAPER A 1. A = 2 1, B = 4 3 3 1, I = 4 2 1 0. 0 1 (a) Show that AB = ci, stating the value of the constant c. (b) Hence, or otherwise,

More information

446 CHAP. 8 NUMERICAL OPTIMIZATION. Newton's Search for a Minimum of f(x,y) Newton s Method

446 CHAP. 8 NUMERICAL OPTIMIZATION. Newton's Search for a Minimum of f(x,y) Newton s Method 446 CHAP. 8 NUMERICAL OPTIMIZATION Newton's Search for a Minimum of f(xy) Newton s Method The quadratic approximation method of Section 8.1 generated a sequence of seconddegree Lagrange polynomials. It

More information

MTH4101 CALCULUS II REVISION NOTES. 1. COMPLEX NUMBERS (Thomas Appendix 7 + lecture notes) ax 2 + bx + c = 0. x = b ± b 2 4ac 2a. i = 1.

MTH4101 CALCULUS II REVISION NOTES. 1. COMPLEX NUMBERS (Thomas Appendix 7 + lecture notes) ax 2 + bx + c = 0. x = b ± b 2 4ac 2a. i = 1. MTH4101 CALCULUS II REVISION NOTES 1. COMPLEX NUMBERS (Thomas Appendix 7 + lecture notes) 1.1 Introduction Types of numbers (natural, integers, rationals, reals) The need to solve quadratic equations:

More information

A New Trust Region Algorithm Using Radial Basis Function Models

A New Trust Region Algorithm Using Radial Basis Function Models A New Trust Region Algorithm Using Radial Basis Function Models Seppo Pulkkinen University of Turku Department of Mathematics July 14, 2010 Outline 1 Introduction 2 Background Taylor series approximations

More information

Math 4310 Solutions to homework 7 Due 10/27/16

Math 4310 Solutions to homework 7 Due 10/27/16 Math 4310 Solutions to homework 7 Due 10/27/16 1. Find the gcd of x 3 + x 2 + x + 1 and x 5 + 2x 3 + x 2 + x + 1 in Rx. Use the Euclidean algorithm: x 5 + 2x 3 + x 2 + x + 1 = (x 3 + x 2 + x + 1)(x 2 x

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Partititioned Methods for Multifield Problems

Partititioned Methods for Multifield Problems Partititioned Methods for Multifield Problems Joachim Rang, 22.7.215 22.7.215 Joachim Rang Partititioned Methods for Multifield Problems Seite 1 Non-matching matches usually the fluid and the structure

More information

Optimization and Calculus

Optimization and Calculus Optimization and Calculus To begin, there is a close relationship between finding the roots to a function and optimizing a function. In the former case, we solve for x. In the latter, we solve: g(x) =

More information

Polynomial Interpolation

Polynomial Interpolation Polynomial Interpolation (Com S 477/577 Notes) Yan-Bin Jia Sep 1, 017 1 Interpolation Problem In practice, often we can measure a physical process or quantity (e.g., temperature) at a number of points

More information

Root Finding (and Optimisation)

Root Finding (and Optimisation) Root Finding (and Optimisation) M.Sc. in Mathematical Modelling & Scientific Computing, Practical Numerical Analysis Michaelmas Term 2018, Lecture 4 Root Finding The idea of root finding is simple we want

More information

Piecewise Polynomial Interpolation

Piecewise Polynomial Interpolation Piecewise Polynomial Interpolation 1 Piecewise linear interpolation Suppose we have data point (x k,y k ), k =0, 1,...N. A piecewise linear polynomial that interpolates these points is given by p(x) =p

More information

Taylor Series and Numerical Approximations

Taylor Series and Numerical Approximations Taylor Series and Numerical Approximations Hilary Weller h.weller@reading.ac.uk August 7, 05 An introduction to the concept of a Taylor series and how these are used in numerical analysis to find numerical

More information

Kernel B Splines and Interpolation

Kernel B Splines and Interpolation Kernel B Splines and Interpolation M. Bozzini, L. Lenarduzzi and R. Schaback February 6, 5 Abstract This paper applies divided differences to conditionally positive definite kernels in order to generate

More information

Math 2233 Homework Set 7

Math 2233 Homework Set 7 Math 33 Homework Set 7 1. Find the general solution to the following differential equations. If initial conditions are specified, also determine the solution satisfying those initial conditions. a y 4

More information

Lecture 1 INF-MAT3350/ : Some Tridiagonal Matrix Problems

Lecture 1 INF-MAT3350/ : Some Tridiagonal Matrix Problems Lecture 1 INF-MAT3350/4350 2007: Some Tridiagonal Matrix Problems Tom Lyche University of Oslo Norway Lecture 1 INF-MAT3350/4350 2007: Some Tridiagonal Matrix Problems p.1/33 Plan for the day 1. Notation

More information

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation Outline Interpolation 1 Interpolation 2 3 Michael T. Heath Scientific Computing 2 / 56 Interpolation Motivation Choosing Interpolant Existence and Uniqueness Basic interpolation problem: for given data

More information

Numerical interpolation, extrapolation and fi tting of data

Numerical interpolation, extrapolation and fi tting of data Chapter 6 Numerical interpolation, extrapolation and fi tting of data 6.1 Introduction Numerical interpolation and extrapolation is perhaps one of the most used tools in numerical applications to physics.

More information

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Mathematical Olympiad Training Polynomials

Mathematical Olympiad Training Polynomials Mathematical Olympiad Training Polynomials Definition A polynomial over a ring R(Z, Q, R, C) in x is an expression of the form p(x) = a n x n + a n 1 x n 1 + + a 1 x + a 0, a i R, for 0 i n. If a n 0,

More information

, a 1. , a 2. ,..., a n

, a 1. , a 2. ,..., a n CHAPTER Points to Remember :. Let x be a variable, n be a positive integer and a 0, a, a,..., a n be constants. Then n f ( x) a x a x... a x a, is called a polynomial in variable x. n n n 0 POLNOMIALS.

More information

2

2 1 Notes for Numerical Analysis Math 54 by S. Adjerid Virginia Polytechnic Institute and State University (A Rough Draft) 2 Contents 1 Polynomial Interpolation 5 1.1 Review...............................

More information

Newton s Method and Linear Approximations

Newton s Method and Linear Approximations Newton s Method and Linear Approximations Curves are tricky. Lines aren t. Newton s Method and Linear Approximations Newton s Method for finding roots Goal: Where is f (x) = 0? f (x) = x 7 + 3x 3 + 7x

More information

MAT 300 Midterm Exam Summer 2017

MAT 300 Midterm Exam Summer 2017 MAT Midterm Exam Summer 7 Note: For True-False questions, a statement is only True if it must always be True under the given assumptions, otherwise it is False.. The control points of a Bezier curve γ(t)

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 7 Interpolation Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted

More information

Each aix i is called a term of the polynomial. The number ai is called the coefficient of x i, for i = 0, 1, 2,..., n.

Each aix i is called a term of the polynomial. The number ai is called the coefficient of x i, for i = 0, 1, 2,..., n. Polynomials of a single variable. A monomial in a single variable x is a function P(x) = anx n, where an is a non-zero real number and n {0, 1, 2, 3,...}. Examples are 3x 2, πx 8 and 2. A polynomial in

More information

MULTIVARIATE BIRKHOFF-LAGRANGE INTERPOLATION SCHEMES AND CARTESIAN SETS OF NODES. 1. Introduction

MULTIVARIATE BIRKHOFF-LAGRANGE INTERPOLATION SCHEMES AND CARTESIAN SETS OF NODES. 1. Introduction Acta Math. Univ. Comenianae Vol. LXXIII, 2(2004), pp. 217 221 217 MULTIVARIATE BIRKHOFF-LAGRANGE INTERPOLATION SCHEMES AND CARTESIAN SETS OF NODES N. CRAINIC Abstract. In this paper we study the relevance

More information

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45 Two hours MATH20602 To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER NUMERICAL ANALYSIS 1 29 May 2015 9:45 11:45 Answer THREE of the FOUR questions. If more

More information

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama Introduction to Computer Graphics Modeling (1) April 13, 2017 Kenshi Takayama Parametric curves X & Y coordinates defined by parameter t ( time) Example: Cycloid x t = t sin t y t = 1 cos t Tangent (aka.

More information