Calculate the flow of the vector field $$\mathbf{F}(x, y, z) = \frac{1}{(x^2 + y^2 + z^2)^{\frac{3}{2}}} (x, y, z)$$ out of a sphere with radius $10$ and center at the origin.
This what I did:
$$\frac{\partial F}{\partial x} = \frac{(x^2 + y^2 + z^2)^{\frac32} - 3x^2\sqrt{x^2+y^2+z^2}}{(x^2 + y^2 + z^2)^{3}} = \frac{1-3\cos^2(\theta)\sin^2(\phi)}{r^3}$$
$$\frac{\partial F}{\partial y} = \frac{(x^2 + y^2 + z^2)^{\frac32} - 3y^2\sqrt{x^2+y^2+z^2}}{(x^2 + y^2 + z^2)^{3}} = \frac{1-3\sin^2(\theta)\sin^2(\phi)}{r^3}$$
$$\frac{\partial F}{\partial z} = \frac{(x^2 + y^2 + z^2)^{\frac32} - 3z^2\sqrt{x^2+y^2+z^2}}{(x^2 + y^2 + z^2)^{3}} = \frac{1-3\cos^2(\phi)}{r^3}$$
$$ \nabla \cdot \vec{F} = \frac{\partial F}{\partial x} + \frac{\partial F}{\partial y} + \frac{\partial F}{\partial z} = 0 $$
$$\iiint_{V} 0 dV = 0$$ But the correct answer is $4\pi$. What am I doing wrong?
More generally we can evaluate the flux of $\mathbf{F}$ through any closed surface $S$ oriented outwards which does not pass through the origin: $$\iint_S \mathbf{F}\cdot d\mathbf{S}=\begin{cases} 0 & \text{if $(0,0,0)$ is outside $S$,}\\ 4\pi & \text{if $(0,0,0)$ is inside $S$,} \end{cases}$$ see also peek-a-boo's comment above.
In the first case since $\text{div}(\mathbf{F})=0$ (your computations are correct), we may apply the divergence theorem and we find $0$.
In the second case, we can't apply divergence theorem directly to $S$ because we have the singularity $(0,0,0)$ inside $S$, but we may apply the theorem to a domain whose boundary is $S\cup S_r$ where $S_r$ is a sphere with radius $r$ sufficiently small (inward oriented). Since the domain between $S$ and $S_r$ does not contain $(0,0,0)$, we may use the divergence theorem and again we find $$\iint_{S\cup S_r} \mathbf{F}\cdot d\mathbf{S}=0$$ which implies $$\iint_{S} \mathbf{F}\cdot d\mathbf{S}=-\iint_{S_r} \mathbf{F}\cdot d\mathbf{S}=-\iint_{S_r} \mathbf{F}\cdot \mathbf{n}\,dS=\iint_{S_r}\frac{dS}{r^2}=\frac{|S_r|}{r^2}=4\pi.$$ Notice that along $S_r$, with the given inward orientation, $$\mathbf{F}(x, y, z) = \frac{(x, y, z)}{(x^2 + y^2 + z^2)^{\frac{3}{2}}} =-\frac{r\mathbf{n}}{r^{3/2}}-\frac{\mathbf{n}}{r^2}$$