2
$\begingroup$

These are the numerical approximations of the first derivative $$\begin{gathered} f'\left( x \right) \simeq \frac{{f\left( {x + h} \right) - f\left( x \right)}}{h}, \hfill \\ f'\left( x \right) \simeq \frac{{f\left( {x + h} \right) - f\left( {x - h} \right)}}{{2h}}, \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \vdots \hfill \\ \end{gathered} $$ Is there a numerical approximations of the first derivative that has $h^2$ in denominator?

$\endgroup$

2 Answers 2

2
$\begingroup$

Let $F$ be an antiderivative of $f$ such that $\frac{d}{dx} F = f$ and assume that $f\in C^2$. Then

We approximate $F$ around $x$ using its third order Taylor approximation with Peano remainder, $$ \begin{align} F(x + h) &= F(x) + h f(x) + \frac{h^2}{2}f'(x) + \frac{h^3}{6}f''(\xi_+) \tag{I}\label{i} \\ F(x - h) &= F(x) - h f(x) + \frac{h^2}{2}f'(x) - \frac{h^3}{6}f''(\xi_-) \tag{II}\label{ii} \end{align} $$ where $\xi_+ \in [x, x+h]$ and $\xi_- \in [x-h, x]$. The first order terms cancel if we subtract \eqref{ii} from \eqref{i}, $$ F(x+h) + F(x-h) = 2F(x) + h^2 f'(x) + \mathcal{O}(h^3) $$ which we can flip around to arrive at $$ f'(x) = \frac{F(x+h) + F(x-h) - 2F(x)}{h^2} + \mathcal{O}(h) $$ Notice that this is equivalent to computing the second order central difference approxmation of $F$.

$\endgroup$
2
  • $\begingroup$ Thank you. As you mentioned you have computed the second derivative of F(x) but my question is about the first derivative. $\endgroup$
    – p.kn
    Commented Apr 11, 2020 at 12:58
  • 1
    $\begingroup$ Yes but $F$ being an antiderivative of $f$, the 2nd derivative of it is the 1st derivative of $f$. $\endgroup$
    – Mikal
    Commented Apr 11, 2020 at 13:02
1
$\begingroup$

If you mean that you have several evaluation points (f(x+2 h) or f(x+h), ...) in the numerator and then have $h^2$ in the denominator, the answer is no.

You see this by considering physical units. If f is a length measured in meters and x is a time measured in seconds then $f^\prime$ is a velocity. The units of the finite difference should agree, so it is "evaluation points of f" divided by h.

Maybe you are looking for a finite difference approximation that has higher orders in the error term. One side finite difference is $O(h)$. Central finite difference is $O(h^2)$. It is possible to derive a finite difference of $O(h^3)$. All have linear combinations of $f$ evaluated at different points in the numerator and an $h$ in the denominator.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .