Evans 8.13: Dual Variational Principle

Evans asks the following:

Assuming $f \in L^2(U)$. Prove the dual variational principle that: $$\min_{w\in H^1_0(U)} \int_U \frac{1}{2} |Dw|^2 -fw\,dw = \max_{r \in L^2(U,\mathbb{R}^n);\text{div }r = f} \frac{-1}{2} \int_U |r|^2$$

I don't even have any ideas about how to start this problem. Are there canned ways to solve this problem? I've seen similar things in Linear Programming, but I haven't been able to successfully translate everything.

Let's begin with $\ge$ part: the claim is that $$\int_U \frac{1}{2} |Dw|^2 -fw \ge \frac{-1}{2} \int_U |r|^2 \tag1$$ for every $w\in H_0^1(U)$ and every $r\in L^2(U;\mathbb{R}^n)$ such that $\operatorname{div}r=f$. To see why, use Cauchy-Schwarz and integration by parts: $$\int_U fw = \int_U (\operatorname{div}r)w = -\int_U r\cdot Dw \le \int_U \frac{1}{2} (|Dw|^2+|r|^2 )\tag2$$
Next, $\le$. The minimum of $\int_U \frac{1}{2} |Dw|^2 -fw$ is attained by some $w\in H_0^1(U)$ since the functional is convex and coercive, etc. The Euler-Lagrange equation tells us that $\Delta w = -f$. So, letting $r = -Dw$ we achieve $\operatorname{div}r=f$ and equality throughout $(2)$.