Beltrami Identity Derivation | Calculus of Variations