# Divergence theorem in volume integral

We have a partial differential equation $$\nabla \cdot (p_1^2\nabla\alpha)=0\,.$$

Question: from this equation how can I write the following condition?

$$\int_\Omega\alpha\nabla \cdot(p_1^2\nabla\alpha)= \int_{\partial\Omega}\alpha p_1^2 n\cdot\nabla\alpha -\int_\Omega p_1^2(\nabla\alpha)^2=0 \,.$$ $p_1$ and $\alpha$ are position dependent variable.

-
This is the generalization of partial integration to volume integrals. –  Raskolnikov May 27 '13 at 9:30
It looks very familiar to me, the construction that is, but might I inquire, what are p and alpha? –  Dan May 27 '13 at 10:32
P and $\alpha$ are position dependent variable. –  Complex Guy May 27 '13 at 10:39
@ComplexGuy $p_1^2\nabla \alpha$ is a vector, so $\nabla(p_1^2\nabla \alpha )$ makes no sense, do you mean $div(p_1^2\nabla \alpha )$ instead ? –  smiley06 May 27 '13 at 11:28
Yes sorry my bad I'm editing it. –  Complex Guy May 27 '13 at 11:40

It appears this is an application of the Divergence theorem, assuming everything is smooth: $$\int_{\Omega} \nabla \cdot F = \int_{\partial \Omega} F\cdot n\,dS,$$
Let $F = \alpha p \nabla \alpha$, where $p = p_1^2$. The product rule reads for a vector $v$ and a scalar $\phi$: $$\nabla \cdot (\phi v) = \nabla \phi \cdot v + \phi\nabla \cdot v,$$ therefore we have:
$$\int_{\Omega} \nabla \cdot (\alpha p \nabla \alpha) = \int_{\Omega} \Big(\alpha \nabla \cdot (p \nabla \alpha) + p \nabla \alpha \cdot \nabla \alpha \Big) = \int_{\partial \Omega} \alpha p \nabla \alpha\cdot n\,dS,$$ and this is $$\int_{\Omega}\alpha \nabla \cdot (p \nabla \alpha) = \int_{\partial \Omega} \alpha p (\nabla \alpha\cdot n)\,dS - \int_{\Omega}p \nabla \alpha \cdot \nabla \alpha ,$$ rewrite $\nabla \alpha \cdot \nabla \alpha = |\nabla \alpha|^2$, and by the original equation $\nabla \cdot (p \nabla \alpha) = 0$, the left hand side of above vanishes, hence we have: $$\int_{\partial \Omega} \alpha p (\nabla \alpha\cdot n)\,dS - \int_{\Omega}p |\nabla \alpha|^2 = 0 .$$
Or you can just memorize the integration by parts formula derived from the divergence theorem: $$\int_{\Omega} u\nabla \cdot v = -\int_{\Omega} \nabla u\cdot v + \int_{\partial \Omega} u(v\cdot n)\,dS.$$