BVP and functional I have question
So I'm trying to solve
$$\begin{cases}
-\Delta u=f & \text{ on }\Omega;\\
u=0& \text{ on }\partial\Omega.
\end{cases}$$
Now consider the functional
$$I[w]=\int_{\Omega}\frac{1}{2}[||\nabla w||^2-wf] dx$$
on the class of functions
$$\Gamma =\{ w \in H_{0}^1(\Omega): w \ge g \text{ on }\partial\Omega\},$$
where $g:\bar\Omega$ $\to R$ is a given smooth function, called the obstacle.
Consider the minimization problem
$$I(u):=\min_{w \in \Gamma}I[w]$$
What is the point of $\Gamma$ being defined in this way?
Anyways,
A)I want to show that if $u$ satisfies the minimization problem then it satisfies the BVP
I see that the functional $I$ is minimized when it is equal to $0$. So $\int\frac{1}{2}[||\nabla w||^2dx=\int wf dx$ and this corresponds to multiplying the boundary value problem by $w$ (a test function?) and maybe integrating by parts? I don't think I am saying it correctly
B)Next I want to show that there exists a $\bar u$ satisfying the minimization problem. I'm confused because I thought this was what was shown above
C) After that, I want to show that the function $\bar u$ is the unique solution to the minimizing problem.
I'm guessing I have to show that the conditions of Lax-Milgram are satisfied. I'm not exactly sure what that would look like (boundedness and coercivity). Not even sure what the bilinear form would be.
I'm guessing that it would be $a(u,v)=\int_{\Omega} \nabla u\nabla v dx$
D) Finally, I want to conclude that $\bar u$ is the unique solution to the BVP. I'm not sure here either. How would this be worked differently from part c?
Thanks
 A: A) Use the first derivative test. Let $u_0$ be your function that minimizes the your functional. Let $v\in \Gamma$ be arbitrary. A computation shows
\begin{align}
E(u_0+tv) = \frac{1}{2} \int_\Omega |\nabla u_0|^2 dx + \frac{t^2}{2}\int_\Omega |\nabla v|^2 dx + t \int_\Omega \nabla u_0 \nabla v \,dx - \int_\Omega (u_0+tv) f \, dx
\end{align}
From which we deduce that
\begin{align}
\frac{d}{dt}|_{t=0} E(u_0+tv) = \int_\Omega \nabla u_0 \nabla v \,dx - \int_\Omega vf\, dx= -\int_\Omega \Delta u_0 v \, dx - \int_\Omega vf\, dx =^! 0.
\end{align}
We used integration by parts in the second last equality and since $u_0$ minimizes the functional we know that the first derivative has to be zero. Since this is true for all $v\in\Gamma$ we conclude that $u_0$ solves the BVP.
B) Note we still have to show that such a $u_0$ exists. You can do this using direct methods. You have to show that $\Gamma$ is weakly sequentially  closed, and that $I$ is coercive and weakly sequentially lower semi-continuous. The variational principle gives us now the existence of such an $u_0$. See Wikipedia direct method in the calculus of variations.
C) Define $\lambda := \inf \{E(w):w\in \Gamma\}$. Assume there are two functions minimizing the functional, thus, $E(u_1)=\lambda=E(u_2)$. The proof is a proof by contradiction. Assume $u_1 \neq u_2$. We have
\begin{align}
E\left(\frac{u_1+u_2}{2}\right) &= \frac{E(u_1)}{4} + \frac{E(u_2)}{4} -\frac{1}{4} \int_\Omega u_1 f \, dx -\frac{1}{4} \int_\Omega u_2 f \, dx + \frac{1}{8} \int_\Omega 2 \nabla u_1 \nabla u_2 \, dx \\ &\leq \frac{E(u_1)}{4} + \frac{E(u_2)}{4} + \frac{E(u_1)}{4} + \frac{E(u_2)}{4} = \lambda.
\end{align}
Where we used the general inequality $2ab \leq |a|^2+|b|^2$ with $a= \nabla u_1$ and $b=\nabla u_2$. (This inequality follows from $0\leq (a-b)^2=a^2-2ab+b^2$ for $a,b\in \mathbb{R}$). Assume now we have equality, i.e. $ E(\frac{u_1+u_2}{2}) = \lambda$. Since $2ab=a^2+b^2$ implies $a=b$, we see that $$\nabla u_1 = \nabla u_2$$ which implies $\nabla(u_1-u_2) = 0$ from which we deduce $u_1-u_2$ is constant. But since $u_1=0=u_2$ on the boundary, we see that $u_1 \equiv u_2$. But by assumption $u_1 \neq u_2$ and so $E(\frac{u_1+u_2}{2}) < \lambda$. This contradicts the minimizing properties of $u_1$ and $u_2$. Hence, $u_1 \equiv u_2$.
D) Assume the IVP has two solutions $u_1,u_2$. Set $v:=u_1-u_2$. We see that $\Delta v = 0$. Hence, $$\int_\Omega |\nabla v|^2 dx = 0.$$ From which we again conclude that $v$ is constant. Since $u_1,u_2$ satisfy the same boundary condition we conclude that $u_1\equiv u_2$. Since we know that the minimizer $u_0$ solves the IVP, we deduce that it is the unique solution of the IVP.
