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

Size: px
Start display at page:

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

Transcription

1 MATH 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 (a) Plot population versus years after 1900 using Matlab by entering the years after 1900 into a vector x and the populations into a vector y and giving the command plot(x,y, o ). Find the fifth degree polynomial that passes through each data point and determine its value in the year Plot this polynomial on the same graph as the population data (but with the x-axis now extending from 0 through 120). Do you think that this is a reasonable way to estimate the population of the US in future years? (To see a demonstration of other methods of extrapolation, type census in Matlab.) Turn in your plot and the value that you estimated for the population in the year 2020 along with your explanation as to why this is or is not a good way to estimate the population. Solution. There are lots of ways to determine this fifth degree polynomial. Here is one based on the Vandermonde matrix: x = 0:20:100; y = [76; 105.7; 131.7; 179.3; 226.5; 281.4]; plot(x, y, 'o'); coeffs = vander(x)\y; yrs = 0:120; hold on; plot(yrs, polyval(coeffs, yrs)); The above code generates the following plot: 1

2 Using this polynomial, together with polyval we see that the extrapolated population in the year 2020 is 459.6, more than double the population in This seems unreasonable, as using this model, the population would be doubling too fast. That is, instead of doubling roughly every 60 years as indicated by the measurements, the population would more than double in less than 40 years, and then more than double over the next 20 years (the extrapolated value for the year 2040 would be million). (b) Write down the Lagrange form of the second-degree polynomial that interpolates the population in the years 1900, 1920, and Solution. The Lagrange form of the interpolating polynomial is (x 20)(x 40) (x 0)(x 40) (x 0)(x 20) p(x) = (0 20)(0 40) (20 0)(20 40) (40 0)(40 20) = (x 20)(x 40) x(x 40) + x(x 20) Gathering like terms, we have p(x) = x x + 76 (c) Determine the coefficients of the Newton form of the interpolants of degrees 0, 1, and 2, that interpolate the first one, two, and three data points, respectively. Verify that the second-degree polynomial that you construct here is identical to that in part (b). Solution. The Newton forms of the interpolants are p 0 (x) = f[0] p 1 (x) = f[0] + f[0, 20](x 0) p 2 (x) = f[0] + f[0, 20](x 0) + f[0, 20, 40](x 0)(x 20) 2

3 where the coefficients are the divided differences f[0], f[0, 20], and f[0, 20, 40]. We can compute the divided differences using the following table: f[0] = 76 f[20] = f[0, 20] = f[20] f[0] = f[40] = f[20, 40] = f[40] f[20] = 26 f[0, 20, 40] = f[20,40] f[0,20] = So, the Newton form of the interpolating polynomial is p 2 (x) = x 3.7 x(x 20). 800 Combining like terms we have p 2 (x) = x x2 which is exactly the polynomial we found in part (b). 8.2 The secant method for finding a root of a function f(x) fits a first-degree polynomial (i.e. a straight line) through the points (x k 1, f(x k 1 )) and (x k, f(x k )) and takes the root of this polynomial as the next approximation x k+1. Another rootfinding algorithm, called Muller s method, fits a quadratic through the three points, (x k 2, f(x k 2 )), (x k 1, f(x k 1 )), and (x k, f(x k )), and takes the root of this quadratic that is closest to x k as the next approximation x k+1. Write down a formula for this quadratic. Suppose f(x) = x 3 2, x 0 = 0, x 1 = 1, and x 2 = 2. Find x 3. Solution. A formula for this quadratic can be given in Lagrange form: (t x k 1 )(t x k ) p(t) = f(x k 2 ) (x k 2 x k 1 )(x k 2 x k ) (t x k 2 )(t x k ) + f(x k 1 ) (x k 1 x k 2 )(x k 1 x k ) + f(x k ) (t x k 2)(t x k 1 ) (x k x k 2 )(x k x k 1 ). Supposing that f(x) = x 3 2, we have three points (0, 2), (1, 1), (2, 6) and so 2 p(t) = (t 1)(t 2) (0 1)(0 2) 1 + (t 0)(t 2) (1 0)(1 2) 6 + (t 0)(t 1) (2 0)(2 1) = 1(t 2 3t + 2) + (t 2 2t) + 3(t 2 t) = 3t 2 2t 2. The roots of p(t) and therefore the candidate values for x 3 are x 3 = 2 ± = 1 ± 7. 3

