Home > Numerical methods > Numerical Differentiation > Five point Forward difference, Central difference formula numerical differentiation example

4. Five point Forward difference, Central difference formula numerical differentiation example ( Enter your problem )
  1. Formula & Example-1 (table data)
  2. Example-2 (table data)
  3. Example-3 (`f(x)=cosx`)
  4. Example-4 (`f(x)=2x^3+x^2-4`)
  5. Example-5 (`f(x)=xlnx`)
  6. Example-6 (`f(x)=sinx`)

3. Example-3 (`f(x)=cosx`)





`f(x)=cosx` and `h = 0.05`, estimate `f^'(1.2) and f^('')(1.2)`
using Five point Forward difference, Backward difference, Central difference formula numerical differentiation
Also find exact value of f', f'' and error for each estimation


Solution:
Equation is `f(x) = cos(x)`.

`:. f^'(x) = -sin(x)`

`:. f^('')(x) = -cos(x)`

The value of table for `x` and `y`

x11.051.11.151.21.251.31.351.4
y0.54030.49760.45360.40850.36240.31530.26750.2190.17

Five-point FDF (Forward difference formula)
`f^'(x)=1/(12h)[-25f(x)+48f(x+h)-36f(x+2h)+16f(x+3h)-3f(x+4h)]`

`f^'(1.2)=1/(12*0.05)[-25f(1.2)+48f(1.2+0.05)-36f(1.2+2*0.05)+16f(1.2+3*0.05)-3f(1.2+4*0.05)]`

`f^'(1.2)=1/(0.6)[-25f(1.2)+48f(1.25)-36f(1.3)+16f(1.35)-3f(1.4)]`

`f^'(1.2)=1/(0.6)[-25(0.3624)+48(0.3153)-36(0.2675)+16(0.219)-3(0.17)]`

`f^'(1.2)=-0.932`

Absolute Error:`|"exact value of " f^'(1.2)-(-0.932)|=|-0.932 +0.932|=0`



Five-point CDF (Central difference formula)
`f^'(x)=1/(12h)[f(x-2h)-8f(x-h)+8f(x+h)-f(x+2h)]`

`f^'(1.2)=1/(12*0.05)[f(1.2-2*0.05)-8f(1.2-0.05)+8f(1.2+0.05)-f(1.2+2*0.05)]`

`f^'(1.2)=1/0.6[f(1.1)-8f(1.15)+8f(1.25)-f(1.3)]`

`f^'(1.2)=1/0.6[0.4536-8(0.4085)+8(0.3153)-0.2675]`

`f^'(1.2)=-0.932`

Absolute Error:`|"exact value of " f^'(1.2)-(-0.932)|=|-0.932 +0.932|=0`



Five-point CDF (Central difference formula) for second derivatives
`f^('')(x)=1/(12h^2)[-f(x-2h)+16f(x-h)-30f(x)+16f(x+h)-f(x+2h)]`

`f^('')(1.2)=1/(12*(0.05)^2)[-f(1.2-2*0.05)+16f(1.2-0.05)-30f(1.2)+16f(1.2+0.05)-f(1.2+2*0.05)]`

`f^('')(1.2)=1/0.03[-f(1.1)+16f(1.15)-30f(1.2)+16f(1.25)-f(1.3)]`

`f^('')(1.2)=1/0.03[-0.4536+16(0.4085)-30(0.3624)+16(0.3153)-0.2675]`

`f^('')(1.2)=-0.3624`

Absolute Error:`|"exact value of " f^('')(1.2)-(-0.3624)|=|-0.3624 +0.3624|=0`




This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.