I'm trying to solve the following question (this is just for practice):
If $u$ is harmonic within $\mathbb{R}^n$ with $\int_{\mathbb{R}^n}|Du|^2 dx \leq C$ for some $C > 0$, then show that u is a constant in $\mathbb{R}^n$.
I guess the idea is to somehow show that $Du = 0$ which implies $u$ is constant, or otherwise show that $u$ is bounded and thus constant by Liouville's theorem. I can't quite see how to do this though. Of course if it were on a bounded domain $U$ I know I could use the integration by parts formula $$0 = - \int_U u \Delta u dx = \int_U |Du|^2 dx - \int_{\partial U} u^2 dS$$ which would imply that $u$ is bounded ... but then Liouville's theorem doesn't apply because it's not defined on all of $\mathbb{R}^n$ (I think).
Can anyone point me in the right direction? (Also, out of curiosity, is there some kind of analogue of integration by parts for unbounded domains?)