Variational formula