Topic 12.4_ Higher-Order Derivatives

  • Published on

  • View

  • Download


diff. equation


Topic 12.4: Higher-Order Derivatives[15-Aug-14 7:51:41 PM]Look for people, keywords, and in Google: Topic 12.4: Higher-Order Derivatives Introduction Notes Theory HOWTO Examples Engineering Error Questions Matlab Maple Given three or more equally-spaced points, we can find an interpolating polynomial passing through thosepoints, find the 2nd, 3rd, or even higher derivative of that polynomial, and evaluate the derivative at a pointto get an approximation of the derivative at that point.BackgroundUseful background for this topic includes:5. Interpolation13.1 Centred Divided-Difference FormulaeReferencesBradie, Section 6.2, Numerical Differentiation, Part II, p.443.Mathews, Section 6.2, Numerical Differentiation Formulas, p.339.Chapra, Section 23.1, High-accuracy Differentiation Formaulas, p.632.Interactive MapletA Differentiation Formula GeneratorTo generate the formula for higher derivatives, select 2nd, 3rd, etc. instead of 1st in the third drop-downbox.TheoryThe theory for finding the nth-order derivatives is the same as that for finding simple derivatives: Given asequence of equally spaced points (either around or preceding a given point x0), find the interpolatingpolynomial of the appropriate degree, differentiate the interpolating polynomial n times (instead of once) andevaluate that interpolating polynomial at the point.For the sake of completeness, we will list the centred and backward divided-difference formulae here. In eachcase, the format of Richardson extrapolation we found could be used to improve the approximations for theO(h2) formulae on this page.Centred Divided-Difference FormulaeFor each derivative, centred divided-difference formulae are O(h2) and O(h4), respectively.Second Derivatives (3 and 5 point interpolations)Third Derivatives (5 and 7 point interpolations)Fourth Derivatives (5 and 7 point interpolations)Fifth Derivatives (7 and 9 point interpolations)Backward Divided-Difference FormulaeFor each derivative, backward divided-difference formulae are O(h) and O(h2), respectively. Note that in allcases, the O(h) formula is equivalent to the corresponding O(h2) centred divided-difference formula, onlyshifted by h.Second Derivatives (3 and 4 point interpolations)Third Derivatives (4 and 5 point interpolations)Topic 12.4: Higher-Order Derivatives[15-Aug-14 7:51:41 PM]Fourth Derivatives (5 and 6 point interpolations)Fifth Derivatives (6 and 7 point interpolations)HOWTOProblemApproximate a higher derivative of a univariate function f(x) at a point x0. We will assume that we are givena sequence of points (xi, f(xi)) around the point of interest (either before or around). We will not look atiteration because the process of Richardson extrapolation converges significantly faster.AssumptionsWe need to assume the function has an nth derivative if we are to bound the error on our approximation.ToolsWe will use interpolation.ProcessIf we are to evaluate the second derivative at the point (xi, f(xi)) and have access to the two surroundingpoints, (xi 1, f(xi 1)) and (xi + 1, f(xi + 1)), then we may find the interpolating polynomial, differentiate ittwice, and evaluate that derivative at xi:This is simply another form of the formulawhere h is the distance between the points, that is, h = xi - xi 1.If we have access to two points on either side of xi, we can calculatewhere h = xi - xi 1.This is another form of the formula:We could perform the same operations with higher derivatives, however, it should be noted that to calculatethe nth derivative, we require at least n + 1 points.ExamplesExample 1Given the data points ..., 3.2, 3.3, 3.4, 3.5, 3.6, ... which measure the rotation of a satellite dish at points intime, with angles 1.05837 1.15775 1.25554 1.35078 1.44252, approximate the acceleration of the angle attime 3.4 using both the 2nd-order and 4th-order centred divided-difference formulae for the 2nd derivative.(1.35078 2 1.25554 + 1.15775)/0.12 = 0.255 and (-1.44252 + 16 1.35078 30 1.25554 +16 1.15775 1.05837)/(12 0.12) = 0.2550833333 .Thus, 0.25508333333 is the more accurate answer, but even the 2nd-order formula is reasonably close.EngineeringTo be completed.Error2nd-Order Centred Divided-Difference FormulaTo determine the error for the 2nd-order centred divided-difference formula for the second derivative, weneed only look at the two Taylor series approximations:Topic 12.4: Higher-Order Derivatives[15-Aug-14 7:51:41 PM]andAdd these two equations and transfer the 2f(x) to the left-hand side to getIf we divide both sides by h2 and make the approximation that:then we can rearrange the equation asThus, the error is O(h2).4th-Order Centred Divided-Difference FormulaA similar sum may be used to find the error of the 4th-order divided difference formula. If you add the linearcombination -f(x + 2h) + 8 f(x + h) - 8 f(x - h) + f(x - 2h) of the 5th-order Taylor series approximations,then, after dividing by 12h, we are left with the error term:If we divide through by -1/30 and factor out the h4, we getNow, examining the contents of the parentheses, we note that the coefficients 2/3 - 1/6 - 1/6 + 2/3 = 1, andtherefore, the contents of the parentheses is an approximation of the average of f(5)(x) on the interval [x -2h, x + 2h], and thus, we may approximate the error byThus, the error is O(h4).QuestionsQuestion 1Approximate the rate-of-change of the current at the midpoint of the incoming data ..., 7.2, 7.3, 7.4, 7.5,7.6, ... where the charge on a capacitor these times is 0.00242759 0.00241500 0.00240247 0.002390010.00237761.Answer: -0.000007 and -0.0000071667.MatlabIn Matlab, you would approximate the derivative numerically:>> ( sin( 1.7 ) - sin( 1.3 ) )/0.4which would approximate the actual derivative of cos(1.5).MapleMaple calculates derivatives symbolically:> diff( sin(x), x ); cos(x)For more help on the diff routine, enter:?diffCopyright 2005 by Douglas Wilhelm Harder. All rights reserved.Department of Electrical and Computer EngineeringUniversity of Waterloo200 University Avenue WestWaterloo, Ontario, Canada N2L 3G1+1 519 888 4567 12.4: Higher-Order Derivatives9oaWdoZXIvY29tcGxldGUuaHRtbAA=: search: searchterm: input4:


View more >