Given a set of discrete measurements in time $x_t, t \in \{0,\Delta t, 2\Delta t,\ldots,T-\Delta t,T\}$, what is the correct way to compute the discrete derivative $\dot x_t$. Is it more correct to take the difference with the previous value: $$\dot x_t = \frac{x_t-x_{t-1}}{\Delta t}$$ or with the next value in time: $$\dot x_t = \frac{x_{t+1}-x_t}{\Delta t}$$
It may be that both are correct in different contexts, but I'm not sure which is appropriate when.
Likewise, how should the second derivative be computed: $$\ddot x_t = \frac{\dot x_{t+1}-\dot x_t}{\Delta t}$$ or $$\ddot x_t = \frac{\dot x_t-\dot x_{t-1}}{\Delta t}$$
For a fairly smooth discrete function and small $\Delta t$ both methods are roughly the same, but is one more correct than the other?
One way to go about computing a derivative that has second-order, rather than first-order, error is to use a centered difference:
$$\dot{x}_t = \frac{x_{t+1} - x_{t-1}}{2 \Delta t}$$
By 2nd-order error, I mean the error is $O(\Delta t)^2$ rather than $O(\Delta t)$.
At the boundaries, use a forward or backward difference as you provided.
The 2nd derivative is naturally centered:
$$\ddot{x}_t = \frac{x_{t+1} - 2 x_t + x_{t-1}}{(\Delta t)^2}$$