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

In summary, a O(h^4) five point formula can be derived to approximate f'(x0) by using the given five points of f(x0-h), f(x0), f(x0+h), f(x0+2h), and f(x0+3h). This can be achieved by expanding the expression Af(x0-h) + Bf(x0+h) + Cf(x0+2h) + Df(x0+3h) in fourth Taylor polynomials and solving for A, B, C, and D. After some algebraic manipulation, the final formula for f'(x0) is obtained as (-2f(x0-h) + 6f(x0+h) - 11f
  • #1
stunner5000pt
1,461
2
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
  • #2
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*}
A f(x_0&-h)+B f(x_0+h)+ C f(x_0+2h) + D f(x_0+3h) = \\
& f(x_0) (A+B+C+D) +\\
& h f'(x_0) (-A+B+2C+3D)+\\
& \frac{1}{2}h^2 f''(x_0) (A+B+4C+9D)+...
\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:
  • #3
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:

1. What is the purpose of deriving O(h^4) five point formula to approximate f'(x0)?

The purpose of deriving O(h^4) five point formula is to improve the accuracy of approximating the derivative of a function at a given point. This formula uses five data points instead of the traditional three point formula, resulting in a higher order of approximation and a smaller error.

2. How is the O(h^4) five point formula derived?

The O(h^4) five point formula is derived using Taylor's series expansion. By considering the first five terms of the series, the coefficients can be solved for to create the five point formula.

3. What are the five data points used in the O(h^4) five point formula?

The five data points used in the O(h^4) five point formula are x0-h, x0-h/2, x0, x0+h/2, and x0+h. These points are equally spaced around the point x0 and are used to calculate the derivative at that point.

4. How does the O(h^4) five point formula compare to the traditional three point formula?

The O(h^4) five point formula is more accurate than the traditional three point formula. It has a higher order of approximation, resulting in a smaller error. However, it also requires more data points to be calculated.

5. In what situations would the O(h^4) five point formula be useful?

The O(h^4) five point formula would be useful in situations where a high degree of accuracy is needed for approximating the derivative. It is especially useful for functions with high curvature or for finding the derivatives of higher order functions.

Similar threads

Replies
4
Views
77
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
5
Views
4K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Differential Equations
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top