Other infinitesimal variation of the action I was reading this post about the virial theorem where the virial theorem comes from varying the action by the infinitesimal rescaling $x\rightarrow(1+\epsilon)x$ and asking that $\delta S=0$ under this transformation.
I wonder if there'are any infinitesimal variations of $x$ other than $x\rightarrow x+\epsilon$ and $x\rightarrow(1+\epsilon)x$ that could give a meaningfull equation at the end. My first guess is that, it might be impossible since there's not a lot of variation restricted to the first order in $\epsilon$. But maybe mixing different coordinates: $x\rightarrow x+y\epsilon$ and $y\rightarrow y+x\epsilon$ could be interesting?
 A: Sure, one can for starters use an infinitesimal variation
$$ \delta x~=~\epsilon f(x,\dot{x},t) $$
with an arbitrary function $f$. Repeating dfan's & BebopButUnsteady's argument from this Phys.SE post then leads to infinitely many virial theorems
$$ \langle m\dot{x}\cdot \frac{df}{dt}\rangle~=~\langle f\cdot \frac{\partial V}{\partial x}\rangle$$
for the temporal averages $\langle X \rangle\equiv \frac{1}{T}\int_0^T \! dt~X(t)$ since boundary terms do not contribute in the $T\to\infty$ limit.
A: For what it's woth I found in Schwinger’s Quantum Action
Principle by K. A. Milton section 2.5 an example.
The variation of the hamiltonian action by: $$\delta \boldsymbol r=\epsilon \frac{\boldsymbol r}{r}~~~~~~\mathrm{and}~~~~~~\delta\boldsymbol p=\epsilon\frac{\boldsymbol r\times(\boldsymbol r \times \boldsymbol p )}{r^3}$$
Leads to:
$$\left\langle\frac{\boldsymbol  L^2}{mr^3}\right\rangle=\left\langle\frac{\mathrm d V}{\mathrm d r}\right\rangle$$
Which for example, can be used (together with the virial theorem) to express $\langle 1/r^3\rangle$ in a coulomb potential with $l$, $a_0$, $n$,.. (in QM), the derivation can be found in the Quantum Mechanics
Symbolism of Atomic Measurements by Schwinger section 8.3, equation (8.3.27).
It is also useful in hydrogen fine-structure calculations, see for example this derivation of $\Delta E$, equation (988) for the first order perturbation of the hydrogen Hamiltonian induced by the spin orbite coupling.
