I have a set of equations to integrate something in time $t$. At each time step I compute a scalar field $\phi(t)$ and a potential $V(\phi)$. I should also control the conservation of energy with an equation:
$E=\frac{1}{2}\left(\dot\phi^2+V(\phi)\right)$
Or numerically:
$E=\frac{1}{2}\left(\left(\frac{\phi_{n}-\phi_{n-1}}{t_{n}-t_{n-1}}\right)^2+V(\phi)\right)$
My question is: is it $V(\phi_{n})$ or $V(\phi_{n-1})$ ?