Lef $F:\mathbb{R}^n\rightarrow \mathbb{R}$ be a quadratic form. I have to prove that $F$ is harmonic ($\Delta F=0$) if and only if $$\int_{\mathbb{S}^{n-1}(1)}F|_{\mathbb{S}^{n-1}(1)}dv_{g_0}=0.$$ Where $dv_{g_0}$ is just a way of saying "the usual metric".
I'm trying to apply the divergence theorem to prove it, but I not able to choose a vector field which gives me the aswer. I'm also trying to write $F$ as $F(v)=\langle f(v),v\rangle$ with $f$ self-adjoint, but nothing really works. i also tried this (but don't know how to continue) using the divergence theorem in the first equallity: $$0=\int_{\mathbb{S}^{n-1}(1)}\Delta F=\int_{\mathbb{S}^{n-1}(1)}div(\nabla F)=\int_{\mathbb{S}^{n-1}(1)}div(\nabla \langle f(v),v\rangle)$$ Any hint?
Assume that we have an orthonormal basis, and that $F(x)=\sum_{i,k=1}^n a_{ik} x_ix_k$ with a symmetric matrix $A$. Then it is easily computed that $\Delta F(x)\equiv2\,{\rm tr}(A)$; hence $F$ is harmonic iff ${\rm tr}(A)=0$.
On the other hand, integrating $F$ over a spherically symmetric domain $S\subset{\mathbb R}^n$ leads to $$\int_S x_i\,x_k\> {\rm dvol}=0\quad(i\ne k),\qquad \int_S x_i^2\>{\rm dvol}=c\quad (1\leq i\leq n)\ ,$$ with some constant $c\ne0$. It follows that $$\int_S F(x)\>{\rm dvol}=c\>{\rm tr}(A)\ .$$