MA3457/CS4033: Numerical Methods for Calculus and Differential Equations

Similar documents
Curve Fitting and Interpolation

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

CHAPTER Order points and then develop a divided difference table:

Math 365 Homework 5 Due April 6, 2018 Grady Wright

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

BSM510 Numerical Analysis

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

Core Mathematics 2 Algebra

Applied Numerical Analysis Quiz #2

Applied Linear Algebra in Geoscience Using MATLAB

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

Introduction to MATLAB

CS 323: Numerical Analysis and Computing

Model-building and parameter estimation

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)

Curve Fitting. Least Squares Regression. Linear Regression

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

Numerical Algorithms. IE 496 Lecture 20

5.3. Polynomials and Polynomial Functions

SECTION 7: CURVE FITTING. MAE 4020/5020 Numerical Methods with MATLAB

Newton s Method and Linear Approximations

Applied Linear Algebra in Geoscience Using MATLAB

Additional exercises with Numerieke Analyse

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Math Numerical Analysis Mid-Term Test Solutions

Precalculus. How to do with no calculator 1a)

ENGG1811 Computing for Engineers Week 11 Part B Matlab: Linear Indexing; Linear Equations, Curve Fitting, Short Circuit Evaluation

Linear, Quadratic, and Cubic Forms over the Binary Field

MS 2001: Test 1 B Solutions

Chapter 1 Mathematical Preliminaries and Error Analysis

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

Lab #8: The Unbalanced Wheel

CS 257: Numerical Methods

One-Sided Difference Formula for the First Derivative

Quantitative Techniques (Finance) 203. Polynomial Functions

Math Numerical Analysis

Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points

Hermite Interpolation

Least Squares. Tom Lyche. October 26, Centre of Mathematics for Applications, Department of Informatics, University of Oslo

2-2: Evaluate and Graph Polynomial Functions

Announcements. Topics: Homework:

Taylor and Maclaurin Series. Approximating functions using Polynomials.

Newton s Method and Linear Approximations

ESS 265 Spring Quarter 2005 Time Series Analysis: Linear Regression

AMTH142 Lecture 16. Least Squares

Salinity Calibration fit with Matlab

Preliminary Examination in Numerical Analysis

Taylor and Maclaurin Series. Approximating functions using Polynomials.

MATH 350: Introduction to Computational Mathematics

Families of Functions, Taylor Polynomials, l Hopital s

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

Newton s Method and Linear Approximations 10/19/2011

Module 5 : Linear and Quadratic Approximations, Error Estimates, Taylor's Theorem, Newton and Picard Methods

Applied Linear Algebra in Geoscience Using MATLAB

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

Math 10b Ch. 8 Reading 1: Introduction to Taylor Polynomials

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

10.34: Numerical Methods Applied to Chemical Engineering. Lecture 2: More basics of linear algebra Matrix norms, Condition number

Physics 331 Introduction to Numerical Techniques in Physics

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Scientific Computing: An Introductory Survey

Linear Least-Squares Data Fitting

CS 323: Numerical Analysis and Computing

Linear Algebra Massoud Malek

Numerical Differentiation & Integration. Numerical Differentiation II

Taylor Series and Numerical Approximations

Chapter III. Stability of Linear Systems

The answer in each case is the error in evaluating the taylor series for ln(1 x) for x = which is 6.9.

Basic Linear Algebra in MATLAB

Least-squares data fitting

Announcements. Topics: Homework:

8.7 Taylor s Inequality Math 2300 Section 005 Calculus II. f(x) = ln(1 + x) f(0) = 0

Section September 6, If n = 3, 4, 5,..., the polynomial is called a cubic, quartic, quintic, etc.

1 Lecture 8: Interpolating polynomials.

Hilbert Spaces: Infinite-Dimensional Vector Spaces

AMSC/CMSC 466 Problem set 3

Numerical Marine Hydrodynamics

Chapter 3: Root Finding. September 26, 2005

Revision Materials. Functions, Quadratics & Polynomials Skills Builder

Lecture 28 The Main Sources of Error

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lecture 07: Interpolation

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

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

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

