Variational methods for nonlinear dielectrics