Calculate the volume of the region in the first octant bound by $y=0$, $y=x$, $x^2+y^2+z^2=4$ I am trying to calculate the volume of the region in the first octant bound by the surfaces
$$y=0,\hspace{1em}y=x,\hspace{1em}x^2+y^2+z^2=4$$
I have found that $x,\ y,$ and $z$ can have a lower bound of $0$.
$z$ seems to have an upper bound of $\sqrt{4 - x^2 - y^2}$
$y$ seems to be from $0$ to $x$
$x$ seems to be form $0$ to $2$ (the radius of the sphere)
Is it correct to use the following triple integral to solve the problem?
$$\int_0^2 \int_0^x \int_0^{\sqrt{4-x^2-y^2}} dz\ dy\ dx$$
Sketch:
It seems to me that the region to find is the area shown below (the left half of the section of the sphere in the first octant). It is clear to me that the volume should be that of the sphere divided by 16, but I need to learn how to use triple integrals to solve this problem.

How would I go about solving this?
 A: Your limits are invalid. The problem is that the region defined by $(0\le x\le 2$ and $0\le y\le x)$ contains points for which $\sqrt{4-x^2-z^2}$, the upper limit for $z$, is not a real number. For instance, $(x,y)=(\frac32,\frac32)$.
It really is worth it to transform the problem into spherical coordinates!
A: Please note that your integral is incorrectly set up. If you are integrating in the order $dz$ first, then $dy$ and then $dx$, you will have to split your integral into two. So I would recommend going $dx$ before $dy$.
$\displaystyle \int_0^{\sqrt{2}} \int_y^{\sqrt{4-y^2}} \int_0^{\sqrt{4-x^2-y^2}} dz \ dx \ dy$.
The upper limit of $y$ comes from intersection of plane $y = x$ and $x^2+y^2+z^2 = 4$ at $z = 0$. Then $2y^2 = 4 \implies y = \sqrt2$.
A: Because the base of the solid is a sector of a circle, it is most natural to use either cylindrical or spherical coordinates. I don't know if you're in the American coordinate system or non-American, but notice that limiting $y$ to $0\le y\le x$ means that $0\le\theta\le\pi/4$ (with $\theta$ the polar coordinate in the plane). So you will have $0\le\theta\le\pi/4$, $0\le\phi\le\pi/2$ (because you're constrained to the first octant), and, easiest, $0\le\rho\le 2$. So the volume integral becomes
$$\int_0^{\pi/4}\int_0^{\pi/2}\int_0^2 \rho^2\sin\phi\,d\rho\,d\phi\,d\theta.$$
[Interchange $\theta$ and $\phi$ as required.]
