Numerical Differentiation & Integration. Numerical Differentiation II

Similar documents
Numerical Differentiation & Integration. Numerical Differentiation III

Solutions of Equations in One Variable. Newton s Method

Interpolation & Polynomial Approximation. Hermite Interpolation I

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

Direct Methods for Solving Linear Systems. Matrix Factorization

Intermediate Value Theorem

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

We say that the function f obtains a maximum value provided that there. We say that the function f obtains a minimum value provided that there

Continuity. To handle complicated functions, particularly those for which we have a reasonable formula or formulas, we need a more precise definition.

( ) = 0. ( ) does not exist. 4.1 Maximum and Minimum Values Assigned videos: , , , DEFINITION Critical number

Chapter 1 Mathematical Preliminaries and Error Analysis

Taylor and Maclaurin Series. Copyright Cengage Learning. All rights reserved.

11.11 Applications of Taylor Polynomials. Copyright Cengage Learning. All rights reserved.

Chapter 3: Root Finding. September 26, 2005

9.5. Polynomial and Rational Inequalities. Objectives. Solve quadratic inequalities. Solve polynomial inequalities of degree 3 or greater.

1 Lecture 25: Extreme values

4 Integration. Copyright Cengage Learning. All rights reserved.

10/9/10. The line x = a is a vertical asymptote of the graph of a function y = f(x) if either. Definitions and Theorems.

Infinite Series. Copyright Cengage Learning. All rights reserved.

The Intermediate Value Theorem If a function f (x) is continuous in the closed interval [ a,b] then [ ]

Homework for Section 1.4, Continuity and One sided Limits. Study 1.4, # 1 21, 27, 31, 37 41, 45 53, 61, 69, 87, 91, 93. Class Notes: Prof. G.

Midterm Review. Igor Yanovsky (Math 151A TA)

Integration. Antiderivatives and Indefinite Integration 3/9/2015. Copyright Cengage Learning. All rights reserved.

Section 9.7 and 9.10: Taylor Polynomials and Approximations/Taylor and Maclaurin Series

Lesson 59 Rolle s Theorem and the Mean Value Theorem

MA 123 (Calculus I) Lecture 6: September 19, 2016 Section A3. Professor Joana Amorim,

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

INTERMEDIATE VALUE THEOREM

An Improved Hybrid Algorithm to Bisection Method and Newton-Raphson Method

Induction, sequences, limits and continuity

8.8 Applications of Taylor Polynomials

Polynomial functions right- and left-hand behavior (end behavior):

Mean Value Theorem. Increasing Functions Extreme Values of Functions Rolle s Theorem Mean Value Theorem FAQ. Index

A secant line is a line drawn through two points on a curve. The Mean Value Theorem relates the slope of a secant line to the slope of a tangent line.

Maximum and Minimum Values (4.2)

Chapter 2. Polynomial and Rational Functions. 2.3 Polynomial Functions and Their Graphs. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

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

Calculus The Mean Value Theorem October 22, 2018

Caculus 221. Possible questions for Exam II. March 19, 2002

Consequences of Continuity and Differentiability

MATH 409 Advanced Calculus I Lecture 16: Mean value theorem. Taylor s formula.

Calculus I. 1. Limits and Continuity

1.10 Continuity Brian E. Veitch

x y More precisely, this equation means that given any ε > 0, there exists some δ > 0 such that

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,

Math Numerical Analysis

Romberg Integration and Gaussian Quadrature

Chap. 19: Numerical Differentiation

2.3 Differentiation Formulas. Copyright Cengage Learning. All rights reserved.

Families of Functions, Taylor Polynomials, l Hopital s

The Mean Value Theorem and the Extended Mean Value Theorem

Slope Fields and Differential Equations. Copyright Cengage Learning. All rights reserved.

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods

Math 141: Section 4.1 Extreme Values of Functions - Notes

Numerical Integration

Euler s Method, cont d

Section 4.2: The Mean Value Theorem

CHAPTER 7 FUNCTIONS. Alessandro Artale UniBZ - artale/

Improving analytic function approximation by minimizing square error of Taylor polynomial

2.4 The Precise Definition of a Limit

1.7 Inequalities. Copyright Cengage Learning. All rights reserved.

Study 5.3 # , 157; 5.2 # 111, 113

Solutions Final Exam May. 14, 2014

Core Mathematics 2 Algebra

Maximum and Minimum Values section 4.1

MATH 151 Engineering Mathematics I

Root Finding For NonLinear Equations Bisection Method

Simpson s Rule. f(x)dx = h 3 [f(x 0) + 4f(x 1 ) + f(x 2 )] h2 90 f (4) (ɛ)

Chapter 2 Polynomial and Rational Functions

Math 1120 Calculus, sections 3 and 10 Test 1

3.2. Polynomial Functions and Their Graphs. Copyright Cengage Learning. All rights reserved.

Test 3 Review. y f(a) = f (a)(x a) y = f (a)(x a) + f(a) L(x) = f (a)(x a) + f(a)

INTERMEDIATE VALUE THEOREM

