6 Numerical Differentiation24-6.2Numerical Differential FormulasWNumericalMethodsReseanehBuitlmg7lo#,UEsTC
6 Numerical Differentiation 24-6.2 Numerical Differential Formulas Research Building 710#, UESTC
More Central-Difference FormulasTaylor series can be used to obtain central-difference formulas for thehigherderivatives.Proof.f(x+h)= f(x)+hf '(x)+h" f(2)(x)/ 2+h" f(3)(x) /6+h* f(4)(x)/ 24+..f(x-h)= f(x)-hf '(x)+h2 f(2)(x) /2-h f(3)(x) /6+ht f(4)(x)/ 24+..f(x-h)+ f(x+h)=2f(x)+2h f(2)(x)/2+2h f(4)(x)/24+..F()(x) - (x-h)-2()+ (x+h) -2 -)(x)/ 4-2 ((x)/ 1-..h?F()(x) = L-2fg + I1 - h f((x) /12f(2)(x) ~I-2f +flh?h?29/22/20265:57.AM
9/22/2026 5:57 AM 2 ⚫ Taylor series can be used to obtain central-difference formulas for the higher derivatives. ⚫ Proof. 2 2 3 3 4 4 2 6 24 ( ) ( ) ( ) f x h f x hf x h f x h f x h f x ( ) ( ) '( ) ( ) / ( ) / ( ) / . + = + + + + + 2 2 3 3 4 4 2 6 24 ( ) ( ) ( ) f x h f x hf x h f x h f x h f x ( ) ( ) '( ) ( ) / ( ) / ( ) / . − = − + − + + 2 2 4 4 2 2 2 2 24 ( ) ( ) f x h f x h f x h f x h f x ( ) ( ) ( ) ( ) / ( ) / . − + + = + + + 2 2 4 4 4 2 2 2 4 2 6 ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) / ! ( ) / ! . f x h f x f x h f x h f x h f x h − − + + = − − − 2 2 4 1 0 1 2 2 12 ( ) ( ) ( ) ( ) / f f f f x h f x h − + − = − 2 1 0 1 2 ( ) 2 ( ) f f f f x h − + −
Table 6.3Central-difference Formulas of Order O(h2)ft - f-IMore Central-Diffef'(xo):2.hThepopularchoicefi -2fo + f-1f"(xo)h2arethose oforder o(h2)f(3)(x0) ~ /2 ~ i +2f-1 - f-20(h4),2h3f(4)(xo) ~ 2 - 4fi + 6f0-4f-1 + f-2h4Table 6.4Central-difference Formulas of Order O(h*)F(x0)~ =f2+ 81 -8/-1+ /-212hf"(x0) ~ =f2 + 16fi - 30fo + 16f-1 - f-212h2F(3)(x0) ~ -f3 +8f2 - 13ft ± 13f-1 - 8/f-2 + f-38h3f(4(x0) ~ =/3 + 12/2 - 391 + 56 f0 - 39f-1 ± 12f-2 - f-36h43
9/22/2026 5:57 AM 3 ⚫ The popular choice are those of order 𝑶 𝒉 𝟐 , 𝑶 𝒉 𝟒
More Central-Difference FormulasEx.6.4letf(x)=cos(x).Computetheapproximationstof"(0.8) (0.8) ~ (0.81) -2 (0.8) + F(0.79) )=-0.69669(0.01)2Table 6.5Numerical Approximations to f"(c) forExample 6.4ErrorusingApproximation byStepformula (6)formula (6)size0.000580409-0.696126300h=0.1-0.000016709-0.696690000n=0.01-0.000706709-0.696000000h=0.0019/22/20265:57.AM
9/22/2026 5:57 AM 4 ⚫ Ex. 6.4 let 𝒇 𝒙 = 𝒄𝒐𝒔 𝒙 . Compute the approximations to 𝒇′′(𝟎. 𝟖) 2 0 81 2 0 8 0 79 0 8 0 69669 0 01 ( . ) ( . ) ( . ) ''( . ) . ( . ) f f f f − + −
Error AnalysisLetfk=yk+ek whereekistheerrorin computingf(xk),including noiseinmeasurement andround-offerror."(x0)-±-2+++E(f,h)h?h?M48E(f,h)=-2e +e-_ h f((c)E(,h)|≤h2h?1212Theoptimalstepsizewillminimizethequantity1/4h'M4g488g'(h)= 0g(h) =h=h?12MStepsizedilemma.Onepartial solutionto thisproblemisto useaformulaof higher order so that a larger value of h will produce the desiredaccuracy.Theformulaforf"(x)ofordero(h)"(x.) =-L +16./ - 30%: +16]. - L E(f h)12h219/22/20265:57AM
9/22/2026 5:57 AM 5 ⚫ Let 𝒇𝒌 = 𝒚𝒌 + 𝒆𝒌 where 𝒆𝒌 is the error in computing 𝒇(𝒙𝒌), including noise in measurement and round-off error. ⚫ The optimal step size will minimize the quantity ⚫ Step size dilemma. One partial solution to this problem is to use a formula of higher order so that a larger value of h will produce the desired accuracy. The formula for 𝒇 ′′ 𝒙 of order 𝑶(𝒉 𝟒 ) 1 0 1 0 2 2 ''( ) ( , ) y y y f x E f h h − + − = + 2 4 1 0 1 2 2 12 ( )( ) ( , ) e e e h f c E f h h − + − = − 2 2 4 12 ( , ) h M E f h h + 2 2 4 12 ( ) h M g h h = + g h'( ) = 0 1 4 48 / h M = 2 1 0 1 2 0 2 16 30 16 12 ''( ) ( , ) f f f f f f x E f h h − + − + − − − = +