Variational principle for effective action and prospects of nonlinear optimization