1.3 Limits and Continuity

Empirical Models Interpolation Polynomial Models

Section Taylor and Maclaurin Series

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes

Economics 204 Summer/Fall 2011 Lecture 11 Monday August 8, f(x + h) (f(x) + ah) = a = 0 = 0. f(x + h) (f(x) + T x (h))

Curve Fitting. Objectives

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

Math 304 (Spring 2010) - Lecture 2

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Interpolation and Polynomial Approximation I

6x 2 8x + 5 ) = 12x 8

Lecture 3: Function Spaces I Finite Elements Modeling. Bruno Lévy

Chapter 1 Mathematical Preliminaries and Error Analysis

MA102: Multivariable Calculus

Transcription:

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations Course Materials P A R T II B 14 2014-2015 1

2. APPROXIMATION CLASS 9 Approximation Key Idea Function approximation is closely related to the idea of function interpolation. In F.A., we do not require the approximating function to match the given data exactly. This helps avoid some of the difficulties observed with interpolation: when trying to match a large amount of data, when working with noisy data (or data containing error in measurements), etc. There are many applications in which: a functional form is known and the best function of that form (accommodating the data point) is required. In situations like this, approximation is an ultimate choice. 2

2. APPROXIMATION CLASS 9 Introductory Illustration Experimental Data: K value Equilibrium Constant of a Reaction vs Pressure Pressure: Pressure [0.635 1.035 1.435 1.835 2.235 2.635 3.035 3.435 3.835 4.235 4.635 5.035 5.435] K value: [ 7.5 5.58 4.35 3.55 2.97 2.53 2.2 1.93 1.7 1.46 1.28 1.11 1.0 ] Question: What function does represent this behavior? 3

2. APPROXIMATION Concept of the Method of Least Squares CLASS 9 The most common approach to best fit approximation is to minimize the sum of the squares of the differences between the data values and the values of the approximating function: Advantages in using the square of the differences (rather than the difference, or the absolute value of the difference, or some other measure of the error): positive differences do not cancel negative differences; differentiation is not difficult, and small differences become smaller and larger differences are magnified. 4

2. APPROXIMATION Linear Least Squares Approximation f (x) CLASS 9 Example Four Data Points f(x) = 0.9x + 1.4 x 5

2. APPROXIMATION CLASS 9 Linear LS Approximation MATLAB Script B 13 6

2. APPROXIMATION Linear Least Squares Approximation f (x) CLASS 10 Example Four Data Points f(x) = 1.044x + 0.9352 f(x) = 0.9x + 1.4 x 7

2. APPROXIMATION CLASS 10 Quadratic LS Approximation MATLAB Script B 13 8

2. APPROXIMATION CLASS 10 Cubic LS Approximation The Normal Equations to Determine the Coefficients for the Best Fit Cubic Function 9

2. APPROXIMATION CLASS 10 MATLAB Function polyfit Built-in MATLAB function polyfit finds the coefficients of the polynomial of a specified n-th degree that best fits a set of data, in a least squares sense: > [p, S] = polyfit(x, y, n) where x and y are vectors containing the data, and n is the degree of the polynomial desired. The function returns the coefficients of the polynomial in the vector p. The returned structure S can be used (with the function polyval ) to obtain error bound. 10

2. APPROXIMATION CLASS 11 Continuous LS Approximation f (x) x Quadratic approximation: Taylor polynomial: 11

2. APPROXIMATION CLASS 12 Continuous LSA & Matrix [P] This term ill-conditioned matrix is linked with the matrix condition number k(a) of a square matrix A defined as k(a) = A A -1 [P][z] = [q] In some applications, matrix [P] may be ill-conditioned. where. is any valid matrix norm. The condition number is a measure of stability or sensitivity of a matrix to numerical operations. Example of an ill-conditioned matrix: Hilbert Matrix, i.e., a matrix defined as H ij = 1/(i+j-1)). Matrices with condition numbers near 1 are said to be well-conditioned. Matrices with condition numbers much greater than one (such as around 10 5 for a 5x5 Hilbert matrix) are said to be ill-conditioned. 12