Solving for a constant in a simple partial differential equation, using divergence/gradient

From a bank of past master's exams:

Let $u(x,y)$ satisfy $$-\left( \frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}\right) = \lambda u$$ in a bounded region $\mathcal{D} \subset \mathbb{R}^2$ with smooth boundary $\mathcal B$. Assume $u=0$ on $\mathcal B$ (but $u \not \equiv 0$ on $\mathcal D$). Show that $$\lambda = \frac{\iint_{\mathcal D} |\nabla u|^2dxdy}{\iint_{\mathcal D} u^2dxdy}.$$ (Suggestion: Compute the divergence $\operatorname{div}(u\nabla u)$.)

So taking the suggestion, I get the following: \begin{align} \nabla \cdot (u \nabla u) &= \nabla \cdot \left( u \frac{\partial u}{\partial x}, u \frac{\partial u}{\partial y} \right) \\ &= u \left( \frac{ \partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right) + \left( \frac{\partial u}{\partial x} \right)^2 + \left( \frac{\partial u}{\partial y} \right)^2 \\ &= -\lambda u^2 + |\nabla u|^2 \end{align}

If I get $$\iint_D \nabla \cdot (u \nabla u) dA = 0,$$ then I'll have \begin{align} \iint_D (|\nabla u|^2 - \lambda u^2) dA &= 0 \\ \iint_D |\nabla u|^2 dA = \iint_D \lambda u^2 dA &= \lambda \iint_D u^2 dA \\ \frac{\iint_D |\nabla u|^2 dA}{\iint_D u^2 dA} &= \lambda \end{align}

But I don't know how to show that (I was thinking Stokes's Theorem, but I don't think the integrand is the curl of a vector field). It's probably something very simple (my vector calculus is quite rusty) -- what am I missing here?

-
Well, you're almost there and browsing through wikipedia would have answered your question: see here – t.b. Apr 5 '11 at 18:22
@Theo: Ah, I see. So then $\iint_D \nabla \cdot (u \nabla u) dA = \oint_B (u \nabla u) \cdot \vec{n} ds = \oint_B (0) \nabla u \cdot \vec{n} ds = 0$. Thank you. Now I'm not sure about the protocol here. Do I ask you to make that an official answer that I accept? Do I close the question? Do I answer my own question? – Michael Chen Apr 5 '11 at 18:34
Exactly, that's what I was getting at! I only added a comment because I have to run now. I suggest that you add your own comment as an answer and accept it. Maybe you wait a while before accepting because it is more likely that people look at your question when it is still unanswered and maybe somebody has something interesting to add. – t.b. Apr 5 '11 at 18:40

The Wikipedia article on Green's Theorem refers to the two-dimensional version of the divergence theorem, by which $$\iint_A \operatorname{div}(F) dA = \oint_C F \cdot \vec{n} ds,$$ Then $$\iint_D \nabla \cdot (u \nabla u) dA = \oint_B (u \nabla u) \cdot \vec{n} ds = \oint_B (0) \nabla u \cdot \vec{n} ds = 0,$$ which is exactly what is needed to complete the proof.