4 Muller s method chooses the root nearest to the previous iterate as the next iterate. In this case, then, x 3 = Write down a divided-difference table and the Newton form of the interpolating polynomial for the following set of data. x 1 3/2 0 2 f(x) Show how this polynomial can be evaluated at a given point x by using four steps of a Horner s rule-like method. Solution. The divided-difference table for the above set of data looks like this: = 8 3/ = = 4 0 3/ = = = /2 2 1 The Newton form of the interpolating polynomial is therefore. p(x) = 2 + 8(x 1) + 4(x 1)(x 3/2) + 2(x 1)(x 3/2)(x 0). The Horner s rule-like method takes the following form here: y = 2 y = y(x 0) + 4 y = y(x 3/2) + 8 y = y(x 1) Determine the piecewise polynomial function { P 1 (x) if 0 x < 1, P (x) = P 2 (x) if 1 x 2, that is defined by the conditions P 1 (x) is linear. P 2 (x) is quadratic. P (x) and P (x) are continuous at x = 1. P (0) = 1, P (1) = 1, and P (2) = 0. Plot this function. Solution. As P 1 (x) is to be linear, then P 1 (x) = a 0 + a 1 x. In order to enforce that P (0) = 1, a 0 = 1 must be the case. Also, so that P (1) = 1, a = 1 must be the case, and so a 1 = 2. As P 2 (x) is to be quadratic, then P 2 (x) = b 0 + b 1 x + b 2 x 2. P (2) = 0 forces b 0 + 2b 1 + 4b 2 = 0. Also, P (1) = 1 means that b 0 + b 1 + b 2 = 1. P (x) being continuous at x = 1 means that b 1 + 2b 2 = 2. 4

5 These conditions result in the following linear system: b 0 b 1 = Solving this linear system gives b 0 = 4, b 1 = 8 and b 2 = 3. Thus, { 1 2x if 0 x < 1, P (x) = 4 8x + 3x 2 if 1 x 2, The following Matlab code generates the plot: b 2 f (x < 1).*(1-2*x)+(x>=1).*(4-8*x+3*x.ˆ2); x = 0:0.01:2; plot(x, f(x), 'LineWidth', 2); 8.10 Let f be a given function satisfying f(0) = 1, f(1) = 2, and f(2) = 0. A quadratic spline interpolant r(x) is defined as a piecewise quadratic that interpolates f at the nodes (x 0 = 0, x 1 = 1, and x 2 = 2) and whose first derivative is continuous throughout the interval. Find the quadratic spline interpolant of f that also satisfies r (0) = 0. [Hint: Start from the left subinterval.] Solution. r(x) is made up of quadratics on subintervals. Here, r 1 (x) = a 0 + a 1 x + a 2 x 2 must satisfy Clearly, then, r 1 (x) = 1 + x 2. a 0 = r 1 (0) = 1 a 1 = r 1(0) = 0 a 0 + a 1 + a 2 = r 1 (1) = 2 5

6 On [1, 2], r(x) = r 2 (x) = b 0 + b 1 x + b 2 x 2. In order for r(x) to be a differentiable interpolant, r 2 must satisfy the following b 0 + b 1 + b 2 = r 2 (1) = 2 b 0 + 2b 1 + 4b 2 = r 2 (2) = 0 b 1 + 2b 2 = r 2(1) = r 1(1) = 2 Solving this linear system gives r 2 (x) = x 4x 2. The quadratic spline interpolant r(x) then, is { 1 + x 2 if 0 x < 1, r(x) = x 4x 2 if 1 x Show that the following function is a natural cubic spline through the points (0, 1), (1, 1), (2, 0), and (3, 10): 1 + x x 3 if 0 x < 1, s(x) = 1 2(x 1) 3(x 1) 2 + 4(x 1) 3 if 1 x < 2, 4(x 2) + 9(x 2) 2 3(x 2) 3 if 2 x 3. Solution. Let s consider s 1 (x) = 1 + x x 3 s 2 (x) = 1 2(x 1) 3(x 1) 2 + 4(x 1) 3 s 3 (x) = 4(x 2) + 9(x 2) 2 3(x 2) 3. In order for s to be a natural cubic spline for these points, all of the following must hold: s 1 (0) = 1, s 1 (1) = 1. Note that s 1 (0) = 1 and s 1 (1) = = 1. s 2 (1) = 1, s 2 (2) = 0. Here, s 2 (1) = 1 and s 2 (2) = = 0. s 3 (2) = 0, s 3 (3) = 10. Now s 3 (2) = 0 and s 3 (3) = = 10. s 1(1) = s 2(1). Here, s 1(x) = 1 3x 2 so s 1(1) = 1 3 = 2. Also, s 2(x) = 2 6(x 1) + 12(x 1) 2 and so s 2(1) = 2. s 2(2) = s 3(2). With s 2(x) as above, s 2(2) = = 4. Also, s 3(x) = 4+18(x 2) 9(x 2) 2 and so s 3(2) = 4. s 1(1) = s 2(1). s 1(x) = 6x so s 1(x) = 6. Also, s 2(x) = (x 1) and so s 2(1) = 6 as desired. s 2(2) = s 3(2). With s 2(x) as above, s 2(2) = = 18. Also, s 3(x) = 18 18(x 2) so s 3(2) = 18. 6

7 s 1(0) = 0. s 1(0) = 0 is clear. s 3(3) = 0. s 3(3) = = 0. Therefore s(x) is a natural cubic spline. (2) A secret formula for eternal youth, f(x), was discovered by Dr. Quick, who has been working in our biotech company. However, Dr. Quick has disappeared and is rumored to be negotiating with a rival organization. From the notes that Dr. Quick left behind in his hasty exit it is clear that f(0) = 0, f(1) = 2, and that f[x 0, x 1, x 2 ] = 1 for any three points x 0, x 1, x 2. Find f(x). Solution. Consider a divided difference table for the points 0, 1, x: x f(x) f(x) 2 x 1 f(x) 2 x 1 2 x 0 The last entry in the lower right hand corner is f[0, 1, x] and by hypothesis, this is 1, so f(x) 2 x 1 After some algebra, f(x) = x 2 + x. 2 = x. (3) Suppose we want to approximate the function e x on the interval [0, 1] by using polynomial interpolation with x 0 = 0, x 1 = 1/2, and x 2 = 1. Let p 2 (x) denote the interpolating polynomial. (a) Find an upper bound for the error magnitude max 0 x 1 ex p 2 (x). Solution. Recall that the error can be bounded by max 0 x 1 ex p 2 (x) 1 3! max f (3) (t) max (s 0)(s 1/2)(s 1) = e 0 t 1 0 s 1 6 α where α is the maximal value assumed by r(s) = s(s 0.5)(s 1) on the interval [0, 1]. It is not hard to establish that r(s) assumes its maximal absolute value at both 1 ± and that α = An upper bound for the error then is max 0 x 1 ex p 2 (x) e (b) Find the interpolating polynomial using your favorite technique. Solution. Using divided differences, we obtain f[0] = 1, f[0, 1/2] = 2(e 1 2 1), and f[0, 1/2, 1] = 2(e 1 2 1) 2 and a Newton form of the polynomial, then is p 2 (x) = 1 + 2e 1/2 x + (e 2e 1/2 )x(x 1/2) (c) Plot the function e x and the interpolant you found, both on the same figure, using the commands plot. 7

8 Solution. The following Matlab code produces the plot: p 1+2*(exp(0.5)-1).*x+2*(exp(0.5)-1).ˆ2.*x.*(x-0.5); f exp(x); x = 0:0.01:1; figure; plot(x, f(x)); hold on; plot(x, p(x), 'r.'); And the resulting plot is as follows: (d) Plot the error magnitude e x p 2 (x) on the interval using logarithmic scale (the command semilogy) and verify by inspection that it is below the bound you found in part (a). Solution. The following Matlab code produces the plot: p 1+2*(exp(0.5)-1).*x+2*(exp(0.5)-1).ˆ2.*x.*(x-0.5); f exp(x); x = 0:0.01:1; semilogy(x, abs(p(x)-f(x))); % Plot a dashed line at the upper bound bnd = exp(1)./(36*sqrt(12)); 8

9 hold on semilogy(x, bnd*ones(size(x)), 'k--'); And the resulting plot is as follows: 9

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

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

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

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

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

1 Review of Interpolation using Cubic Splines

1 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 information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

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

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

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

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

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

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

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

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

1 Lecture 8: Interpolating polynomials.

1 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 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

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

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

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

(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

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review Name: Class: Date: Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review 1 Write 3x 2 ( 2x 2 5x 3 ) in standard form State whether the function is even, odd, or neither Show your work

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

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

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error In this method we assume initial value of x, and substitute in the equation. Then modify x and continue till we

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

CHAPTER 2 POLYNOMIALS KEY POINTS

CHAPTER 2 POLYNOMIALS KEY POINTS CHAPTER POLYNOMIALS KEY POINTS 1. Polynomials of degrees 1, and 3 are called linear, quadratic and cubic polynomials respectively.. A quadratic polynomial in x with real coefficient is of the form a x

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

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

Numerical Methods. King Saud University

Numerical 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 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

Numerical techniques to solve equations

Numerical techniques to solve equations Programming for Applications in Geomatics, Physical Geography and Ecosystem Science (NGEN13) Numerical techniques to solve equations vaughan.phillips@nateko.lu.se Vaughan Phillips Associate Professor,

More information

CS412: Introduction to Numerical Methods

CS412: Introduction to Numerical Methods CS412: Introduction to Numerical Methods MIDTERM #1 2:30PM - 3:45PM, Tuesday, 03/10/2015 Instructions: This exam is a closed book and closed notes exam, i.e., you are not allowed to consult any textbook,

More information

Interpolation and the Lagrange Polynomial

Interpolation and the Lagrange Polynomial Interpolation and the Lagrange Polynomial MATH 375 J. Robert Buchanan Department of Mathematics Fall 2013 Introduction We often choose polynomials to approximate other classes of functions. Theorem (Weierstrass

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

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Review. 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 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

Interpolation and Approximation

Interpolation 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 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

Numerical Methods of Approximation

Numerical 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 information

MA2501 Numerical Methods Spring 2015

MA2501 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 information

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

Input: 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 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

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

Function approximation

Function approximation Week 9: Monday, Mar 26 Function approximation A common task in scientific computing is to approximate a function. The approximated function might be available only through tabulated data, or it may be

More information

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University Lagrange Interpolation and Neville s Algorithm Ron Goldman Department of Computer Science Rice University Tension between Mathematics and Engineering 1. How do Mathematicians actually represent curves

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

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019,

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

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

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

CHAPTER 4. Interpolation

CHAPTER 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 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

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

INTERNET MAT 117 Review Problems. (1) Let us consider the circle with equation. (b) Find the center and the radius of the circle given above.

INTERNET MAT 117 Review Problems. (1) Let us consider the circle with equation. (b) Find the center and the radius of the circle given above. INTERNET MAT 117 Review Problems (1) Let us consider the circle with equation x 2 + y 2 + 2x + 3y + 3 4 = 0. (a) Find the standard form of the equation of the circle given above. (b) Find the center and

More information

Math 365 Homework 5 Due April 6, 2018 Grady Wright

Math 365 Homework 5 Due April 6, 2018 Grady Wright Math 365 Homework 5 Due April 6, 018 Grady Wright 1. (Polynomial interpolation, 10pts) Consider the following three samples of some function f(x): x f(x) -1/ -1 1 1 1/ (a) Determine the unique second degree

More information

Pre-Calculus Summer Math Packet 2018 Multiple Choice

Pre-Calculus Summer Math Packet 2018 Multiple Choice Pre-Calculus Summer Math Packet 208 Multiple Choice Page A Complete all work on separate loose-leaf or graph paper. Solve problems without using a calculator. Write the answers to multiple choice questions

More information

Honors Algebra 2. a.) c.) d.) i and iv only. 3.) How many real roots must the following equation have? a.) 1 b.) 2 c.) 4 d.) none. a.) b.) c.) d.

