Suppose $a>0$ and $S = \{(x,y,z) \in \mathbb R^3 : x^2+y^2+z^2=a^2\}$ then
MY FIRST APPROACH: $$\int\int\int\left(x^2+y^2+z^2\right)\mathbb dv=a^2\int\int\int \mathbb dv=a^2.\frac{4}{3}\pi a^3=\frac 4 3\pi a^5$$.
MY SECOND APPROACH:If i use spherical coordinate then $dV = r^2 \sin \theta dr d\theta d\phi.$ and $\left(x^2+y^2+z^2\right)=r^2$ now $$\int\int\int\left(x^2+y^2+z^2\right)\mathbb dv=\iint d\Omega \int_0^a (r^4) dr =\frac 4 5\pi a^5$$
where $\iint d\Omega = \int_0^\pi \sin(\theta)d\theta \int_0^{2\pi} d\phi = 4\pi.$
My question is that why such discrepancy in the answer$?$ and where did i commit mistake in my first approach.
(Note:2nd answer is correct but what's the problem with 1st$?$)
