lecture23

# lecture23 - Jim Lambers MAT 460/560 Fall Semester 2009-10...

This preview shows pages 1–3. Sign up to view the full content.

Jim Lambers MAT 460/560 Fall Semester 2009-10 Lecture 23 Notes These notes correspond to Section 4.1 in the text. Numerical Di±erentiation We now discuss the other fundamental problem from calculus that frequently arises in scienti±c applications, the problem of computing the derivative of a given function f ( x ). Finite Di±erence Approximations Recall that the derivative of f ( x ) at a point x 0 , denoted f 0 ( x 0 ), is de±ned by f 0 ( x 0 ) = lim h ! 0 f ( x 0 + h ) ± f ( x 0 ) h : This de±nition suggests a method for approximating f 0 ( x 0 ). If we choose h to be a small positive constant, then f 0 ( x 0 ) ² f ( x 0 + h ) ± f ( x 0 ) h : This approximation is called the forward di±erence formula . To estimate the accuracy of this approximation, we note that if f 00 ( x ) exists on [ x 0 ;x 0 + h ], then, by Taylor’s Theorem, f ( x 0 + h ) = f ( x 0 )+ f 0 ( x 0 ) h + f 00 ( ± ) h 2 = 2 ; where ± 2 [ x 0 ;x 0 + h ] : Solving for f 0 ( x 0 ), we obtain f 0 ( x 0 ) = f ( x 0 + h ) ± f ( x 0 ) h + f 00 ( ± ) 2 h; so the error in the forward di²erence formula is O ( h ). We say that this formula is ²rst-order accurate . The forward-di²erence formula is called a ²nite di±erence approximation to f 0 ( x 0 ), because it approximates f 0 ( x ) using values of f ( x ) at points that have a small, but ±nite, distance between them, as opposed to the de±nition of the derivative, that takes a limit and therefore computes the derivative using an \in±nitely small" value of h . The forward-di²erence formula, however, is just one example of a ±nite di²erence approximation. If we replace h by ± h in the forward-di²erence formula, where h is still positive, we obtain the backward-di±erence formula f 0 ( x 0 ) ² f ( x 0 ) ± f ( x 0 ± h ) h : Like the forward-di²erence formula, the backward di²erence formula is ±rst-order accurate. 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
If we average these two approximations, we obtain the centered-di±erence formula f 0 ( x 0 ) ± f ( x 0 + h ) ² f ( x 0 ² h ) 2 h : To determine the accuracy of this approximation, we assume that f 000 ( x ) exists on the interval [ x 0 ² h;x 0 + h ], and then apply Taylor’s Theorem again to obtain f ( x 0 + h ) = f ( x 0 ) + f 0 ( x 0 ) h + f 00 ( x 0 ) 2 h 2 + f 000 ( ± + ) 6 h 3 ; f ( x 0 ² h ) = f ( x 0 ) ² f 0 ( x 0 ) h + f 00 ( x 0 ) 2 h 2 ² f 000 ( ± ± ) 6 h 3 ; where ± + 2 [ x 0 ;x 0 + h ] and ± ± 2 [ x 0 ² h;x 0 ]. Subtracting the second equation from the ±rst and solving for f 0 ( x 0 ) yields f 0 ( x 0 ) = f ( x 0 + h ) ² f ( x 0 ² h ) 2 h ² f 000 ( ± + ) + f 000 ( ± ± ) 12 h 2 : By the Intermediate Value Theorem, f 000 ( x ) must assume every value between f 000 ( ± ± ) and f 000 ( ± + ) on the interval ( ± ± + ), including the average of these two values. Therefore, we can simplify this equation to f 0 ( x 0 ) = f ( x 0 + h ) ² f ( x 0 ² h ) 2 h ² f 000 ( ± ) 6 h 2 ; where ± 2 [ x 0 ² h;x 0 + h ]. We conclude that the centered-di²erence formula is
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/15/2012 for the course ECON 101 taught by Professor N/a during the Fall '11 term at Middlesex CC.

### Page1 / 6

lecture23 - Jim Lambers MAT 460/560 Fall Semester 2009-10...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online