I am trying to compute the volume of the object bounded by $z=4-x^2-y^2$ tp $z=0$.
I convert to spherical coordinates, and I end up with the following integral:
$$x = r\cos\theta\sin\phi \\ y= r\sin\theta\sin\phi \\ z = r\cos\phi$$
$$\int_0^{2} \int_0^{\pi/2} \int_0^{2\pi} r^2 sin (\theta) d\theta d \phi dr$$
But, the integral is giving me 0 obviously, because the integral of sine from 0 to 2 pi is 0.
So, I try to switch the order, and get $r^2 $ in terms of $\phi$ , since r is a function of $\phi$.
$$\int_0^{2} \int_0^{2\pi} \int_0^{\pi/2} \frac{4- cos \phi}{2* sin^2 \phi} d \phi d\theta dr$$
However, this integral ends up being unbounded.
What am I doing wrong? Thanks.
What you are doing wrong: