Computational Physics
|
|
- Brent Jacobs
- 6 years ago
- Views:
Transcription
1 Interpolation, Extrapolation & Polynomial Approximation Lectures based on course notes by Pablo Laguna and Kostas Kokkotas revamped by Deirdre Shoemaker Spring 2014
2 Introduction In many cases, a function f (x) is only known at a set of points {x 1, x 2,..., x N }, and we are interested estimating its value at an arbitrary point. Estimating f (x) with x [x 1, x N ] is called interpolation. Estimating f (x) with x / [x 1, x N ] is called extrapolation.
3 Polynomial Approximations Polynomial functions are the most popular. Rational and trigonometric functions are also used quite frequently. We will study the following methods for polynomial approximations: Lagrange s Polynomial Hermite Polynomial Taylor Polynomial Cubic Splines
4 Lagrange Polynomial Consider the following data: x 0 x 1 x 2 x 3 x f (x) f 0 f 1 f 2 f 3 A possible interpolating polynomial is : P 3 (x) = ax 3 + bx 2 + cx + d (i.e. a 3th order polynomial). This leads to 4 equations for the 4 unknown coefficients. The solutions are a = , b = , c = , d = Thus P 3 (x) = x x x
5 Lagrange Polynomial For a large number of points, this procedure could be quite laborious. Given a set of n + 1 points {x i, f i } i=0,...,n, Lagrange developed a direct way to find the polynomial P n (x) = f 0 L 0 (x) + f 1 L 1 (x) f n L n (x) = n f i L i (x) i=0 where L i (x) are the Lagrange coefficient polynomials The coefficients are given by L j (x) = (x x 0)(x x 1 )...(x x j 1 )(x x j+1 )...(x x n ) (x j x 0 )(x j x 1 )...(x j x j 1 )(x j x j+1 )...(x j x n ) n x x k = with k j x j x k k=0
6 Notice L j (x k ) = δ jk = where δ jk is Kronecker s symbol. Therefore, { 0 if j k 1 if j = k P n (x j ) = n f i L i (x j ) = i=0 n f i δ ij = f (x j ) i=0 The error when using Lagrange interpolation is: E n (x) = f (x) P n (x) = (x x 0 )(x x 1 )...(x x n ) f (n+1) (ξ) (n + 1)! where ξ [x 0, x N ] Notice that Lagrange polynomial applies to both evenly and unevenly spaced points.
7 Lagrange Polynomial Formula Derivation Consider the case of three points. f (x 1 ) = f (x) + (x 1 x) f (x) (x 1 x) 2 f (x) +... f (x 2 ) = f (x) + (x 2 x) f (x) (x 2 x) 2 f (x) +... f (x 3 ) = f (x) + (x 3 x) f (x) (x 3 x) 2 f (x) +... Is is reasonable to think that f (x) p(x) and f (x) p (x). Thus
8 Lagrange Polynomial Formula Derivation f (x 1 ) = p(x) + (x 1 x) p (x) (x 1 x) 2 p (x) f (x 2 ) = p(x) + (x 2 x) p (x) (x 2 x) 2 p (x) f (x 3 ) = p(x) + (x 3 x) p (x) (x 3 x) 2 p (x) We have a system of three equations for three unknowns (p(x), p (x), p (x)). Solving for p(x) one gets the desired answer. Notice that one can also get the expression for the derivatives.
9 Lagrange Polynomial : Example Find the Lagrange polynomial that approximates the function y = cos(πx) using the following data. x i f i The Lagrange coeffiecient polynomials are: L 1 (x) = (x x 2)(x x 3 ) (x 0.5)(x 1) = (x 1 x 2 )(x 1 x 3 ) (0 0.5)(0 1) = 2x 2 3x + 1, L 2 (x) = (x x 1) (x x 3 ) (x 0)(x 1) = (x 2 x 1 )(x 2 x 3 ) (0.5 0)(0.5 1) = 4x 2 + 4x L 3 (x) = (x x 1)(x x 2 ) (x 0)(x 0.5) = (x 3 x 1 )(x 3 x 2 ) (1 0)(1 0.5) = 2x 2 x thus P(x) = (1)(2x 2 3x +1)+(0.0)( 4x 2 +4x)+( 1)(2x 2 x) = 2x + 1
10 The error from using P(x) = 2x + 1 will be: E(x) = (x x 0 )(x x 1 )... (x x n ) f (n+1) (ξ) (n + 1)! for example E(x = 0.25) = (x x 0 )(x x 1 )(x x 2 ) f (3) (ξ) (3)! = x (x 0.5) (x 1) π3 sin(πξ) 3!
11 Hermite Polynomial Interpolation This type of interpolation is very useful when in addition to the values of f (x) one also has its derivative f (x) P n (x) = n A i (x)f i + i=1 n i=1 B i (x)f i where A i (x) = [1 2(x x i )L i (x i)] [L i (x)] 2 B i (x) = (x x i ) [L i (x)] 2 and L i (x) are the Lagrange coefficients.
12 Hermite Polynomial Interpolation Example The Lagrange coefficients are: k x k y k y k L 0 (x) = x x 1 = x 4 x 0 x = x 4 4 L 0(x) = 1 x 0 x 1 = 1 4 L 1(x) = L 1 (x) = x x 0 x 1 x 0 = x 4 1 x 1 x 0 = 1 4 Thus A 0 (x) = [ 1 2 L 0(x x 0 ) ] [ ( L 2 0 = ) ] ( ) 2 x 4 (x 0) 4 4 A 1 (x) = [ 1 2 L 0(x x 1 ) ] [ L 2 1 = ] ( x ) 2 ( (x 4) = 3 x ) ( x ) ( ) 2 ( ) 2 x 4 x 4 ( x ) 2 B 0 (x) = (x 0) = x B 1 (x) = (x 4) And P(x) = (6 x) x 2 16.
13 Taylor Polynomial Interpolation Instead of finding a polynomial P(x) such that P(x) = f (x) at N points (Lagrange) or that both P(x) = f (x) and P (x) = f (x) at N points (Hermite), Taylor polynomial interpolation consists of, for a given value x 0, finding a function P(x) that agrees up to the Nth derivative at x 0. That is: P (i) (x 0 ) = f (i) (x 0 ) for i = 0, 1,..., n and the Taylor polynomial is given by P N (x) = N i=0 f (i) (x 0 ) (x x 0 ) i i! The error is given by E N (x) = (x x 0 ) N+1 f (N+1) (x 0 ) (N + 1)!
14 Taylor Polynomial Interpolation Example Find out how many Taylor expansion terms are required for 13-digit approximation of e = Let y(x) = e x. All the derivatives are y (i) (x) = e x. Thus at x = 0, one has y (i) (x = 0) = 1. Therefore Evaluate at x = 1 P n (x) = P n (1) = n i=0 n i=0 x i i! 1 i! and E n (x) = x n+1 (n + 1)! and E n (1) = 1 (n + 1)! and you will find that you need n = 15 and E 15 =
15 Interpolation with Cubic Splines In some cases the typical polynomial approximation cannot smoothly fit certain sets of data. For instance, consider the function f (x) = 0 1 x x 0.2 < x < x 1.0 We can easily verify that we cannot fit the above data with any polynomial degree! P(x) = 1 26x x 4
16
17 Spline Fitting General Idea: Consider the tabulated function y i = y(x i ) with i = 0,..., N. Split the domain [x 0, x N ] into N intervals [x i, x i+1 ] with i = 0,..., N 1. For each interval construct a cubic polynomial or spline such that neighboring splines have the same slope and curvature at their joining point. That is, the essential idea is to fit a piecewise function of the form s 0 (x) if x 0 x x 1 s 1 (x) if x 1 x x 2 S(x) =. s N 1 (x) if x N 1 x x N where s i (x) = a i (x x i ) 3 + b i (x x i ) 2 + c i (x x i ) + d i s i (x) = 3 a i(x x i ) b i (x x i ) + c i s i (x) = 6 a i (x x i ) + 2 b i
18 Cubic Spline Interpolation Properties S(x) interpolates all data points. That is, S(x i ) = y i. Since x i [x i, x i+1 ], one has that y i = s i (x i ) = a i (x i x i ) 3 + b i (x i x i ) 2 + c i (x i x i ) + d i = d i S(x) is continuous on the interval [x 0, x N ], thus s i (x i ) = s i 1 (x i ) with s i (x i ) = d i s i 1 (x i ) = a i 1 (x i x i 1 ) 3 + b i 1 (x i x i 1 ) 2 + c i 1 (x i x i 1 ) + d i 1 = a i 1 h 3 i 1 + b i 1h 2 i 1 + c i 1h i 1 + d i 1 where h i 1 = x i x i 1. Therefore d i = a i 1 h 3 i 1 + b i 1h 2 i 1 + c i 1h i 1 + d i 1
19 Cubic Spline Interpolation Properties S (x) is continuous on the interval [x 0, x N ], thus s i (x i) = s i 1 (x i) with s i (x i) = c i s i 1 (x i) = 3 a i 1 (x i x i 1 ) b i 1 (x i x i 1 ) + c i 1 = 3 a i 1 h 2 i b i 1h i 1 + c i 1 Therefore c i = 3 a i 1 h 2 i b i 1h i 1 + c i 1
20 Cubic Spline Interpolation Properties S (x) is continuous on the interval [x 0, x N ], thus s i (x i ) = s i 1 (x i) with s i (x i ) = 2 b i s i 1 i) = 6, a i 1 (x i x i 1 ) + 2 b i 1 = 6 a i 1 h i b i 1 Therefore 2 b i = 6 a i 1 h i b i 1
21 In Summary s i (x i ) = s i 1 (x i) b i = 3 a i 1 h i 1 + b i 1 s i (x i) = s i 1 (x i) c i = 3 a i 1 h 2 i b i 1h i 1 + c i 1 s i (x i ) = s i 1 (x i ) d i = a i 1 h 3 i 1 + b i 1h 2 i 1 + c i 1h i 1 + d i 1
22 Let s define M i s i (x i ). Then from s i (x i ) = 2 b i and 2 b i+1 = 6 a i h i + 2 b i, we have that Also, from b i = M i 2, a i = M i+1 M i 6h i s i (x) = a i (x x i ) 3 + b i (x x i ) 2 + c i (x x i ) + d i and s i (x i ) = y i, s i (x i+1 ) = y i+1 and, we have that Therefore y i+1 = M i+1 M i hi 3 + M i 6h i 2 h2 i + c i h i + y i c i = y i+1 y i h i h i 6 (2M i + M i+1 ) and d i = y i
23 Recall the condition that the slopes of the two cubics joining at (x i, y i ) are the same. That is s i (x i) = s i 1 (x i), which yielded c i = 3 a i 1 h 2 i b i 1h i 1 + c i 1 Substitution of a, b, c and d yields: y i+1 y i 2h im i + h i M i+1 h i 6 ( ) Mi M i 1 = 3 hi 1 2 6h i 1 +2 M i 1 2 h i 1 + y i y i 1 2h i 1M i 1 + h i 1 M i h i 1 6 and by simplifying we get: ( yi+1 y i h i 1 M i (h i 1 + h i ) M i + h i M i+1 = 6 h i y ) i y i 1 h i 1
24 If we have n + 1 points, the relationship ( yi+1 y i h i 1 M i (h i 1 + h i ) M i + h i M i+1 = 6 h i y ) i y i 1 h i 1 can be applied to the n 1 internal points. Thus we create a system of n 1 equations for the n + 1 unknown M i. This system can be solved if we specify the values of M 0 and M n.
25 The system of n 1 equations with n + 1 unknown will be written as: = 6... h 0 2(h 0 + h 1 ) h 1 h 1 2(h 1 + h 2 ) h 2 h 2 2(h 2 + h 3 ) h h n 2 2(h n 2 + h n 1 ) h n 1... y 2 y 1 h 1 y 1 y 0 h 0 y 3 y 2 h 2 y 2 y 1 h 1... y n y n 1 h n 1... y n 1 y n 2 h n 2 M 0 M 1 M 2 : M n 2 M n 1 Mn Recall ( yi+1 y i h i 1 M i (h i 1 + h i ) M i + h i M i+1 = 6 h i y ) i y i 1 h i 1
26 From the solution of this linear systems we get the coefficients a i, b i, c i and d i via the relations: a i = M i+1 M i 6h i b i = M i 2 c i = y i+1 y i 2h im i + h i M i+1 h i 6 d i = y i
27 Let s define and Y 6 y 2 y 1 h 1 y 1 y 0 h 0 y 3 y 2 h 2 y 2 y 1 h 1... y n y n 1 h n 1 y n 1 y n 2 h n 2 M M 1 M 2 : M n 2 M n 1
28 Choice I Take, M 0 = 0 and M n = 0. This will lead to the solution of the (n 1) (n 1) linear system: where H H M = Y 2(h 0 + h 1 ) h 1 h 1 2(h 1 + h 2 ) h 2 h 2 2(h 2 + h 3 ) h 3... h n 2 2(h n 2 + h n 1 )
29 Choice II Take, M 0 = M 1 and M n = M n 1. This will lead to the solution of the (n 1) (n 1) linear system: H M = Y where H 3h 0 + 2h 1 h 1 h 1 2(h 1 + h 2 ) h 2 h 2 2(h 2 + h 3 ) h h n 2 2h n 2 + 3h n 1
30 Choice III Use linear extrapolation M 1 M 0 h 0 = M 2 M 1 h 1 M 0 = (h 0 + h 1 )M 1 h 0 M 2 h 1 M n M n 1 h n 1 Then = M n 1 M n 2 h n 2 M n = (h n 2 + h n 1 )M n 1 h n 1 M n 2 h n 2 M (h 0 +h 1 )(h 0 +2h 1 ) h 1 h 2 1 h2 0 h 1 h 1 2(h 1 + h 2 ) h 2 h 2 2(h 2 + h 3 ) h h 2 n 2 h2 n 1 h n 2 (h n 1 +h n 2 )(h n 1 +2h n 2 ) h n 2
31 Choice IV Force the slopes at the end points to assume certain values. If f (x 0 ) = A and f (x n ) = B then ( ) y1 y 0 2h 0 M 0 + h 1 M 1 = 6 A h 0 ( h n 1 M n 1 + 2h n M n = 6 B y ) n y n 1 h n 1 Then H 2h 0 h 1 h 0 2(h 0 + h 1 ) h 1 h 1 2(h 1 + h 2 ) h 2... h n 2 2h n 1
32 Interpolation with Cubic Splines : Example Fit a cubic spline in the data (y = x 3 8): x y Condition I : M 0 = 0, M 4 = M M 2 = M Condition II : M 0 = M 1, M 4 = M 3 s M 1 M 2 = s M M 1 = M 2 = M 3 = M 1 = M 0 = 4.8 M 2 = 1.2 M 3 = 19.2 = M 4
33 Condition III : M 1 M 2 M 3 = M 0 = 0 M 1 = 6 M 2 = 12 M 3 = 18 M 4 = 24 Condition IV : M 0 M 1 M 2 M 3 M 4 = M 0 = 0 M 1 = 6 M 2 = 12 M 3 = 18 M 4 = 24
34 Tri-diagonal Matrix The system of equations in the cubic spline fitting method has the following form: b 1 c a 2 b 2 c a 3 b b N 2 c N a N 1 b N 1 c N a N b N x 1 x 2 x 3... x N 2 x N 1 x N = d 1 d 2 d 3... d N 2 d N 1 d N The matrix has the so-called tri-diagonal form. That is, each equations has the form a i x i 1 + b i x i + c i x i+1 = d i
35 Method to Solve a Tri-diagonal System Redefine and c i = d i = c i b i i = 1 c i b i c i 1 a i i = 2, 3,..., n 1 d i b i i = 1 d i d i 1 a i b i c i 1 a i i = 2, 3,..., n
36 With these new coefficients the systems takes the form 1 c c c N c N x 1 x 2 x 3... x N 2 x N 1 x N The systems can be solved using back substitution = d 1 d 2 d 3... d N 2 d N 1 d N x n = d n i = n x i = d i c i x i+1 i = n 1, n 2, n 3,..., 1
37 Chi-Square Fitting Consider a set of N data points {x i, y i } i=0,...,n 1 with standard deviations σ i. The objective is to find a model function f (x; β) with β = {β 0,..., β M } a set of M adjustable parameters. Such that ( N 1 χ 2 y i f (x i ; β) ) 2 σ i i=0 is a minumum. Notice that r i y i f (x i ; β) are the residuals.
38 Fitting Data to a Straight Line Consider the case f (x; β) = a + b x. Therefore N 1 ( χ 2 yi a b x i i=0 σ i ) 2 To minimize χ 2 with respect to a and b, we need to solve 0 = χ2 N 1 a = 2 i=0 0 = χ2 N 1 b = 2 i=0 y i a b x i σ 2 i x i (y i a b x i ) σ 2 i
39 Define Then S N 1 i=0 1 σ 2 i S xx N 1 i=0 S x x 2 i σ 2 i N 1 i=0 x i σ 2 i S xy N 1 i=0 S y x i y i σ 2 i N 1 i=0 y i σ 2 i a S + b S x = S y a S x = b S xx = S xy Finally S S xx S 2 x a = S xx S y S x S xy b = S S xy S x S y
40 Propagation of errors with Thus N 1 σf 2 =a,b = i=0 σ 2 i ( f y i ) 2 a y i = S xx S x x i σ 2 i b y i = S x i S x σ 2 i σ 2 a = S xx / σ 2 b = S/
41 Variance, Covariance and Correlation Consider the case in which σ i = 1. Then S N 1 i=0 1 σ 2 i = N S x N 1 i=0 x i σ 2 i = N x S y N 1 i=0 y i σ 2 i = N y S xx N 1 i=0 x 2 i σ 2 i = N x 2 S xy where the over line denotes average. Thus N 1 i=0 x i y i σ 2 i = N x y S S xx S 2 x = N 2 x 2 N 2 x 2 = N 2 (x 2 x 2 ) a = S xx S y S x S xy b = S S xy S x S y = x 2 y x xy x 2 x 2 = xy x y x 2 x 2
42 Notice where a = x 2 y x xy x 2 x 2 = y x b = xy x y x 2 x 2 ( xy x y x 2 x 2 = x 2 y x 2 y + x 2 y x xy x 2 x ) 2 = y x b Var[x] = x 2 x 2 Variance Cov[x,y] = xy x y Covariance
43 Finally, from y = a + b x with a = y x b b = xy x y x 2 x 2 we have that y y = (x x) y y y 2 y 2 = ( ) xy x y x 2 x 2 x x x r 2 x 2 xy where r xy = xy x y x 2 x 2 y 2 y 2 Correlation
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(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 informationLecture 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 informationLECTURE 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 informationInterpolation 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 informationScientific 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 informationInterpolation 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 informationEmpirical 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 informationInterpolation 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 informationA first order divided difference
A first order divided difference For a given function f (x) and two distinct points x 0 and x 1, define f [x 0, x 1 ] = f (x 1) f (x 0 ) x 1 x 0 This is called the first order divided difference of f (x).
More informationIn 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 informationChapter 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 informationExam 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 informationLecture 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 informationCHAPTER 4. Interpolation
CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given
More information3.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 informationInput: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?
Applied Numerical Analysis Interpolation Lecturer: Emad Fatemizadeh Interpolation Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. 0 1 4 1-3 3 9 What for x = 1.? Interpolation
More informationCubic 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 informationData 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 informationPreliminaries Lectures. Dr. Abdulla Eid. Department of Mathematics MATHS 101: Calculus I
Preliminaries 2 1 2 Lectures Department of Mathematics http://www.abdullaeid.net/maths101 MATHS 101: Calculus I (University of Bahrain) Prelim 1 / 35 Pre Calculus MATHS 101: Calculus MATHS 101 is all about
More informationLecture 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 informationHermite Interpolation
Jim Lambers MAT 77 Fall Semester 010-11 Lecture Notes These notes correspond to Sections 4 and 5 in the text Hermite Interpolation Suppose that the interpolation points are perturbed so that two neighboring
More informationInterpolation 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 information1 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 informationChapter 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 informationMath 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 informationCurve 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 informationChapter 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 informationNumerical Methods. King Saud University
Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation
More informationMTH5112 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 informationIntroduction 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 informationInterpolation. 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 informationCubic 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 informationChapter 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 informationNUMERICAL 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 informationJim 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 informationWe 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 informationStatistics, Data Analysis, and Simulation SS 2015
Statistics, Data Analysis, and Simulation SS 2015 08.128.730 Statistik, Datenanalyse und Simulation Dr. Michael O. Distler Mainz, 27. April 2015 Dr. Michael O. Distler
More informationNumerical Methods of Approximation
Contents 31 Numerical Methods of Approximation 31.1 Polynomial Approximations 2 31.2 Numerical Integration 28 31.3 Numerical Differentiation 58 31.4 Nonlinear Equations 67 Learning outcomes In this Workbook
More informationLectures 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 information7.4: Integration of rational functions
A rational function is a function of the form: f (x) = P(x) Q(x), where P(x) and Q(x) are polynomials in x. P(x) = a n x n + a n 1 x n 1 + + a 0. Q(x) = b m x m + b m 1 x m 1 + + b 0. How to express a
More informationMATH 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 informationBivariate distributions
Bivariate distributions 3 th October 017 lecture based on Hogg Tanis Zimmerman: Probability and Statistical Inference (9th ed.) Bivariate Distributions of the Discrete Type The Correlation Coefficient
More information1 Roots of polynomials
CS348a: Computer Graphics Handout #18 Geometric Modeling Original Handout #13 Stanford University Tuesday, 9 November 1993 Original Lecture #5: 14th October 1993 Topics: Polynomials Scribe: Mark P Kust
More informationMA1023-Methods of Mathematics-15S2 Tutorial 1
Tutorial 1 the week starting from 19/09/2016. Q1. Consider the function = 1. Write down the nth degree Taylor Polynomial near > 0. 2. Show that the remainder satisfies, < if > > 0 if > > 0 3. Show that
More informationMath 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 informationINTERPOLATION. 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 informationRegression and correlation. Correlation & Regression, I. Regression & correlation. Regression vs. correlation. Involve bivariate, paired data, X & Y
Regression and correlation Correlation & Regression, I 9.07 4/1/004 Involve bivariate, paired data, X & Y Height & weight measured for the same individual IQ & exam scores for each individual Height of
More informationMAT137 Calculus! Lecture 48
official website http://uoft.me/mat137 MAT137 Calculus! Lecture 48 Today: Taylor Series Applications Next: Final Exams Important Taylor Series and their Radii of Convergence 1 1 x = e x = n=0 n=0 x n n!
More informationIntroduction 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 informationOutline. 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 informationSome 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 information1.2. Indices. Introduction. Prerequisites. Learning Outcomes
Indices 1.2 Introduction Indices, or powers, provide a convenient notation when we need to multiply a number by itself several times. In this Section we explain how indices are written, and state the rules
More informationCALCULUS JIA-MING (FRANK) LIOU
CALCULUS JIA-MING (FRANK) LIOU Abstract. Contents. Power Series.. Polynomials and Formal Power Series.2. Radius of Convergence 2.3. Derivative and Antiderivative of Power Series 4.4. Power Series Expansion
More informationLecture 3: Linear Models. Bruce Walsh lecture notes Uppsala EQG course version 28 Jan 2012
Lecture 3: Linear Models Bruce Walsh lecture notes Uppsala EQG course version 28 Jan 2012 1 Quick Review of the Major Points The general linear model can be written as y = X! + e y = vector of observed
More informationMA2501 Numerical Methods Spring 2015
Norwegian University of Science and Technology Department of Mathematics MA5 Numerical Methods Spring 5 Solutions to exercise set 9 Find approximate values of the following integrals using the adaptive
More informationRoot 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 informationPolynomial 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 informationKing Fahd University of Petroleum and Minerals Prep-Year Math Program Math Term 161 Recitation (R1, R2)
Math 001 - Term 161 Recitation (R1, R) Question 1: How many rational and irrational numbers are possible between 0 and 1? (a) 1 (b) Finite (c) 0 (d) Infinite (e) Question : A will contain how many elements
More informationApproximation theory
Approximation theory Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 1 1.3 6 8.8 2 3.5 7 10.1 Least 3squares 4.2
More informationNumerical Methods in Physics and Astrophysics
Kostas Kokkotas 2 October 17, 2017 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation
More information1 Review of Interpolation using Cubic Splines
cs412: introduction to numerical analysis 10/10/06 Lecture 12: Instructor: Professor Amos Ron Cubic Hermite Spline Interpolation Scribes: Yunpeng Li, Mark Cowlishaw 1 Review of Interpolation using Cubic
More informationNumerical Methods I: Polynomial Interpolation
1/31 Numerical Methods I: Polynomial Interpolation Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 16, 2017 lassical polynomial interpolation Given f i := f(t i ), i =0,...,n, we would
More informationx 9 or x > 10 Name: Class: Date: 1 How many natural numbers are between 1.5 and 4.5 on the number line?
1 How many natural numbers are between 1.5 and 4.5 on the number line? 2 How many composite numbers are between 7 and 13 on the number line? 3 How many prime numbers are between 7 and 20 on the number
More informationInterpolation. 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 informationAlgebra 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 informationCubic 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 information1 Lecture 8: Interpolating polynomials.
1 Lecture 8: Interpolating polynomials. 1.1 Horner s method Before turning to the main idea of this part of the course, we consider how to evaluate a polynomial. Recall that a polynomial is an expression
More informationLECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel
LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count
More informationLinear maps. Matthew Macauley. Department of Mathematical Sciences Clemson University Math 8530, Spring 2017
Linear maps Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 8530, Spring 2017 M. Macauley (Clemson) Linear maps Math 8530, Spring 2017
More informationPUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes
PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES Notes. x n+ = ax n has the general solution x n = x a n. 2. x n+ = x n + b has the general solution x n = x + (n )b. 3. x n+ = ax n + b (with a ) can be
More informationRegression: Lecture 2
Regression: Lecture 2 Niels Richard Hansen April 26, 2012 Contents 1 Linear regression and least squares estimation 1 1.1 Distributional results................................ 3 2 Non-linear effects and
More informationInterpolation. P. Sam Johnson. January 30, P. Sam Johnson (NITK) Interpolation January 30, / 75
Interpolation P. Sam Johnson January 30, 2015 P. Sam Johnson (NITK) Interpolation January 30, 2015 1 / 75 Overview One of the basic ideas in Mathematics is that of a function and most useful tool of numerical
More informationApplied 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 informationInterpolation and Approximation
Interpolation and Approximation The Basic Problem: Approximate a continuous function f(x), by a polynomial p(x), over [a, b]. f(x) may only be known in tabular form. f(x) may be expensive to compute. Definition:
More informationSpline Methods Draft. Tom Lyche and Knut Mørken
Spline Methods Draft Tom Lyche and Knut Mørken 25th April 2003 2 Contents 1 Splines and B-splines an Introduction 3 1.1 Convex combinations and convex hulls..................... 3 1.1.1 Stable computations...........................
More informationNumerical Methods in Physics and Astrophysics
Kostas Kokkotas 2 October 20, 2014 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation
More informationSignal Processing - Lecture 7
1 Introduction Signal Processing - Lecture 7 Fitting a function to a set of data gathered in time sequence can be viewed as signal processing or learning, and is an important topic in information theory.
More informationScientific 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 informationLecture 28 The Main Sources of Error
Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations
More information1.2. Indices. Introduction. Prerequisites. Learning Outcomes
Indices.2 Introduction Indices, or powers, provide a convenient notation when we need to multiply a number by itself several times. In this section we explain how indices are written, and state the rules
More informationOf course, we discussed this topic in Math So this partially a review. Apolynomialofdegreed in two variable x and y is defined by. α ij x i y j.
Math 5620 Spring 2019 Notes of 4/5/19 Polynomials in Two Variables Of course, we discussed this topic in Math 5610. So this partially a review. Apolynomialofdegreed in two variable x and y is defined by
More informationNonparametric Regression. Badr Missaoui
Badr Missaoui Outline Kernel and local polynomial regression. Penalized regression. We are given n pairs of observations (X 1, Y 1 ),...,(X n, Y n ) where Y i = r(x i ) + ε i, i = 1,..., n and r(x) = E(Y
More informationSimplifying Rational Expressions and Functions
Department of Mathematics Grossmont College October 15, 2012 Recall: The Number Types Definition The set of whole numbers, ={0, 1, 2, 3, 4,...} is the set of natural numbers unioned with zero, written
More informationRegression and Covariance
Regression and Covariance James K. Peterson Department of Biological ciences and Department of Mathematical ciences Clemson University April 16, 2014 Outline A Review of Regression Regression and Covariance
More informationReview. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn
Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations
More informationCurve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines
Curve Fitting Why do we want to curve fit? In general, we fit data points to produce a smooth representation of the system whose response generated the data points We do this for a variety of reasons 1
More informationRegression and Nonlinear Axes
Introduction to Chemical Engineering Calculations Lecture 2. What is regression analysis? A technique for modeling and analyzing the relationship between 2 or more variables. Usually, 1 variable is designated
More informationStatistics. Lent Term 2015 Prof. Mark Thomson. 2: The Gaussian Limit
Statistics Lent Term 2015 Prof. Mark Thomson Lecture 2 : The Gaussian Limit Prof. M.A. Thomson Lent Term 2015 29 Lecture Lecture Lecture Lecture 1: Back to basics Introduction, Probability distribution
More informationMAT137 Calculus! Lecture 45
official website http://uoft.me/mat137 MAT137 Calculus! Lecture 45 Today: Taylor Polynomials Taylor Series Next: Taylor Series Power Series Definition (Power Series) A power series is a series of the form
More informationMath123 Lecture 1. Dr. Robert C. Busby. Lecturer: Office: Korman 266 Phone :
Lecturer: Math1 Lecture 1 Dr. Robert C. Busby Office: Korman 66 Phone : 15-895-1957 Email: rbusby@mcs.drexel.edu Course Web Site: http://www.mcs.drexel.edu/classes/calculus/math1_spring0/ (Links are case
More informationInterpolation & Polynomial Approximation. Hermite Interpolation I
Interpolation & Polynomial Approximation Hermite Interpolation I Numerical Analysis (th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011
More informationCurve Fitting and Approximation
Department of Physics Cotton College State University, Panbazar Guwahati 781001, Assam December 6, 2016 Outline Curve Fitting 1 Curve Fitting Outline Curve Fitting 1 Curve Fitting Topics in the Syllabus
More informationSummer School in Statistics for Astronomers V June 1 - June 6, Regression. Mosuk Chow Statistics Department Penn State University.
Summer School in Statistics for Astronomers V June 1 - June 6, 2009 Regression Mosuk Chow Statistics Department Penn State University. Adapted from notes prepared by RL Karandikar Mean and variance Recall
More informationStatistical Methods in Particle Physics
Statistical Methods in Particle Physics Lecture 3 October 29, 2012 Silvia Masciocchi, GSI Darmstadt s.masciocchi@gsi.de Winter Semester 2012 / 13 Outline Reminder: Probability density function Cumulative
More informationFinal Review Accelerated Advanced Algebra
Name: ate: 1. What are the factors of z + z 2 + 25z + 25? 5. Factor completely: (7x + 2) 2 6 (z + 1)(z + 5)(z 5) (z 1)(z + 5i) 2 (49x + 1)(x 8) (7x 4)(7x + 8) (7x + 4)(7x 8) (7x + 4)(x 9) (z 1)(z + 5i)(z
More information(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by
1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How
More informationSolutions to Exercises, Section 2.4
Instructor s Solutions Manual, Section 2.4 Exercise 1 Solutions to Exercises, Section 2.4 Suppose p(x) = x 2 + 5x + 2, q(x) = 2x 3 3x + 1, s(x) = 4x 3 2. In Exercises 1 18, write the indicated expression
More informationx 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 informationPreliminary 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