Home > Numerical methods calculators > Four point Forward difference, Backward difference, Central difference formula numerical differentiation example

3. Four point Forward difference, Backward 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`)
Other related methods
  1. Two point Forward, Backward, Central difference formula
  2. Three point Forward, Backward, Central difference formula
  3. Four point Forward, Backward, Central difference formula
  4. Five point Forward, Central difference formula

5. Example-5 (`f(x)=xlnx`)
(Previous example)
4. Five point Forward, Central difference formula
(Next method)

6. Example-6 (`f(x)=sinx`)





`f(x)=sinx` and `h = 0.1`, estimate `f^'(0.8) and f^('')(0.8)`
using Four 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) = sin(x)`.

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

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

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

x0.50.60.70.80.911.1
y0.47940.56460.64420.71740.78330.84150.8912

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

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

`f^'(0.8)=1/1.2[f(0.6)-8f(0.7)+8f(0.9)-f(1)]`

`f^'(0.8)=1/1.2[0.5646-8(0.6442)+8(0.7833)-0.8415]`

`f^'(0.8)=0.6967`

Absolute Error:`|"exact value of " f^'(0.8)-(0.6967)|=|0.6967 -0.6967|=0`



Four-point FDF (Forward difference formula) for second derivatives
`f^('')(x)=(2f(x)-5f(x+h)+4f(x+2h)-f(x+3h))/(h^2)`

`f^('')(0.8)=(2f(0.8)-5f(0.8+0.1)+4f(0.8+2*0.1)-f(0.8+3*0.1))/((0.1)^2)`

`f^('')(0.8)=(2f(0.8)-5f(0.9)+4f(1)-f(1.1))/(0.01)`

`f^('')(0.8)=(2(0.7174)-5(0.7833)+4(0.8415)-(0.8912))/(0.01)`

`f^('')(0.8)=-0.7246`

Absolute Error:`|"exact value of " f^('')(0.8)-(-0.7246)|=|-0.7174 +0.7246|=0.0072`



Four-point BDF (Backward difference formula) for second derivatives
`f^('')(x)=(-f(x-3h)+4f(x-2h)-5f(x-h)+2f(x))/(h^2)`

`f^('')(0.8)=(-f(0.8-3*0.1)+4f(0.8-2*0.1)-5f(0.8-0.1)+2f(0.8))/((0.1)^2)`

`f^('')(0.8)=(-f(0.5)+4f(0.6)-5f(0.7)+2f(0.8))/(0.01)`

`f^('')(0.8)=(-0.4794+4(0.5646)-5(0.6442)+2(0.7174))/(0.01)`

`f^('')(0.8)=-0.7232`

Absolute Error:`|"exact value of " f^('')(0.8)-(-0.7232)|=|-0.7174 +0.7232|=0.0058`


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



5. Example-5 (`f(x)=xlnx`)
(Previous example)
4. Five point Forward, Central difference formula
(Next method)





Share this solution or page with your friends.


 
Copyright © 2024. All rights reserved. Terms, Privacy
 
 

.