1 / 8

Numerical Differentiation

Numerical Differentiation. Forward, Backward, Central Differences Lagrange Estimation. f(x). y i +1. y i. y i -1. x i +1. x i -1. x i. Numerical Derivatives

nen
Télécharger la présentation

Numerical Differentiation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Differentiation Forward, Backward, Central Differences Lagrange Estimation

  2. f(x) yi+1 yi yi-1 xi+1 xi-1 xi Numerical Derivatives In this section we will see how to estimate the value of a derivative based on knowing only certain function values. This is typical for many applications not to know the exact function you are dealing with but rather a set of values for it. The methods that are used tend to separate themselves into methods for values of the independent variables that are equally spaced and those that are not. Equally Spaced Data Points If we consider three values for x: xi-1, xi, and xi+1 with xi-1 < xi < xi+1 we can form the slopes of various secant lines with the corresponding y values yi-1=f(xi-1), yi=f(xi) and yi+1=f(xi+1) to estimate the derivative. Backward Differences Forward Differences

  3. f(x) yi+1 yi yi-1 xi+1 xi-1 xi Central Difference If we assume the data are evenly spaced so that xi-xi-1 = h = xi+1-xi the formulas below become: Central Difference Backward Difference Forward Difference If you look in each of these formulas we are only using two pieces of information. This means we are probably not as accurate as we can be. What if we would like to estimate the value of the derivative at xi-1 but make use of all three data points?

  4. Three-Point Difference Formulas for Derivatives (Evenly spaced points) The two formulas below estimate the value of the derivatives at the endpoints making use of all three points most often giving a more accurate value for the derivative. Three-Point Forward Difference Three-Point Backward Difference Both of these formulas come from writing out the Lagrange Interpolating polynomial for these three points, taking the derivative then plugging in the value you want.

  5. Consider the data being equally spaced by h:

  6. Unequally-Spaced Data Points In many situations the data points are not equally spaced. To estimate the value of the derivative we use the Lagrange Polynomial just like before. In this situation notice that the derivative can be estimated at any point. Higher Order Derivatives All the previous formulas we have derived are to estimate the first derivative. What if we want to estimate the second derivative?

  7. Second derivative estimates rely on writing out the Taylor Series for a modified version of the function f(x). We write out the Taylor Series for f(x+h) treating x as a constant and h as the variable and expanding at the point 0. add !

  8. Example: Find estimates for the derivative with the data set given to the right. We notice the x values are evenly spaced. Two-Point Estimates: Central Forward Backward Three Point Estimates: Forward Second Derivative (h=2) Backward

More Related