Honors Algebra 2. a.) c.) d.) i and iv only. 3.) How many real roots must the following equation have? a.) 1 b.) 2 c.) 4 d.) none. a.) b.) c.) d. Honors Algebra 2 The Polynomial Review Name: Date: Period: 1.) What is the remainder when p(x) = x 6 2x 3 + x 1 is divided by (x + 1)? 3 1 1 3 2.) If p(x) = x 3 2x 2 + 9x 2, which of the following statement(s)

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

Chapter 7 Polynomial Functions. Factoring Review. We will talk about 3 Types: ALWAYS FACTOR OUT FIRST! Ex 2: Factor x x + 64

Chapter 7 Polynomial Functions. Factoring Review. We will talk about 3 Types: ALWAYS FACTOR OUT FIRST! Ex 2: Factor x x + 64 Chapter 7 Polynomial Functions Factoring Review We will talk about 3 Types: 1. 2. 3. ALWAYS FACTOR OUT FIRST! Ex 1: Factor x 2 + 5x + 6 Ex 2: Factor x 2 + 16x + 64 Ex 3: Factor 4x 2 + 6x 18 Ex 4: Factor

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

Cubic Spline. s(x) = s j (x) = a j + b j (x x j ) + c j (x x j ) 2 + d j (x x j ) 3, j = 0,... n 1 (1)