Announcements. Topics: Homework: - sections , 6.1 (extreme values) * Read these sections and study solved examples in your textbook!

Interpolating Accuracy without underlying f (x)

MT804 Analysis Homework II

Consistency and Convergence

3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.

Absolute Value Equations and Inequalities. Use the distance definition of absolute value.

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

Prerequisites. Copyright Cengage Learning. All rights reserved.

5.3 SOLVING TRIGONOMETRIC EQUATIONS

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn

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

Jim Lambers MAT 460 Fall Semester Lecture 2 Notes

Scientific Computing: An Introductory Survey

Infinite Limits. Infinite Limits. Infinite Limits. Previously, we discussed the limits of rational functions with the indeterminate form 0/0.

MATH20101 Real Analysis, Exam Solutions and Feedback. 2013\14

Continuity and One-Sided Limits. By Tuesday J. Johnson

O.K. But what if the chicken didn t have access to a teleporter.

c n (x a) n c 0 c 1 (x a) c 2 (x a) 2...

Outline. 1 The Role of Functions. 2 Polynomial Functions. 3 Power Functions. 4 Rational Functions. 5 Exponential & Logarithmic Functions

CS 257: Numerical Methods

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

[ ] with end points at ( a,f(a) ) and b,f(b)

Announcements. Topics: Homework:

7.0: Minimax approximations

Chapter 5: Numerical Integration and Differentiation

5 Finding roots of equations

Transcription:

Numerical Differentiation & Integration Numerical Differentiation II Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011 Brooks/Cole, Cengage Learning

Outline 1 Application of the 3-Point and 5-Point Formulae 2 Numerical Approximations to Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 2 / 21

Outline 1 Application of the 3-Point and 5-Point Formulae 2 Numerical Approximations to Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 3 / 21

Numerical Differentiation: Application of the Formulae Example Values for f(x) = xe x are given in the following table: x 1.8 1.9 2.0 2.1 2.2 f(x) 10.889365 12.703199 14.778112 17.148957 19.855030 Use all the applicable three-point and five-point formulas to approximate f (2.0). Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 4 / 21

Numerical Differentiation: Application of the Formulae Solution (1/4) The data in the table permit us to find four different three-point approximations. See 3-Point Endpoint & Midpoint Formulae We can use the endpoint formula with h = 0.1 or with h = 0.1, and we can use the midpoint formula with h = 0.1 or with h = 0.2. Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 5 / 21

Numerical Differentiation: Application of the Formulae Solution (2/4) Using the 3-point endpoint formula with h = 0.1 gives 1 [ 3f(2.0) + 4f(2.1) f(2.2] 0.2 = 5[ 3(14.778112) + 4(17.148957) 19.855030)] = 22.032310 and with h = 0.1 gives 22.054525. Using the 3-point midpoint formula with h = 0.1 gives 1 [f(2.1) f(1.9] = 5(17.148957 12.7703199) = 22.228790 0.2 and with h = 0.2 gives 22.414163. Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 6 / 21

Numerical Differentiation: Application of the Formulae Solution (3/4) The only five-point formula for which the table gives sufficient data is the midpoint formula See Formula with h = 0.1. This gives 1 [f(1.8) 8f(1.9) + 8f(2.1) f(2.2)] 1.2 = 1 [10.889365 8(12.703199) + 8(17.148957) 19.855030] 1.2 =22.166999 If we had no other information, we would accept the five-point midpoint approximation using h = 0.1 as the most accurate, and expect the true value to be between that approximation and the three-point mid-point approximation, that is in the interval [22.166, 22.229]. Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 7 / 21

Numerical Differentiation: Application of the Formulae Solution (4/4) The true value in this case is f (2.0) = (2 + 1)e 2 = 22.167168, so the approximation errors are actually: Method h Approximation Error Three-point endpoint 0.1 1.35 10 1 Three-point endpoint 0.1 1.13 10 1 Three-point midpoint 0.2 2.47 10 1 Three-point midpoint 0.1 6.16 10 2 Five-point midpoint 0.1 1.69 10 4 Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 8 / 21

Outline 1 Application of the 3-Point and 5-Point Formulae 2 Numerical Approximations to Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 9 / 21

Numerical Approximations to Illustrative Method of Construction Expand a function f in a third Taylor polynomial about a point x 0 and evaluate at x 0 + h and x 0 h. Then f(x 0 + h) = f(x 0 ) + f (x 0 )h + 1 2 f (x 0 )h 2 + 1 6 f (x 0 )h 3 + 1 24 f (4) (ξ 1 )h 4 and f(x 0 h) = f(x 0 ) f (x 0 )h + 1 2 f (x 0 )h 2 1 6 f (x 0 )h 3 + 1 24 f (4) (ξ 1 )h 4 where x 0 h < ξ 1 < x 0 < ξ 1 < x 0 + h. Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 10 / 21

Numerical Approximations to f(x 0 + h) = f(x 0 ) + f (x 0 )h + 1 2 f (x 0 )h 2 + 1 6 f (x 0 )h 3 + 1 24 f (4) (ξ 1 )h 4 f(x 0 h) = f(x 0 ) f (x 0 )h + 1 2 f (x 0 )h 2 1 6 f (x 0 )h 3 + 1 24 f (4) (ξ 1 )h 4 Illustrative Method of Construction (Cont d) If we add these equations, the terms involving f (x 0 ) and f (x 0 ) cancel, so f(x 0 + h) + f(x 0 h) = 2f(x 0 ) + f (x 0 )h 2 + 1 24 [f (4) (ξ 1 ) + f (4) (ξ 1 )]h 4 Solving this equation for f (x 0 ) gives f (x 0 ) = 1 h 2[f(x 0 h) 2f(x 0 ) + f(x 0 + h)] h2 24 [f (4) (ξ 1 ) + f (4) (ξ 1 )] Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 11 / 21

Numerical Approximations to f (x 0 ) = 1 h 2[f(x 0 h) 2f(x 0 ) + f(x 0 + h)] h2 24 [f (4) (ξ 1 ) + f (4) (ξ 1 )] Illustrative Method of Construction (Cont d) Suppose f (4) is continuous on [x 0 h, x 0 + h]. Since 1 2 [f (4) (ξ 1 ) + f (4) (ξ 1 )] is between f (4) (ξ 1 ) and f (4) (ξ 1 ), the Intermediate Value Theorem Theorem implies that a number ξ exists between ξ 1 and ξ 1, and hence in (x 0 h, x 0 + h), with f (4) (ξ) = 1 2 [ ] f (4) (ξ 1 ) + f (4) (ξ 1 ) This permits us to rewrite the formula in its final form: Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 12 / 21

Numerical Approximations to f (x 0 ) = 1 h 2[f(x 0 h) 2f(x 0 ) + f(x 0 + h)] h2 24 [f (4) (ξ 1 ) + f (4) (ξ 1 )] Second Derivative Midpoint Formula f (x 0 ) = 1 h 2[f(x 0 h) 2f(x 0 ) + f(x 0 + h)] h2 12 f (4) (ξ) for some ξ, where x 0 h < ξ < x 0 + h. Note: If f (4) is continuous on [x 0 h, x 0 + h], then it is also bounded, and the approximation is O(h 2 ). Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 13 / 21

Numerical Approximations to Example (Second Derivative Midpoint Formula) Values for f(x) = xe x are given in the following table: x 1.8 1.9 2.0 2.1 2.2 f(x) 10.889365 12.703199 14.778112 17.148957 19.855030 Use the second derivative midpoint formula Formula approximate f (2.0). Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 14 / 21

Numerical Approximations to Example (Second Derivative Midpoint Formula): Cont d The data permits us to determine two approximations for f (2.0). Using the formula with h = 0.1 gives 1 [f(1.9) 2f(2.0) + f(2.1)] 0.01 = 100[12.703199 2(14.778112) + 17.148957] = 29.593200 and using the formula with h = 0.2 gives 1 [f(1.8) 2f(2.0) + f(2.2)] 0.04 = 25[10.889365 2(14.778112) + 19.855030] = 29.704275 The exact value is f (2.0) = 29.556224. Hence the actual errors are 3.70 10 2 and 1.48 10 1, respectively. Numerical Analysis (Chapter 4) Numerical Differentiation II R L Burden & J D Faires 15 / 21

Questions?

Reference Material

Intermediate Value Theorem If f C[a, b] and K is any number between f(a) and f(b), then there exists a number c (a, b) for which f(c) = K. y f (a) K f (b) (a, f (a)) y 5 f (x) (b, f (b)) a c b x (The diagram shows one of 3 possibilities for this function and interval.) Return to Numerical Approximations to

Numerical Differentiation Formulae Three-Point Endpoint Formula f (x 0 ) = 1 2h [ 3f(x 0) + 4f(x 0 + h) f(x 0 + 2h)] + h2 3 f (3) (ξ 0 ) where ξ 0 lies between x 0 and x 0 + 2h. Three-Point Midpoint Formula f (x 0 ) = 1 2h [f(x 0 + h) f(x 0 h)] h2 6 f (3) (ξ 1 ) where ξ 1 lies between x 0 h and x 0 + h. Return to 3-Point Calculations

Numerical Differentiation Formulae Five-Point Midpoint Formula f (x 0 ) = 1 12h [f(x 0 2h) 8f(x 0 h) + 8f(x 0 + h) f(x 0 + 2h)] where ξ lies between x 0 2h and x 0 + 2h. Five-Point Endpoint Formula f (x 0 ) = where ξ lies between x 0 and x 0 + 4h. + h4 30 f (5) (ξ) 1 12h [ 25f(x 0) + 48f(x 0 + h) 36f(x 0 + 2h) + 16f(x 0 + 3h) 3f(x 0 + 4h)] + h4 5 f (5) (ξ) Return to 5-Point Calculations

Numerical Differentiation Formulae Second Derivative Midpoint Formula f (x 0 ) = 1 h 2[f(x 0 h) 2f(x 0 ) + f(x 0 + h)] h2 12 f (4) (ξ) for some ξ, where x 0 h < ξ < x 0 + h. Return to Example on the Second Derivative Midpoint Formula