Download presentation
1
Derivatives and Differential Equations
2
Differentiation Differential change 4/21/2010
3
Derivative Definition
4/21/2010
4
Taylor Series 4/21/2010
5
Taylor Series Graphically
4/21/2010
6
Numerical Differentiation Based on Taylor Series
Forward finite-divided difference Backward finite-divided difference Centered finite-divided difference 4/21/2010
7
Forward Finite-Divided Difference Approximation
4/21/2010
8
Forward Finite-Difference
4/21/2010
9
Backward Finite-Divided Difference Approximation
4/21/2010
10
Backward Finite-Difference
4/21/2010
11
Centered Finite-Divided Difference Approximation
4/21/2010
12
Centered Finite-Difference
4/21/2010
13
Unequally Spaced Data One way to calculated derivatives of unequally spaced data is to determine a polynomial fit and take its derivative at a point. As an example, using a second-order Lagrange polynomial to fit three points and taking its derivative yields: 4/21/2010
14
Derivatives and Integrals for Data with Errors
Numerical differentiation amplifies data errors. Solution: fit a smooth, differentiable function to the data and take the derivative of the function. 4/21/2010
15
Numerical Differentiation with MATLAB
MATLAB has two built-in functions to help take derivatives, diff and gradient: diff(x) Returns the difference between adjacent elements in x. Not the same size as vector x. diff(y)./diff(x) Returns the difference between adjacent values in y divided by the corresponding difference in adjacent values of x 4/21/2010
16
Numerical Differentiation, function of a single variable
fx = gradient(f, h) Gradient can also be used to find partial derivatives for matrices: [fx, fy] = gradient(f, h) 4/21/2010
17
Numerical Differentiation, function of a two variables
To generate the components of a derivative of a function of two variables x, y use [fx, fy] = gradient(f, h) Where h scales the magnitude of vectors displayed 4/21/2010
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.