3.2 - Interpolation and Lagrange Polynomials

Size: px
Start display at page:

Download "3.2 - Interpolation and Lagrange Polynomials"

Transcription

1 3. - Interpolation and Lagrange Polynomials. Polynomial Interpolation: Problem: Givenn pairs of data points x i, y i,wherey i fx i, i 0,,...,n for some function fx, we want to find a polynomial P x of lowest possible degree for which P x i y i, i 0,,...,n (P x agrees with fx at x 0,...,x n ). The polynomial P x is said to interpolate the data x i, y i, i 0,,...,n and is called an interpolating polynomial. Graphically, P x is an approximation to fx and satisfies the conditions: P x i fx i, i 0,,...,n. For example, y x -0 y fx, ---y P x Obviously, for this example P x is not a good approximation to fx though P x satisfies the conditions: P x i y i for i 0,,. How to form P x? There are several ways to form P x. Let us start with a way we now already. Let P x a 0 a x a x...a x. We want to find coefficients a 0, a,..., a such that the following n equations hold: P x i a 0 a x a x...a x y i for i 0,,...,n. Rewrite these n equations in a matrix-vector form: (*) x 0 x 0 x 0 x x x x n x n x n a 0 a a a y 0 y y n. The vector a 0 a a a is a solution of the system (*) of n linear equations in unnowns.

2 Consider the case where n. Recall in Linear Algebra, we learned that this system has a unique solution if the coefficient matrix form: a 0 a a a x 0 x 0 x 0 x x x x n x n x n x 0 x 0 x 0 x x x x n x n x n is nonsingular and the solution vector is of the and can be solved by Gaussian-Elimination and Bacward-Substution. Example Let x 0 0, x 0., x 0.9, fx cosx. Find P x a 0 a x a x. Setch both y fx and y P x for x in 0,. y 0 y y n Solve a 0 a a from the following system: a 0 a cos a cos0.8 a 0 a cos a cos Hence, P x x x. y y fx, ---y P x In MatLab, we can complete this example as follows. xv[0;0.;0.9]; A[ones(3,) xv xv.^]; x

3 yvcos(xv.^); coeffvinv(a)*yv coeffv Now we setch the graphs of y cosx and y P x x x for x in 0,. xvnew0:0.0:; ycos(xvnew.^); ycoeffv()coeffv()*xvnewcoeffv(3)*xvnew.^; plot(xvnew,y, r-,xvnew,y, b-. );.3 red - y=cos(x ), blue -. y=p (x) If we want to add a pair of data 0.3,cos0.09, then we can go over the following steps. xv[0;0.3;0.;0.9]; A[ones(4,) xv xv.^ xv.^3]; yvcos(xv.^); coeffvinv(a)*yv coeffv Hence, P 3 x x x x 3.Nowwe setch the graphs of y cosx and y P 3 x as follows. Remember that xvnew and y are still there. We need to recompute y. ycoeffv()coeffv()*xvnewcoeffv(3)*xvnew.^coeffv(4)*xvnew.^3; plot(xvnew,y, r-,xvnew,y, b-. ); title( red - ycos(x^), blue -. yp_3(x) ) 3

4 red - y=cos(x ), blue -. y=p 3 (x) Clearly, P 3 x fits y cosx much better than P x does. Note that the system (*) of linear equations are getting more difficult to solve when n is large. Can P x be formed with less computation?. Lagrange Interpolating Polynomials: a. Lagrange Polynomials: For 0,,...,n, define L n, x n i0, i x x i x x i x x 0...x x x x...x x n x x 0...x x x x...x x n L n, x are called Lagrange polynomials. For example, let x i i, i 0,,,3. Then x 0 0, x, x andx 3 3, and x 0x x 3 L 3, x 0 3 xx x 3 L 3, x xx x xx x 3 Observe that Lagrange Polynomials have the following properties: i. L n, x L n, x x x 0...x x x x...x x n x x 0...x x x x...x x n ii. L n, x i 0fori. L n, x i x i x 0...x i x i...x i x x i x...x i x n x x 0...x x i...x x x x...x x n For example, L 3, andl 3, b. Lagrange Interpolating Polynomials: The polynomial 4

5 n P n x y L n, x y 0 L n,0 x y L n, x...y n L n,n x 0 is called the nth Lagrange interpolating polynomial. Observe that for i 0,,...,n n P n x i y L n, x i y i L n,i x i y i. 0 P n x is an nth polynomial that agrees with fx at x 0, x,..., x n. Theorem Suppose that x 0,..., x n are distinct numbers in the interval a, b and f n is continuous in a, b. For each x in a, b, there exists a number cx in a, b such that fx P n x fn cx x x 0 x x...x x n. n! Proof For x x i and x in n a, b, define ht ft P n t fx P n x 0 t x x x. Clearly, hx i 0, i 0,,...,n. Observe that hx 0. Since x x i, ht 0att x 0, x,..., x n, x. Since ht has n distinct zeros in a, b, by Rolle s Theorem, we now there exists a constant c in a, b such that h n c 0. h n t f n n! t 0 fx P n x x x 0 x x x x n h n c f n n! c 0 fx P n x x x 0 x x...x x n 0 R n x fx P n x fn c n! x x 0x x x x n. Recall in Calculus II, we studied nth degree Taylor polynomial at x c : and its error P Taylor x fc f c! x c f c! x c fn c n! x c n R Taylor x fn n! x cn where is between x and c. Note that the differences between a th degree Taylor polynomial and a th degree interpolating polynomial are: a. P Taylor x fx at only x x 0 and P interpolating x fx, atx x 0, x,...,x n. b. P Taylor requires nowledge of f, f,... but P interpolating requires fx 0, fx,...,fx n.recall in Calculus II, we studied nth degree Taylor polynomial at x c : and its error P Taylor x fc f c! x c f c! x c fn c n! x c n R Taylor x fn n! x cn where is between x and c. Note that the differences between a th degree Taylor polynomial and a th degree interpolating 5

