3
$\begingroup$

First and second order derivatives are often used in chromatography to detect hidden peaks. The time series data consists of Instrumental Response vs. Time at very short time intervals (250 Hz). I wanted to calculate the second derivative of the data numerically in Excel. The simple option is that we calculate the first derivative and then calculate the first derivative of the first derivative to get the second derivative. The other option is to use the direct approach using central difference formula for the second derivative. The question is about the denominator of the second derivative from the central difference formula. It should the square of the time interval. This is my understanding and it is consistent dimensionally for example distance x (m) becomes acceleration (m/s2) as the second derivative of x.

A reviewer wrote a rather denigrating comment saying that there is a lack of understanding of the second derivative "definition" where the authors assert that the definition of a second derivative requires division by the square of the time interval. This reference to the square of a time interval suggests a worrying lack of understanding of the nature of the derivative 𝒅𝟐/𝒅𝒕𝟐 as an operator and not as an algebraic variable. Do mathematicians agree with the above comment? Can we interpret d^2/dt^2 as if it is repeating the d operator twice divided by time interval squared? Thanks.

$\endgroup$
8
  • $\begingroup$ Just point the reviewer to en.wikipedia.org/wiki/… $\endgroup$
    – Andrei
    Commented Aug 7, 2018 at 17:26
  • $\begingroup$ If the second derivative of $f$ exists, then $f''(x)=\lim_{h\to 0} \frac{\Delta_h^2 f(x)}{h^2}$, where $\Delta_h f(x) = f(x+h)-f(x)$, so we can approximate the second derivative this way $\endgroup$
    – Jakobian
    Commented Aug 7, 2018 at 17:27
  • $\begingroup$ Similarly, if the $n$-th derivative of $f$ exists, then $f^{(n)}(x) = \lim_{h\to 0} \frac{\Delta^n_hf(x)}{h^n}$. Note that, even if the limit exists, this doesn't guarantee existence of the $n$-th derivative. For this result, you can look in the book from "Grigorii Mikhailovich Fichtenholz", which, according to wikipedia, unfortunately isn't available in English. $\endgroup$
    – Jakobian
    Commented Aug 7, 2018 at 17:37
  • $\begingroup$ @Rumpelstiltskin, I'm afraid your limit will converge to $f'^2$ instead that $f"$. $\endgroup$
    – N74
    Commented Aug 7, 2018 at 18:45
  • $\begingroup$ @N74 No, the formula is good. Example, $f(x)=x^3$. $\lim_{h\to 0} \frac{(x+2h)^3-2(x+h)^3+x^3}{h^2} = \lim_{h\to 0} 6h+6x = 6x$. As expected, $f''(x) = 6x$ $\endgroup$
    – Jakobian
    Commented Aug 7, 2018 at 19:18

1 Answer 1

5
$\begingroup$

For a series of discrete values $x_1$, $x_2$, .. $x_n$ at regular intervals of time $h$, the central derivate at $x_i$ is

$$ \dot{x}_i = \frac{ x_{i+1} - x_{i-1} }{2 h} $$

This is preferable because $\frac{x_{i+1}-x_i}{h}$ is the average slope of the following interval and not exactly at the point $i$.

To get the second derivative apply the above to the first derivative

$$ \begin{aligned} \ddot{x}_i & = \frac{ \dot{x}_{i+1} - \dot{x}_{i-1} }{2 h} \\ & = \frac{\frac{ x_{i+2} - x_{i} }{2 h} - \frac{ x_{i} - x_{i-2} }{2 h} }{2 h} \\ & = \frac{x_{i+2}+x_{i-2}-2x_i}{4 \,h^2} \end{aligned}$$

The above definition is related to the Verlet Integration, also known as the leap-frog method since the derivative at $i$ does not contain the value $x_i$.

$\endgroup$
2
  • $\begingroup$ Thanks, you mentioned, "...the leap-frog method since the derivative at i does not contain the value xi." In the expression for the second derivative, there is a 2xi term but not in the first derivative. $\endgroup$
    – ACR
    Commented Aug 7, 2018 at 18:42
  • $\begingroup$ Yes, the second derivative describes curvature and thus the central value is needed. But for the first derivative, due to the fundamental theorem of calculus, the slope depends on the endpoints only. $\endgroup$ Commented Aug 8, 2018 at 12:12

You must log in to answer this question.

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