Cubic Spline. s(x) = s j (x) = a j + b j (x x j ) + c j (x x j ) 2 + d j (x x j ) 3, j = 0,... n 1 (1) Cubic Spline Suppose we are given a set of interpolating points (x i, y i ) for i = 0, 1, 2, n We seek to construct a piecewise cubic function s(x) that has the for x [[x j, x j+1 ] we have: s(x) = s j

More information

To get horizontal and slant asymptotes algebraically we need to know about end behaviour for rational functions.

To get horizontal and slant asymptotes algebraically we need to know about end behaviour for rational functions. Concepts: Horizontal Asymptotes, Vertical Asymptotes, Slant (Oblique) Asymptotes, Transforming Reciprocal Function, Sketching Rational Functions, Solving Inequalities using Sign Charts. Rational Function

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

Math 1310 Section 4.1: Polynomial Functions and Their Graphs. A polynomial function is a function of the form ...

Math 1310 Section 4.1: Polynomial Functions and Their Graphs. A polynomial function is a function of the form ... Math 1310 Section 4.1: Polynomial Functions and Their Graphs A polynomial function is a function of the form... where 0,,,, are real numbers and n is a whole number. The degree of the polynomial function

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

Section 3.1: Characteristics of Polynomial Functions

Section 3.1: Characteristics of Polynomial Functions Chapter 3: Polynomial Functions Section 3.1: Characteristics of Polynomial Functions pg 107 Polynomial Function: a function of the form f(x) = a n x n + a n 1 x n 1 +a n 2 x n 2 +...+a 2 x 2 +a 1 x+a 0

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

CHAPTER Order points and then develop a divided difference table:

CHAPTER Order points and then develop a divided difference table: 1 CHAPTER 17 17.1 Order points and then develop a divided difference table: x y First Second Third Fourth Fifth Sixth 5 5.75 -.45 0.75 -.E-17 1.51788E-18 7.54895E-19 -.5719E-19 1.8 16.415 -.075 0.75-1.7E-17

More information

Additional exercises with Numerieke Analyse

Additional exercises with Numerieke Analyse Additional exercises with Numerieke Analyse March 10, 017 1. (a) Given different points x 0, x 1, x [a, b] and scalars y 0, y 1, y, z 1, show that there exists at most one polynomial p P 3 with p(x i )

More information

Quick-and-Easy Factoring. of lower degree; several processes are available to fi nd factors.

Quick-and-Easy Factoring. of lower degree; several processes are available to fi nd factors. Lesson 11-3 Quick-and-Easy Factoring BIG IDEA Some polynomials can be factored into polynomials of lower degree; several processes are available to fi nd factors. Vocabulary factoring a polynomial factored

More information

AB.Q103.NOTES: Chapter 2.4, 3.1, 3.2 LESSON 1. Discovering the derivative at x = a: Slopes of secants and tangents to a curve

AB.Q103.NOTES: Chapter 2.4, 3.1, 3.2 LESSON 1. Discovering the derivative at x = a: Slopes of secants and tangents to a curve AB.Q103.NOTES: Chapter 2.4, 3.1, 3.2 LESSON 1 Discovering the derivative at x = a: Slopes of secants and tangents to a curve 1 1. Instantaneous rate of change versus average rate of change Equation of

More information

Solutions to Exercises, Section 2.5

Solutions to Exercises, Section 2.5 Instructor s Solutions Manual, Section 2.5 Exercise 1 Solutions to Exercises, Section 2.5 For Exercises 1 4, write the domain of the given function r as a union of intervals. 1. r(x) 5x3 12x 2 + 13 x 2

More information

Section 0.2 & 0.3 Worksheet. Types of Functions

Section 0.2 & 0.3 Worksheet. Types of Functions MATH 1142 NAME Section 0.2 & 0.3 Worksheet Types of Functions Now that we have discussed what functions are and some of their characteristics, we will explore different types of functions. Section 0.2

More information

Polynomial Interpolation Part II

Polynomial Interpolation Part II Polynomial Interpolation Part II Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term 2016 Exercise Session

More information

Applied Math 205. Full office hour schedule:

Applied Math 205. Full office hour schedule: Applied Math 205 Full office hour schedule: Rui: Monday 3pm 4:30pm in the IACS lounge Martin: Monday 4:30pm 6pm in the IACS lounge Chris: Tuesday 1pm 3pm in Pierce Hall, Room 305 Nao: Tuesday 3pm 4:30pm

More information

Solutions to Assignment #7

Solutions to Assignment #7 Math 310 Numerical Analysis (Bueler November 6, 009 Solutions to Assignment #7 Problems 6.1, exercise 13: Let f(x = cosh(x. Let x 0, x 1,..., x be any 3 distinct nodes in [ 1, 1]. Let p(x be the unique

More information

Quadratic function and equations Quadratic function/equations, supply, demand, market equilibrium

Quadratic function and equations Quadratic function/equations, supply, demand, market equilibrium Exercises 8 Quadratic function and equations Quadratic function/equations, supply, demand, market equilibrium Objectives - know and understand the relation between a quadratic function and a quadratic

More information

2 the maximum/minimum value is ( ).

2 the maximum/minimum value is ( ). Math 60 Ch3 practice Test The graph of f(x) = 3(x 5) + 3 is with its vertex at ( maximum/minimum value is ( ). ) and the The graph of a quadratic function f(x) = x + x 1 is with its vertex at ( the maximum/minimum

More information

Example 1 Which of these functions are polynomials in x? In the case(s) where f is a polynomial,

Example 1 Which of these functions are polynomials in x? In the case(s) where f is a polynomial, 1. Polynomials A polynomial in x is a function of the form p(x) = a 0 + a 1 x + a 2 x 2 +... a n x n (a n 0, n a non-negative integer) where a 0, a 1, a 2,..., a n are constants. We say that this polynomial

More information

Applied Numerical Analysis

Applied Numerical Analysis Applied Numerical Analysis Using MATLAB Second Edition Laurene V. Fausett Texas A&M University-Commerce PEARSON Prentice Hall Upper Saddle River, NJ 07458 Contents Preface xi 1 Foundations 1 1.1 Introductory

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 3 x 9 D) 27. y 4 D) -8x 3 y 6.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 3 x 9 D) 27. y 4 D) -8x 3 y 6. Precalculus Review - Spring 018 MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Simplify the exponential expression. Assume that variables represent

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

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

5. Series Solutions of ODEs

5. Series Solutions of ODEs Advanced Engineering Mathematics 5. Series solutions of ODEs 1 5. Series Solutions of ODEs 5.1 Power series method and Theory of the power series method Advanced Engineering Mathematics 5. Series solutions

More information

The Tangent Parabola The AMATYC Review, Vol. 23, No. 1, Fall 2001, pp

The Tangent Parabola The AMATYC Review, Vol. 23, No. 1, Fall 2001, pp The Tangent Parabola The AMATYC Review, Vol. 3, No., Fall, pp. 5-3. John H. Mathews California State University Fullerton Fullerton, CA 9834 By Russell W. Howell Westmont College Santa Barbara, CA 938

More information

Test 2 Review Math 1111 College Algebra

Test 2 Review Math 1111 College Algebra Test 2 Review Math 1111 College Algebra 1. Begin by graphing the standard quadratic function f(x) = x 2. Then use transformations of this graph to graph the given function. g(x) = x 2 + 2 *a. b. c. d.

More information

Ch 7 Summary - POLYNOMIAL FUNCTIONS

Ch 7 Summary - POLYNOMIAL FUNCTIONS Ch 7 Summary - POLYNOMIAL FUNCTIONS 1. An open-top box is to be made by cutting congruent squares of side length x from the corners of a 8.5- by 11-inch sheet of cardboard and bending up the sides. a)

More information

NC Math 3 Modelling with Polynomials

NC Math 3 Modelling with Polynomials NC Math 3 Modelling with Polynomials Introduction to Polynomials; Polynomial Graphs and Key Features Polynomial Vocabulary Review Expression: Equation: Terms: o Monomial, Binomial, Trinomial, Polynomial

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 17 Numerical Integration Formulas PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

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

University of British Columbia Math 307, Final

University of British Columbia Math 307, Final 1 University of British Columbia Math 307, Final April 23, 2012 3.30-6.00pm Name: Student Number: Signature: Instructor: Instructions: 1. No notes, books or calculators are allowed. A MATLAB/Octave formula

More information

Review of Section 1.1. Mathematical Models. Review of Section 1.1. Review of Section 1.1. Functions. Domain and range. Piecewise functions

Review of Section 1.1. Mathematical Models. Review of Section 1.1. Review of Section 1.1. Functions. Domain and range. Piecewise functions Review of Section 1.1 Functions Mathematical Models Domain and range Piecewise functions January 19, 2017 Even and odd functions Increasing and decreasing functions Mathematical Models January 19, 2017

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

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

Homework 2 solutions

Homework 2 solutions Homework 2 solutions Section 2.1: Ex 1,2,3,4,6,11; AP 1 (18 points; Ex 3, AP 1 graded, 4 pts each; 2 pts to try the others) 1. Determine if each function has a unique fixed point on the specified interval.

More information

The degree of the polynomial function is n. We call the term the leading term, and is called the leading coefficient. 0 =

The degree of the polynomial function is n. We call the term the leading term, and is called the leading coefficient. 0 = Math 1310 A polynomial function is a function of the form = + + +...+ + where 0,,,, are real numbers and n is a whole number. The degree of the polynomial function is n. We call the term the leading term,

More information

Section 4.1: Polynomial Functions and Models

Section 4.1: Polynomial Functions and Models Section 4.1: Polynomial Functions and Models Learning Objectives: 1. Identify Polynomial Functions and Their Degree 2. Graph Polynomial Functions Using Transformations 3. Identify the Real Zeros of a Polynomial

More information

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /8:00-9:30

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /8:00-9:30 ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION 2007-10-23/8:00-9:30 The examination is out of 67 marks. Instructions: No aides. Write your name and student ID number on each booklet.

More information

Order of convergence

Order of convergence Order of convergence Linear and Quadratic Order of convergence Computing square root with Newton s Method Given a > 0, p def = a is positive root of equation Newton s Method p k+1 = p k p2 k a 2p k = 1

More information