6 polynomial are: a. P Taylor x fx at only x x 0 and P interpolating x fx, atx x 0, x,...,x n. b. P Taylor requires nowledge of f, f,... but P interpolating requires fx 0, fx,...,fx n. Example Let x 0 0, x 0., x 0.9, fx cosx. () Find the Lagrange interpolating polynomial P x and R x. () Use P x to approximate f0.45 and estimate the approximation error. (3) Approximate 0 cosx dx by 0 P xdx. () P x f0 x 0.x f0. xx f0.9 xx P x cos0.3 x 0.x 0.9 xx 0.9 cos0.8 xx y x () f x xsinx, y cosx, ---y P x f x sinx x cosx, f x xcosx 4xcosx 4x 3 sinx 43xcosx x 3 sinx where c is in 0,. R x 43ccosc c 3 sinc xx 0.x 0.9 f0.45 P 0.45 cos cos True error cos 0.45 P Find the approximation error: f x max x in 0, 43xcosx x 3 sinx 43 0

7 or chec out the graph of f x to have a better estimate of an upper bound of f x : y f x.5, for x in 0, R x (3) y 43xcosx x 3 sinx 0 P xdx 0 cos0.3 x 0.x 0.9 xx 0.9 cos0.8 xx 0. dx x x 0. dx cos0.3 x xdx 0 cos0.8 x xdx 0 cos cos Neville s Iterated Interpolation: If we need to add more points x n,... fromp n x to construct an interpolation polynomial with larger degree, can we construct an interpolation polynomial iteratively? The answer is yes. The method is called the Neville Method. Let m, m,..., m be distinct integers where 0 m i n for each i. LetP m,m...,m x be the Lagrange polynomial that agrees with f at the points: x m, x m,..., x m. For example, P,,4 x fx x x x x 4 x x x x 4 fx x x x x 4 x x x x 4 fx 4 x x x x x 4 x x 4 x is the Lagrange polynomial that agrees with fx at 3 points: x, x, x 4 : P,,4 x fx, P,,4 x fx, P,,4 x 3 fx 3. Theorem Letfbedefinedatx 0, x,..., x, and x j and x be two distinct numbers. Then P 0,,..., x x x jp 0,,...,j,j,..., x x x i P 0,,...,i,i,..., x x i x j. Proof We now that both polynomials P 0,,...,j,j,..., x and P 0,,...,i,i,..., x are degree. thedegreeofp 0,,..., x is. Chec if P 0,,..., x l fx l for l 0,,..., : since P 0,,...,j,j,..., x l fx l if l j and P 0,,...,i,i,..., x l fx l if l i For l 0,,...,, but l i and l j, So, 7

8 For l i : For l j : P 0,,..., x l x l x j P 0,,...,j,j,..., x l x l x i P 0,,...,i,i,..., x l x i x j x l x j fx l x l x i fx l x i x j x i x j x i x j fx l fx l P 0,,..., x i x i x j P 0,,...,j,j,..., x i x i x i P 0,,...,i,i,..., x i x i x j P 0,,...,j,j,..., x i fx i P 0,,..., x i x j x j P 0,,...,j,j,..., x j x j x i P 0,,...,i,i,..., x j x i x j P 0,,...,i,i,..., x j fx j So, P 0,,..., x the th degree interpolating polynomial. Example Consider x 0, x,..., x n. Then we can form P, x fx x x x x fx x x x x and P,4x fx x x 4 x x 4 fx 4 x x 4 x x 4 using x, x and x 4. Then we can combine P, x and P,4 x to form P,,4 x: P,,4 x x x 4P, x x x P,4 x x x 4 which is the Lagrange polynomial that agrees with fx at 3 points: x, x, x 4. Now given 0,,, e,, e 4, and 3, e 9, find P 0,,,3 x using P 0,, x and P,,3 x. P 0,, x x x 0 0 e x 0x 0 e 4 x 0x 0 x x e xx e 4 xx P,,3 x e x x 3 3 x x 3 e 4 3 x x e e x x 3 e 4 x x 3 e 9 x x P 0,,,3 x x 0P,,3x x 3P 0,, x 3 0 xp,,3x x 3P 0,, x Algorithm Neville s Iterated Interpolation: Given x i, fx i for i 0,,..., and, let P i fx i Steps of Computing P 0,,,..., x for a given x : (neville.m) 8

9 x i P i x P i,i x P i,i,i x P i,i,i,i3 x P i,i,i,i3,i4 x x 0 P 0 x P P 0, x x P P, x P 0,, x x 3 P 3 P,3 x P,,3 x P 0,,,3 x x 4 P 4 P 3,4 x P,3,4 x P,,3,4 x P 0,,,3,4 x The algorithm stops and fx P 0,,,..., x whenever P 0,,,..., x P 0,,,..., x. An alternative way: x i P i x P i,i x P i,i,i x P i,i,i,i3 x P i,i,i,i3,i4 x x 0 P 0 x P P 0, x x P P 0, x P 0,, x x 3 P 3 P 0,3 x P 0,,3 x P 0,,,3 x x 4 P 4 P 0,4 x P 0,3,4 x P 0,,3,4 x P 0,,,3,4 x Example Suppose that x j j for j 0,,,3 and it is nown that P 0, x x, P, x 3x, and P,, Find P,3.5, P 0,, x and P 0,,,3,.5. P 0,, x x x P 0, x x x 0 P, x x 0 x x x x3x x i P i x P i,i x P i,i,i x P i,i,i,i3 x x 0 P 0 P P 0,.5.5 P P, P 0,, P 3 P,3.5 P,,3.5 4 P 0,,, P,,3 x x x P,3 x x x 3 P, x x 3 x P,3.5 x P,3x x 33x P 0,,.5.5 P 0,.5.5 0P,

