Let R be a solid region bounded by an oriented closed suface $\partial{R}$. Let f and g be $c^2$ scalar functions. Let the $\hat{n}$ be the outward normal to $\partial{R}$. Prove that
$$\iiint \nabla{f} \cdot{} \nabla{g} \ dV = \iint_{\partial{R}} f\nabla{g}\cdot{}d\vec{S} - \iiint_{R} f \nabla{}^2g \ dV$$
I am aware that the process to prove this is to use Gauss theorem on the RHS and that should somehow allow me to show the LHS, but I am not sure how to even begin this problem since f and g aren't given to me.
Just remember that
$$ \nabla\cdot(f {\bf F}) = \nabla f \cdot {\bf F} + f\nabla\cdot{\bf F} \tag{1} $$
Now use ${\bf F} = \nabla g$ to find
$$ \nabla\cdot(f \nabla g) = \nabla f \cdot {\nabla g} + f\nabla\cdot{\nabla g} = \nabla f \cdot \nabla g + f \nabla^2 g \tag{2} $$
Integrating at both sides
$$ \iiint_R \nabla\cdot(f\nabla g) {\rm d}V = \iiint_R \nabla f\cdot \nabla g {\rm d}V + \iiint_R f\nabla^2 g {\rm d}V \tag{3} $$
Now apply the divergence theorem to the L.H.S
$$ \iint_{\partial R} f\nabla g \cdot{\rm d}{\bf S} = \iiint_R \nabla f\cdot \nabla g {\rm d}V + \iiint_R f\nabla^2 g {\rm d}V \tag{4} $$