Deriving O(h^4) Five Point Formula to Approximate f'(x0)

Click For Summary
SUMMARY

The discussion focuses on deriving an O(h^4) five-point formula to approximate the derivative f'(x0) using the points f(x0-h), f(x0), f(x0+h), f(x0+2h), and f(x0+3h). Participants suggest employing Taylor polynomials to expand the expression and determine coefficients A, B, C, and D that eliminate higher-order terms. The final derived formula is f'(x0) = (-2f(x0-h) + 6f(x0+h) - 11f(x0) - f(x0+2h))/(2h) + (f^(4)(x0)/4)h^3 + O(h^4). The conversation highlights the algebraic complexity involved in achieving the desired approximation.

PREREQUISITES
  • Understanding of Taylor series expansion
  • Familiarity with numerical differentiation techniques
  • Basic knowledge of calculus, particularly derivatives
  • Proficiency in algebraic manipulation
NEXT STEPS
  • Study Taylor series and their applications in numerical methods
  • Learn about error analysis in numerical differentiation
  • Explore higher-order finite difference methods
  • Investigate the implications of truncation errors in numerical approximations
USEFUL FOR

Mathematicians, numerical analysts, and students studying numerical methods who are interested in advanced techniques for derivative approximation.

stunner5000pt
Messages
1,447
Reaction score
5
given five points of a function one can approximate the derivate of the function at some point. The standard five point formula is

Derive an O(h^4) five point formula to approximate f'(x0) that uses
[itex]f(x_{0}-h), f(x_{0}), f(x_{0} +h),f(x_{0} +2h),f(x_{0} +3h)[/itex].

(Hint:Consider the expression [itex]Af(x_{0} -h) + Bf(x_{0} +h) + Cf(x_{0} + 2h) + Df(x_{0} + 3h)[/itex]. Expand in fourth Taylor polynomials and choose A,B,C and D appropriately.)

im not sure how they expect me to expand that polynomial they gave because it would be a total mess!
how would one go about deriving this formula?
my idea is using taylor polynomials
[tex]f'(x_{0}) = \frac{f(x_{0}) - f(x_{0} -h)}{h} + \frac{f''(x_{0}}{2} h - \frac{f^{(3)}(x_{0})}{6} h^2 + \frac{f^{(4)}(x_{0})}{24} h^3 + O(h^4)[/tex]
but I am not sure how ot proceed
what to subsitute... i know its going to take some algebraic gymnastics to get the answer...
 
Last edited:
Physics news on Phys.org
I've never done this type of problem before, but the way I'd approach it, given the hint you have, would be to write:

[tex]\begin{align*}<br /> A f(x_0&-h)+B f(x_0+h)+ C f(x_0+2h) + D f(x_0+3h) = \\<br /> & f(x_0) (A+B+C+D) +\\<br /> & h f'(x_0) (-A+B+2C+3D)+\\<br /> & \frac{1}{2}h^2 f''(x_0) (A+B+4C+9D)+...<br /> \end{align*}[/tex]

Up to the fourth order, and then solve for a set of (A,B,C,D) that makes all the coefficients on the right side vanish except for the coefficient of f'(x_0). This will give you an O(h^4) approximation of f'(x_0).
 
Last edited:
hmmm... seems there is no one who is in numerical methods on this site... strange that .. or maybe they just don't like to help on homework?
well anyway... did some googling and got these equations
1)
[tex]f'(x) = \frac{f(x_{0}) - f((x_{0}-h)}{h} + \frac{f''(x_{0}}{2}h - \frac{f^{(3)}(x_{0})}{6}h^2 + \frac{f^{(4)}(x_{0})}{24}h^3 +O(h^4)[/tex]
replace h with -h
2) [tex]f'(x) = \frac{-f(x_{0}) + f((x_{0}+h)}{h} - \frac{f''(x_{0})}{2}h - \frac{f^{(3)}(x_{0})}{6}h^2 - \frac{f^{(4)}(x_{0})}{24}h^3 +O(h^4)[/tex]
in 2 replace h with 2h
3) [tex]f'(x) = \frac{-f(x_{0}) + f(x_{0}+2h)}{2h} - \frac{f''(x_{0})}{2}2h - \frac{f^{(3)}(x_{0})}{3}2h^2 - \frac{f^{(4)}(x_{0})}{3}h^3 +O(h^4)[/tex]
so now the aim is simply to eliminate the second, third nad fourth order derivatives
after a lot of fun (ya right)
[tex]f'(x_{0}) = \frac{ -2f(x_{0} -h) + 6f(x_{0} +h) -11f(x_{0}) - f(x_{0}+2h)}{2h} + \frac{f^{(4)}(x_{0})}{4}h^3 + O(h^4}[/tex]
all i need to do now is get rid of the fourth order derivative
im not sure what to subtract from this equation... any ideas?
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K