10 P 0,,, P 0,,.5.5 0P,, Example Neville s method is used to approximate f0.4 as follows. Complete the table. x i P i x P i,i x P i,i,i x P i,i,i,i3 x P 0, P P, 0.4 P 0,, P, P,, P 0,,, P, P P P, P P P 0,, P 0, P, Chec: P 0,,, , P Example Let fx sinlnx, x 0.0, x.4, x.. () Estimate the approximation error R x of an interpolating polynomial P x over.0,.. () () Approximate f. and f.5, and estimate their errors. R x f c 3! x x.4x.,wherec is in,. f x coslnx x, f x sinlnx x x coslnx x f x coslnx x sinlnx x x xsinlnx coslnx coslnx sinlnx sinlnx coslnx x 3 x 4 sinlnx coslnx x 3sinlnx coslnx x 3 0

11 y y x f x R x f c 3! f x f y x x.4x. 3sinln cosln x x.4x () xv[;.4;.]; yvsin(log(xv)); [yout,yall]neville(xv,yv,.,) yout yall [yout,yall]neville(xv,yv,.5,) yout yall true error: sinlog true error: sinlog R. f c 3! 0.33 R.5 f c 3! f c f c

12 Exercises:. Givenx i,y i 0,,,,, where y i fx i for some fx, construct the polynomial P x that agrees with fx at x 0, x and x in the following two ways. () P x a 0 a x a x a standard form. () P x is a Lagrange interpolating polynomial.. Let x 0, x 0, x, and fx e x. () Find algebraically (eep e in P x) the Lagrange interpolating polynomial P x and its approximation error R x. () Use P x to approximate f and f. 3 (3) Compute the true approximation errors f P and f P 3. 3 (4) Estimate the approximation errors using R and R. 3 (5) Approximate e x dx by P xdx and find the true approximation error e x dx P xdx Let x 0 0, x 0., x 0.9, and fx x. () Find the Lagrange interpolating polynomial P x and its approximation error R x. () Use P x to approximate f0.45 and R 0.45 to estimate the approximation error. 4. Use Neville s method to approximate f0.5, giving the following table. Determine P f0.7. i x i P i P i,i P i,i,i Suppose we now that f0, f , f , f Use given data to approximate f0.43 by a Lagrange interpolating polynomial using Neville s method (MatLab program neville.m).. A census of the population of the US is taen every 0 years. The population, in thousands, from 940 to 000 is given below. year t population Use Neville s method (MatLab program neville.m) to estimate the populations in 975 and 005 and predict the population in Let fx x. Approximate f0.5 by P0.5 where Px is a Lagrangian interpolating polynomial. Suppose that Neville s Method is used to generate P0.5 iteratively as follows.

13 P P 0, 0.5 P 0,, 0.5 P 0,,,3 0.5 P 0,,,3,4 0.5 P 0,,,3,4,5 0.5 P 0,,,3,4,5, Let the stopping criterion be set as P P a. Determine the degree () of the polynomial used to approximate with b. If P 0,,,3,4,5, 0.5 is chosen from above sequence to approximate, what is? 3

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2...

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2... TANA9 Lecture 7 Interpolation Suppose we have a table x x x... x n+ Interpolation Introduction. Polynomials. Error estimates. Runge s phenomena. Application - Equation solving. Spline functions and interpolation.

More information

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010 Lecture 8, Ceng375 Numerical Computations at December 9, 2010 Computer Engineering Department Çankaya University 8.1 Contents 1 2 3 8.2 : These provide a more efficient way to construct an interpolating

More information

Natasha S. Sharma, PhD

Natasha S. Sharma, PhD Revisiting the function evaluation problem Most functions cannot be evaluated exactly: 2 x, e x, ln x, trigonometric functions since by using a computer we are limited to the use of elementary arithmetic

More information

Maximizing an interpolating quadratic

Maximizing an interpolating quadratic Week 11: Monday, Apr 9 Maximizing an interpolating quadratic Suppose that a function f is evaluated on a reasonably fine, uniform mesh {x i } n i=0 with spacing h = x i+1 x i. How can we find any local

More information

Topic 6: Calculus Integration Volume of Revolution Paper 2

Topic 6: Calculus Integration Volume of Revolution Paper 2 Topic 6: Calculus Integration Standard Level 6.1 Volume of Revolution Paper 1. Let f(x) = x ln(4 x ), for < x

More information

x n x n stepnumber k order r error constant C r+1 1/2 5/12 3/8 251/720 abs. stab. interval (α,0) /11-3/10

x n x n stepnumber k order r error constant C r+1 1/2 5/12 3/8 251/720 abs. stab. interval (α,0) /11-3/10 MATH 573 LECTURE NOTES 77 13.8. Predictor-corrector methods. We consider the Adams methods, obtained from the formula xn+1 xn+1 y(x n+1 y(x n ) = y (x)dx = f(x,y(x))dx x n x n by replacing f by an interpolating

More information

Homework #6 Brief Solutions 2012

Homework #6 Brief Solutions 2012 Homework #6 Brief Solutions %page 95 problem 4 data=[-,;-,;,;4,] data = - - 4 xk=data(:,);yk=data(:,);s=csfit(xk,yk,-,) %Using the program to find the coefficients S =.456 -.456 -.. -.5.9 -.5484. -.58.87.

More information

Bob Brown Math 251 Calculus 1 Chapter 4, Section 4 Completed 1 CCBC Dundalk

Bob Brown Math 251 Calculus 1 Chapter 4, Section 4 Completed 1 CCBC Dundalk Bob Brown Math 251 Calculus 1 Chapter 4, Section 4 Completed 1 A Function and its Second Derivative Recall page 4 of Handout 3.1 where we encountered the third degree polynomial f(x) x 3 5x 2 4x + 20.

More information

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not.

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not. AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 2: Spline Approximations Dianne P O Leary c 2001, 2002, 2007 Piecewise polynomial interpolation Piecewise polynomial interpolation Read: Chapter 3 Skip:

More information

February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 )

