Hello! I have a question about how to calculate the expectation of a quadratic form as follows, where $X$ is a random variable that uniformly distributed on the unit sphere: $$ E_X[(\mathbf{x}^\top A\mathbf{x})^2] =\int_{\mathbf{x}\in S}{p(\mathbf{x})(\mathbf{x}^\top A\mathbf{x})^2dS(\mathbf{x})} =\int_{\mathbf{x}\in S}{\frac{1}{4\pi}(\mathbf{x}^\top A\mathbf{x})^2dS(\mathbf{x})} $$ where $S=\{\mathbf{x}\in\mathcal{R}^N|\mathbf{x}^\top\mathbf{x}=1\}$.

If $\mathbf{x}$ is Gaussian, there are some conclusions about the expectation of the quadratic forms. However, I find it difficult to deal with when the variable is distributed on a sphere. When the dimension is 2 or 3, this problem can be solved by representing it with polar coordinate. However, when the dimension is high, such a representation will be rather redundant, how can I calculate this integral then? Please give some help for this problem if you have any idea. Thank you very much!