MATH 174: NUMERICAL ANALYSIS I 1st Sem AY2018-2019 Math Division, IMSP, UPLB
Numerical Differentiation You can use interpolation or curve fitting but beware of POLYNOMIAL WIGGLES!!!
Numerical Differentiation REVIEW Definition of derivative of f at x : provided that the limit exists.
Numerical Differentiation REVIEW From Taylor’s Theorem: If f єC2 then where 𝝃 is between x and x+h. The following difference formulas can be derived using Taylor’s Theorem.
Numerical Differentiation 1 Numerical Differentiation FINITE DIFFERENCE FORMULAS (Discretization) Two-point forward difference formula (first-order method):
Numerical Differentiation 1 Numerical Differentiation FINITE DIFFERENCE FORMULAS Two-point forward difference formula (first-order method): The error is proportional to h. As h0, the error0. Notice that if we divide h by 2, then the error is also cut in half!!!
Numerical Differentiation P O L A Numerical Differentiation Notice that formulae 1 is just the slope of the interpolating line from the considered points. Forward Difference Backward Difference Centered Difference (See Formula 2)
Numerical Differentiation Forward Difference
Numerical Differentiation Backward Difference
Numerical Differentiation Centered Difference
Numerical Differentiation Minimize h
Numerical Differentiation 2 Numerical Differentiation FINITE DIFFERENCE FORMULAS 3-point centered difference formula (second-order method): If f єC3 where
Numerical Differentiation 2 Numerical Differentiation FINITE DIFFERENCE FORMULAS 3-point centered difference formula (second-order method): (reduces to 2-point) where Notice that h0 faster than the first-order method.
Numerical Differentiation S Numerical Differentiation FINITE DIFFERENCE FORMULAS Other Formulas: etc… etc… etc…
Numerical Differentiation 2nd D E R I V A T e Numerical Differentiation FINITE DIFFERENCE FORMULAS 3-point centered difference formula (second-order method): where
Numerical Differentiation 3rd D E R I V A T e Numerical Differentiation FINITE DIFFERENCE FORMULAS 3-point centered difference formula (second-order method):
Numerical Differentiation 4th D E R I V A T e Numerical Differentiation FINITE DIFFERENCE FORMULAS 3-point centered difference formula (second-order method):
Numerical Differentiation X R C I S Numerical Differentiation Solve for f’(5) and f”(5), where f(x)=sin(x) Solve for the (instantaneous) rate of change at x=3, given the following data: x y 1 23 2 34 3 21 4 25
Numerical Differentiation Problem arises: As h decreases, round-off error becomes a problem. Finite difference formulas for numerical differentiation is ill-conditioned. We need to intelligently choose a value for h.
Numerical Differentiation RICHARDSON EXTRAPOLATION Creating higher-order approximation from existing formula F(h) Here, f’(x)=Q. The new formula will have order from O(hn) to at least O(hn+1).
Numerical Differentiation RICHARDSON EXTRAPOLATION Example: Increase the order of the 3-point Centered Difference Formula: Hence, n=2
Numerical Differentiation RICHARDSON EXTRAPOLATION By substitution,
Numerical Differentiation RICHARDSON EXTRAPOLATION Therefore, the new formula is The order of this formula is at least 3 (actually, it is of order 4). What do you think is the problem here?