February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 ) f f f f f (/2).9.8.7.6.5.4.3.2. S Knots.7.6.5.4.3.2. 5 5.2.8.6.4.2 S Knots.2 5 5.9.8.7.6.5.4.3.2..9.8.7.6.5.4.3.2. S Knots 5 5 S Knots 5 5 5 5.35.3.25.2.5..5 5 5.6.5.4.3.2. 5 5 4 x 3 3.5 3 2.5 2.5.5 5

More information

Linear and quadratic Taylor polynomials for functions of several variables.

Linear and quadratic Taylor polynomials for functions of several variables. ams/econ 11b supplementary notes ucsc Linear quadratic Taylor polynomials for functions of several variables. c 016, Yonatan Katznelson Finding the extreme (minimum or maximum) values of a function, is

More information

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini DM545 Linear and Integer Programming Lecture 2 The Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. 2. 3. 4. Standard Form Basic Feasible Solutions

More information

CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS

CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS PEDRO FORTUNY AYUSO The students will have already received the lessons about its, continuity and derivation although these concepts should not be new for

More information

Handout 4 - Interpolation Examples

Handout 4 - Interpolation Examples Handout 4 - Interpolation Examples Middle East Technical University Example 1: Obtaining the n th Degree Newton s Interpolating Polynomial Passing through (n+1) Data Points Obtain the 4 th degree Newton

More information

= f (a, b) + (hf x + kf y ) (a,b) +

= f (a, b) + (hf x + kf y ) (a,b) + Chapter 14 Multiple Integrals 1 Double Integrals, Iterated Integrals, Cross-sections 2 Double Integrals over more general regions, Definition, Evaluation of Double Integrals, Properties of Double Integrals

More information

Introduction to numerical algorithms

Introduction to numerical algorithms Introduction to numerical algorithms Given an algebraic equation or formula, we may want to approximate the value, and while in calculus, we deal with equations or formulas that are well defined at each

More information

CS321 Introduction To Numerical Methods

CS321 Introduction To Numerical Methods CS3 Introduction To Numerical Methods Fuhua (Frank) Cheng Department of Computer Science University of Kentucky Lexington KY 456-46 - - Table of Contents Errors and Number Representations 3 Error Types

More information

Final Exam Review Algebra Semester 1

Final Exam Review Algebra Semester 1 Final Exam Review Algebra 015-016 Semester 1 Name: Module 1 Find the inverse of each function. 1. f x 10 4x. g x 15x 10 Use compositions to check if the two functions are inverses. 3. s x 7 x and t(x)

More information

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier Calculus I Review Handout 1.3 Introduction to Calculus - Limits by Kevin M. Chevalier We are now going to dive into Calculus I as we take a look at the it process. While precalculus covered more static

More information

Applications of Integration

Applications of Integration Week 12. Applications of Integration 12.1.Areas Between Curves Example 12.1. Determine the area of the region enclosed by y = x 2 and y = x. Solution. First you need to find the points where the two functions

More information

1 Basic Mathematical Operations

1 Basic Mathematical Operations 1 Basic Mathematical Operations Recall the basic operations of addition, substraction, multiplication, and division. Consider evaluating the following expression: 2+3 5 Do we add 2 and 3 first or do we

More information

AP Calculus Summer Review Packet

AP Calculus Summer Review Packet AP Calculus Summer Review Packet Name: Date began: Completed: **A Formula Sheet has been stapled to the back for your convenience!** Email anytime with questions: danna.seigle@henry.k1.ga.us Complex Fractions

More information

Walt Whitman High School SUMMER REVIEW PACKET. For students entering AP CALCULUS BC

Walt Whitman High School SUMMER REVIEW PACKET. For students entering AP CALCULUS BC Walt Whitman High School SUMMER REVIEW PACKET For students entering AP CALCULUS BC Name: 1. This packet is to be handed in to your Calculus teacher on the first day of the school year.. All work must be

More information

Math 115 Second Midterm March 25, 2010

Math 115 Second Midterm March 25, 2010 Math 115 Second Midterm March 25, 2010 Name: Instructor: Section: 1. Do not open this exam until you are told to do so. 2. This exam has 9 pages including this cover. There are 8 problems. Note that the

More information

AP Calculus AB Unit 2 Assessment

AP Calculus AB Unit 2 Assessment Class: Date: 203-204 AP Calculus AB Unit 2 Assessment Multiple Choice Identify the choice that best completes the statement or answers the question. A calculator may NOT be used on this part of the exam.

More information

Trigonometric Graphs Dr. Laura J. Pyzdrowski

Trigonometric Graphs Dr. Laura J. Pyzdrowski 1 Names: About this Laboratory In this laboratory, we will examine trigonometric functions and their graphs. Upon completion of the lab, you should be able to quickly sketch such functions and determine

More information

LECTURE 18 - OPTIMIZATION

LECTURE 18 - OPTIMIZATION LECTURE 18 - OPTIMIZATION CHRIS JOHNSON Abstract. In this lecture we ll describe extend the optimization techniques you learned in your first semester calculus class to optimize functions of multiple variables.

