we solve gravity with a mixed formulation to avoid the loss of one order of accuracy while differentiating the potential.