Compute the following triple integral in a a sphere with the equation $x^2+(y-1)^2+z^2=1$ $$\iiint_D \frac{dV}{\sqrt{x^{2}+y^{2}+z^{2}}}$$
I used spherical coordinate system, the sphere is the set of all points $(\rho,\theta,\varphi)$ where $$0\le\rho\le2$$ $$0\le\theta\le\pi$$ $$0\le\varphi\le\pi$$ So I think the integral is equivalent to :
$$\int_{0 }^{ \pi}\int_{0}^{ \pi}\int_{0 }^{2 } {\rho }\sin \varphi \,d\rho \,d\theta \,d\varphi$$
But my reference says the integral is :$$\int_{0 }^{ \pi}\int_{0}^{ \pi}\int_{0 }^{\color{red}{2\sin\theta\sin\varphi} } {\rho }\sin \varphi \,d\rho \,d\theta \,d\varphi$$
And I don't understand why the upper limits of $\rho$ are different.
Take another look at your sphere, it's centered at $(0, 1, 0)$ and it has a radius of $1$. The region you've described is half of the sphere with radius $2$ centered at the origin, so it doesn't match up.
We can rewrite the equation for the sphere like this: $x^2 + (y^2 - 2y + 1) + z^2 = 1 \to x^2 + y^2 + z^2 = 2y$. Converting to spherical, this gives us $\rho^2 = 2\rho\sin\phi\sin\theta \to \rho = 2\sin\phi\sin\theta$. That gives us our upper bound for $\rho$.
Also, just as an aside, I would recommend using the bounds $0 \leq \phi \leq \frac{\pi}{2}, 0 \leq \theta \leq 2\pi$ here, I think they're a bit more intuitive from the geometry. They both get the same answer here, but only going halfway around in $\theta$ is a bit less clear in my opinion.