More information

AMSC/CMSC 460 Final Exam, Fall 2007

AMSC/CMSC 460 Final Exam, Fall 2007 AMSC/CMSC 460 Final Exam, Fall 2007 Show all work. You may leave arithmetic expressions in any form that a calculator could evaluate. By putting your name on this paper, you agree to abide by the university

More information

Partial Derivatives (Online)

Partial Derivatives (Online) 7in x 10in Felder c04_online.tex V3 - January 21, 2015 9:44 A.M. Page 1 CHAPTER 4 Partial Derivatives (Online) 4.7 Tangent Plane Approximations and Power Series It is often helpful to use a linear approximation

More information

NAME: Section # SSN: X X X X

NAME: Section # SSN: X X X X Math 155 FINAL EXAM A May 5, 2003 NAME: Section # SSN: X X X X Question Grade 1 5 (out of 25) 6 10 (out of 25) 11 (out of 20) 12 (out of 20) 13 (out of 10) 14 (out of 10) 15 (out of 16) 16 (out of 24)

More information

MATLAB QUICK START TUTORIAL

MATLAB QUICK START TUTORIAL MATLAB QUICK START TUTORIAL This tutorial is a brief introduction to MATLAB which is considered one of the most powerful languages of technical computing. In the following sections, the basic knowledge

More information

Precomposing Equations

Precomposing Equations Precomposing Equations Let s precompose the function f(x) = x 3 2x + 9 with the function g(x) = 4 x. (Precompose f with g means that we ll look at f g. We would call g f postcomposing f with g.) f g(x)

More information

Piecewise polynomial interpolation

Piecewise polynomial interpolation Chapter 2 Piecewise polynomial interpolation In ection.6., and in Lab, we learned that it is not a good idea to interpolate unctions by a highorder polynomials at equally spaced points. However, it transpires

More information

HW 1 CMSC 452. Morally DUE Feb 7 NOTE- THIS HW IS THREE PAGES LONG!!! SOLUTIONS THROUGOUT THIS HW YOU CAN ASSUME:

HW 1 CMSC 452. Morally DUE Feb 7 NOTE- THIS HW IS THREE PAGES LONG!!! SOLUTIONS THROUGOUT THIS HW YOU CAN ASSUME: HW 1 CMSC 452. Morally DUE Feb 7 NOTE- THIS HW IS THREE PAGES LONG!!! SOLUTIONS THROUGOUT THIS HW YOU CAN ASSUME: The union of a finite number of countable sets is countable. The union of a countable number

More information

Concept of Curve Fitting Difference with Interpolation

Concept of Curve Fitting Difference with Interpolation Curve Fitting Content Concept of Curve Fitting Difference with Interpolation Estimation of Linear Parameters by Least Squares Curve Fitting by Polynomial Least Squares Estimation of Non-linear Parameters

More information

Section 7.6 Graphs of the Sine and Cosine Functions

Section 7.6 Graphs of the Sine and Cosine Functions Section 7.6 Graphs of the Sine and Cosine Functions We are going to learn how to graph the sine and cosine functions on the xy-plane. Just like with any other function, it is easy to do by plotting points.

More information

Limits and Continuity: section 12.2

Limits and Continuity: section 12.2 Limits and Continuity: section 1. Definition. Let f(x,y) be a function with domain D, and let (a,b) be a point in the plane. We write f (x,y) = L if for each ε > 0 there exists some δ > 0 such that if

More information

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y.

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y. 2 Second Derivatives As we have seen, a function f (x, y) of two variables has four different partial derivatives: (x, y), (x, y), f yx (x, y), (x, y) It is convenient to gather all four of these into

More information

Review Initial Value Problems Euler s Method Summary

Review Initial Value Problems Euler s Method Summary THE EULER METHOD P.V. Johnson School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY OUTLINE 1 REVIEW 2 INITIAL

More information

an interpolating polynomial P (x) for f(x) Issues: how to find, represent, compute P (x); errors?

an interpolating polynomial P (x) for f(x) Issues: how to find, represent, compute P (x); errors? INTERPOLATION Background Polynomial Approximation Problem: given f(x) C[a, b], find P n (x) = a 0 + a 1 x + a 2 x 2 + + a n x n with P n (x) close to f(x) for x [a, b]. Motivations: f(x) might be difficult

More information

Interpolation and Splines

Interpolation and Splines Interpolation and Splines Anna Gryboś October 23, 27 1 Problem setting Many of physical phenomenona are described by the functions that we don t know exactly. Often we can calculate or measure the values

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 6 Basic concepts and definitions of graph theory By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

More information

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS Definition 1.1. Let X be a set and T a subset of the power set P(X) of X. Then T is a topology on X if and only if all of the following

More information

APPM/MATH Problem Set 4 Solutions

APPM/MATH Problem Set 4 Solutions APPM/MATH 465 Problem Set 4 Solutions This assignment is due by 4pm on Wednesday, October 16th. You may either turn it in to me in class on Monday or in the box outside my office door (ECOT 35). Minimal

More information

Linear Transformations

Linear Transformations Linear Transformations The two basic vector operations are addition and scaling From this perspective, the nicest functions are those which preserve these operations: Def: A linear transformation is a

More information

30. Constrained Optimization

30. Constrained Optimization 30. Constrained Optimization The graph of z = f(x, y) is represented by a surface in R 3. Normally, x and y are chosen independently of one another so that one may roam over the entire surface of f (within

More information

Hw 4 Due Feb 22. D(fg) x y z (

Hw 4 Due Feb 22. D(fg) x y z ( Hw 4 Due Feb 22 2.2 Exercise 7,8,10,12,15,18,28,35,36,46 2.3 Exercise 3,11,39,40,47(b) 2.4 Exercise 6,7 Use both the direct method and product rule to calculate where f(x, y, z) = 3x, g(x, y, z) = ( 1

More information

Interpolation by Spline Functions

Interpolation by Spline Functions Interpolation by Spline Functions Com S 477/577 Sep 0 007 High-degree polynomials tend to have large oscillations which are not the characteristics of the original data. To yield smooth interpolating curves

More information

Functions. How is this definition written in symbolic logic notation?

Functions. How is this definition written in symbolic logic notation? functions 1 Functions Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by

More information

1 Overview. 2 Applications of submodular maximization. AM 221: Advanced Optimization Spring 2016

1 Overview. 2 Applications of submodular maximization. AM 221: Advanced Optimization Spring 2016 AM : Advanced Optimization Spring 06 Prof. Yaron Singer Lecture 0 April th Overview Last time we saw the problem of Combinatorial Auctions and framed it as a submodular maximization problem under a partition

More information

Chapter 3 Numerical Methods

Chapter 3 Numerical Methods Chapter 3 Numerical Methods Part 1 3.1 Linearization and Optimization of Functions of Vectors 1 Problem Notation 2 Outline 3.1.1 Linearization 3.1.2 Optimization of Objective Functions 3.1.3 Constrained

More information

SOME PROPERTIES OF TRIGONOMETRIC FUNCTIONS. 5! x7 7! + = 6! + = 4! x6

SOME PROPERTIES OF TRIGONOMETRIC FUNCTIONS. 5! x7 7! + = 6! + = 4! x6 SOME PROPERTIES OF TRIGONOMETRIC FUNCTIONS PO-LAM YUNG We defined earlier the sine cosine by the following series: sin x = x x3 3! + x5 5! x7 7! + = k=0 cos x = 1 x! + x4 4! x6 6! + = k=0 ( 1) k x k+1

More information

Convergence of C 2 Deficient Quartic Spline Interpolation

Convergence of C 2 Deficient Quartic Spline Interpolation Advances in Computational Sciences and Technology ISSN 0973-6107 Volume 10, Number 4 (2017) pp. 519-527 Research India Publications http://www.ripublication.com Convergence of C 2 Deficient Quartic Spline

More information

Sections 1.3 Computation of Limits

Sections 1.3 Computation of Limits 1 Sections 1.3 Computation of Limits We will shortly introduce the it laws. Limit laws allows us to evaluate the it of more complicated functions using the it of simpler ones. Theorem Suppose that c is

More information

(1) Given the following system of linear equations, which depends on a parameter a R, 3x y + 5z = 2 4x + y + (a 2 14)z = a + 2

(1) Given the following system of linear equations, which depends on a parameter a R, 3x y + 5z = 2 4x + y + (a 2 14)z = a + 2 (1 Given the following system of linear equations, which depends on a parameter a R, x + 2y 3z = 4 3x y + 5z = 2 4x + y + (a 2 14z = a + 2 (a Classify the system of equations depending on the values of

More information

1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2,

1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2, Exercises Exercises 1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2, a) f(n + 1) = f(n) + 2. b) f(n + 1) = 3f(n). c) f(n + 1) = 2f(n). d) f(n + 1) = f(n)2

More information

Math 4242 Polynomial Time algorithms, IndependentSet problem

Math 4242 Polynomial Time algorithms, IndependentSet problem Math 4242 Polynomial Time algorithms, IndependentSet problem Many of the algorithms we have looked at so far have a reasonable running time. Not all algorithms do. We make this idea more precise. Definition:

More information

Handout 2 - Root Finding using MATLAB

Handout 2 - Root Finding using MATLAB Handout 2 - Root Finding using MATLAB Middle East Technical University MATLAB has couple of built-in root finding functions. In this handout we ll have a look at fzero, roots and solve functions. It is

More information

For Review Purposes Only. Two Types of Definitions Closed Form and Recursive Developing Habits of Mind. Table H Output.

For Review Purposes Only. Two Types of Definitions Closed Form and Recursive Developing Habits of Mind. Table H Output. 79_CH_p-9.pdf Page 7. Two Types of Definitions Closed Form and Recursive The table below is from Exercise of Lesson.. Table H Developing You can describe a function that agrees with this table in more

More information

Outline. Numerical Analysis Basics. Some Higher-Level Languages. Programming Languages. BASIC and VBA MATLAB

Outline. Numerical Analysis Basics. Some Higher-Level Languages. Programming Languages. BASIC and VBA MATLAB umerical Analysis Basics Larry Caretto Mechanical Engineering 39 umerical Analysis of Engineering Systems February 5, 214 Outline Programming Languages Binary umbers and Data Types Limits on the size and

More information

Dubna 2018: lines on cubic surfaces

Dubna 2018: lines on cubic surfaces Dubna 2018: lines on cubic surfaces Ivan Cheltsov 20th July 2018 Lecture 1: projective plane Complex plane Definition A line in C 2 is a subset that is given by ax + by + c = 0 for some complex numbers

More information

Gradient and Directional Derivatives

Gradient and Directional Derivatives Gradient and Directional Derivatives MATH 311, Calculus III J. Robert Buchanan Department of Mathematics Fall 2011 Background Given z = f (x, y) we understand that f : gives the rate of change of z in

More information

Piecewise Defined Functions

Piecewise Defined Functions Piecewise Defined Functions Most of the functions that we ve looked at this semester can be expressed as a single equation. For example, f(x) =3x 2 5x +2,org(x) = x 1, or h(x) =e 3x 1. Sometimes an equation

More information

Core Mathematics 3 Functions

Core Mathematics 3 Functions http://kumarmaths.weebly.com/ Core Mathematics 3 Functions Core Maths 3 Functions Page 1 Functions C3 The specifications suggest that you should be able to do the following: Understand the definition of

More information

Polynomial Approximation and Interpolation Chapter 4

Polynomial Approximation and Interpolation Chapter 4 4.4 LAGRANGE POLYNOMIALS The direct fit polynomial presented in Section 4.3, while quite straightforward in principle, has several disadvantages. It requires a considerable amount of effort to solve the

More information

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions. THREE LECTURES ON BASIC TOPOLOGY PHILIP FOTH 1. Basic notions. Let X be a set. To make a topological space out of X, one must specify a collection T of subsets of X, which are said to be open subsets of

More information

Angle Measure 1. Use the relationship π rad = 180 to express the following angle measures in radian measure. a) 180 b) 135 c) 270 d) 258

Angle Measure 1. Use the relationship π rad = 180 to express the following angle measures in radian measure. a) 180 b) 135 c) 270 d) 258 Chapter 4 Prerequisite Skills BLM 4-1.. Angle Measure 1. Use the relationship π rad = 180 to express the following angle measures in radian measure. a) 180 b) 135 c) 70 d) 58. Use the relationship 1 =!

More information

AQA GCSE Further Maths Topic Areas

AQA GCSE Further Maths Topic Areas AQA GCSE Further Maths Topic Areas This document covers all the specific areas of the AQA GCSE Further Maths course, your job is to review all the topic areas, answering the questions if you feel you need

More information

16.50 RANDPOLY: A random polynomial generator

16.50 RANDPOLY: A random polynomial generator 743 16.50 RANDPOLY: A random polynomial generator This package is based on a port of the Maple random polynomial generator together with some support facilities for the generation of random numbers and

More information

Cubic Splines and Matlab

Cubic Splines and Matlab Cubic Splines and Matlab October 7, 2006 1 Introduction In this section, we introduce the concept of the cubic spline, and how they are implemented in Matlab. Of particular importance are the new Matlab

More information

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE COMPUTER VISION 2017-2018 > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE OUTLINE Optical flow Lucas-Kanade Horn-Schunck Applications of optical flow Optical flow tracking Histograms of oriented flow Assignment

More information

Block-based Thiele-like blending rational interpolation

Block-based Thiele-like blending rational interpolation Journal of Computational and Applied Mathematics 195 (2006) 312 325 www.elsevier.com/locate/cam Block-based Thiele-like blending rational interpolation Qian-Jin Zhao a, Jieqing Tan b, a School of Computer

More information

Exam in Calculus. Wednesday June 1st First Year at The TEK-NAT Faculty and Health Faculty

Exam in Calculus. Wednesday June 1st First Year at The TEK-NAT Faculty and Health Faculty Exam in Calculus Wednesday June 1st 211 First Year at The TEK-NAT Faculty and Health Faculty The present exam consists of 7 numbered pages with a total of 12 exercises. It is allowed to use books, notes,

More information

Math 113 Calculus III Final Exam Practice Problems Spring 2003

Math 113 Calculus III Final Exam Practice Problems Spring 2003 Math 113 Calculus III Final Exam Practice Problems Spring 23 1. Let g(x, y, z) = 2x 2 + y 2 + 4z 2. (a) Describe the shapes of the level surfaces of g. (b) In three different graphs, sketch the three cross

More information

Homework: Study 6.1 # 1, 5, 7, 13, 25, 19; 3, 17, 27, 53

Homework: Study 6.1 # 1, 5, 7, 13, 25, 19; 3, 17, 27, 53 January, 7 Goals:. Remember that the area under a curve is the sum of the areas of an infinite number of rectangles. Understand the approach to finding the area between curves.. Be able to identify the

More information

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

over The idea is to construct an algorithm to solve the IVP ODE (9.1) Runge- Ku(a Methods Review of Heun s Method (Deriva:on from Integra:on) The idea is to construct an algorithm to solve the IVP ODE (9.1) over To obtain the solution point we can use the fundamental theorem

More information

Solution of final examination

Solution of final examination of final examination Math 20, pring 201 December 9, 201 Problem 1 Let v(t) (2t e t ) i j + π cos(πt) k be the velocity of a particle with initial position r(0) ( 1, 0, 2). Find the accelaration at the

More information

Not for reproduction

Not for reproduction x=a GRAPHING CALCULATORS AND COMPUTERS (a, d ) y=d (b, d ) (a, c ) y=c (b, c) (a) _, by _, 4 x=b FIGURE 1 The viewing rectangle a, b by c, d _4 4 In this section we assume that you have access to a graphing

More information

Double Integration: Non-Rectangular Domains

Double Integration: Non-Rectangular Domains Double Integration: Non-Rectangular Domains Thomas Banchoff and Associates June 18, 2003 1 Introduction In calculus of one variable, all domains are intervals which are subsets of the line. In calculus

More information

2. Metric and Topological Spaces

2. Metric and Topological Spaces 2 Metric and Topological Spaces Topology begins where sets are implemented with some cohesive properties enabling one to define continuity Solomon Lefschetz In order to forge a language of continuity,

More information

Calculus II (Math 122) Final Exam, 11 December 2013

Calculus II (Math 122) Final Exam, 11 December 2013 Name ID number Sections B Calculus II (Math 122) Final Exam, 11 December 2013 This is a closed book exam. Notes and calculators are not allowed. A table of trigonometric identities is attached. To receive

More information

UNIVERSITY OF CALIFORNIA COLLEGE OF ENGINEERING

UNIVERSITY OF CALIFORNIA COLLEGE OF ENGINEERING UNIVERSITY OF CALIFORNIA COLLEGE OF ENGINEERING E7: INTRODUCTION TO COMPUTER PROGRAMMING FOR SCIENTISTS AND ENGINEERS Professor Raja Sengupta Spring 2010 Second Midterm Exam April 14, 2010 [30 points ~

More information

4.2 Graphing Inverse Trigonometric Functions

4.2 Graphing Inverse Trigonometric Functions 4.2 Graphing Inverse Trigonometric Functions Learning Objectives Understand the meaning of restricted domain as it applies to the inverses of the six trigonometric functions. Apply the domain, range and

More information

Interpolation. Chapter Information from Data

Interpolation. Chapter Information from Data Chapter 5 Interpolation 5. Information from Data The topic of this chapter is interpolation, which relates to passing a curve through a set of data points. To put this in context, extracting information

More information

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability) MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability) Last modified: September 16, 2004 Reference: Apostol, Calculus, Vol. 2, section 13.19 (attached). The aim

More information

60 2 Convex sets. {x a T x b} {x ã T x b}

60 2 Convex sets. {x a T x b} {x ã T x b} 60 2 Convex sets Exercises Definition of convexity 21 Let C R n be a convex set, with x 1,, x k C, and let θ 1,, θ k R satisfy θ i 0, θ 1 + + θ k = 1 Show that θ 1x 1 + + θ k x k C (The definition of convexity

More information

1. In this problem we use Monte Carlo integration to approximate the area of a circle of radius, R = 1.

1. In this problem we use Monte Carlo integration to approximate the area of a circle of radius, R = 1. 1. In this problem we use Monte Carlo integration to approximate the area of a circle of radius, R = 1. A. For method 1, the idea is to conduct a binomial experiment using the random number generator:

More information

Quadratic Equations over Matrices over the Quaternions. By Diana Oliff Mentor: Professor Robert Wilson

Quadratic Equations over Matrices over the Quaternions. By Diana Oliff Mentor: Professor Robert Wilson Quadratic Equations over Matrices over the Quaternions By Diana Oliff Mentor: Professor Robert Wilson Fields A field consists of a set of objects S and two operations on this set. We will call these operations

More information

Ordinary differential equations solving methods

Ordinary differential equations solving methods Radim Hošek, A07237 radhost@students.zcu.cz Ordinary differential equations solving methods Problem: y = y2 (1) y = x y (2) y = sin ( + y 2 ) (3) Where it is possible we try to solve the equations analytically,

More information

MA651 Topology. Lecture 4. Topological spaces 2

MA651 Topology. Lecture 4. Topological spaces 2 MA651 Topology. Lecture 4. Topological spaces 2 This text is based on the following books: Linear Algebra and Analysis by Marc Zamansky Topology by James Dugundgji Fundamental concepts of topology by Peter

More information

Sorting. There exist sorting algorithms which have shown to be more efficient in practice.

Sorting. There exist sorting algorithms which have shown to be more efficient in practice. Sorting Next to storing and retrieving data, sorting of data is one of the more common algorithmic tasks, with many different ways to perform it. Whenever we perform a web search and/or view statistics

More information

Solution Methods Numerical Algorithms

Solution Methods Numerical Algorithms Solution Methods Numerical Algorithms Evelien van der Hurk DTU Managment Engineering Class Exercises From Last Time 2 DTU Management Engineering 42111: Static and Dynamic Optimization (6) 09/10/2017 Class

More information

Section 4: Extreme Values & Lagrange Multipliers.

Section 4: Extreme Values & Lagrange Multipliers. Section 4: Extreme Values & Lagrange Multipliers. Compiled by Chris Tisdell S1: Motivation S2: What are local maxima & minima? S3: What is a critical point? S4: Second derivative test S5: Maxima and Minima

More information

Locally convex topological vector spaces

Locally convex topological vector spaces Chapter 4 Locally convex topological vector spaces 4.1 Definition by neighbourhoods Let us start this section by briefly recalling some basic properties of convex subsets of a vector space over K (where

More information

CCNY Math Review Chapter 2: Functions

CCNY Math Review Chapter 2: Functions CCN Math Review Chapter : Functions Section.1: Functions.1.1: How functions are used.1.: Methods for defining functions.1.3: The graph of a function.1.: Domain and range.1.5: Relations, functions, and

More information

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs 15.082J and 6.855J Lagrangian Relaxation 2 Algorithms Application to LPs 1 The Constrained Shortest Path Problem (1,10) 2 (1,1) 4 (2,3) (1,7) 1 (10,3) (1,2) (10,1) (5,7) 3 (12,3) 5 (2,2) 6 Find the shortest

More information

Euler s Method for Approximating Solution Curves

Euler s Method for Approximating Solution Curves Euler s Method for Approximating Solution Curves As you may have begun to suspect at this point, time constraints will allow us to learn only a few of the many known methods for solving differential equations.

More information

2.9 Linear Approximations and Differentials

2.9 Linear Approximations and Differentials 2.9 Linear Approximations and Differentials 2.9.1 Linear Approximation Consider the following graph, Recall that this is the tangent line at x = a. We had the following definition, f (a) = lim x a f(x)

More information

22. LECTURE 22. I can define critical points. I know the difference between local and absolute minimums/maximums.

22. LECTURE 22. I can define critical points. I know the difference between local and absolute minimums/maximums. . LECTURE Objectives I can define critical points. I know the difference between local and absolute minimums/maximums. In many physical problems, we re interested in finding the values (x, y) that maximize

More information

EXAMPLE. 1. Enter y = x 2 + 8x + 9.

EXAMPLE. 1. Enter y = x 2 + 8x + 9. VI. FINDING INTERCEPTS OF GRAPHS As we have seen, TRACE allows us to find a specific point on the graph. Thus TRACE can be used to solve a number of important problems in algebra. For example, it can be

More information