Find the volume between $z=\sqrt{x^{2}+y^{2}}$ and $x^2+y^2+z^2=2$ in spherical cordinates I am asking to find the volume of the volume trap above the cone $z=\sqrt{x^{2}+y^{2}}$ and below the sphere   $x^2+y^2+z^2=2$
When I checked the solution I noticed that it was writen as $$V=\int_{0}^{2 \pi} \int_{0}^{\frac{\pi}{4}} \int_{0}^{\sqrt{2}} r^{2} \sin \theta \,d r \,d \theta \,d \varphi$$ and my question is why the boundries of $\theta$ is between $0$ to $\frac{\pi}{4}$ and not $0$ to $\pi$.
why  $0$ to $\pi$ is wrong? I just can't imagine the scenerio in my head
 A: You seem to prefer, as commented, $\;\phi\;$ as azimut angle and $\;\theta\;$ as the vertical (or inclination) one. Fine. Then we have
$$\begin{cases}x=r\cos\phi\sin\theta\\{}\\
y=r\sin\phi\sin\theta\\{}\\
z=r\cos\theta\end{cases}$$
and the Jacobian is $\;r^2\sin\theta\;$ (this may be pretty confusing to physics and engineering students...).
Since the intersection of the surfaces gives
$$z^2=x^2+y^2=2-x^2-y^2\implies x^2+y^2=1$$
we get on the surfaces, projecting on the plane $\;x=0\;$ , that
$$\;z^2=y^2,\,y^2+z^2=2\implies 2y^2=2\implies y=1\;(\text{ choose the positive side...})\;$$
so on that plane we get a straight triangle wito points $\;(0,0,0)\,,\,(0,1,1)\,,\,(0,0,1)\;$, and from here that the verical angle goes from $\;0\;$ radians (on the $z\,-$ axis) and until the line through $\;(0,0,0), (0,1,1)\;$, which is at $\;\pi/4\;$ radias from the $\;z\,-$ axis (or from the $\;y-$ axis, it's the same in this case), and from here that $\;0\le \theta\le \pi/4\;$, so we finally get the integral
$$\int_0^1\int_0^{2\pi}\int_0^{\pi/4} r^2\sin \theta\,d\theta\,d\phi\,dr$$
A: 
as you can see the $\theta$ axis it's just going from 0 to  $\frac{\pi}{4}$
We can also obtain this  $\frac{\pi}{4}$ algebraically if our change of variable is:
$x =r\sin(\theta)\cos(\varphi)$
$y =r\sin(\theta)\sin(\varphi)$
$z=r\cos(\theta)$
we will obtain $z=\sqrt{x^{2}+y^{2}}\Rightarrow r\cos(\theta)=r\sin(\theta)\Rightarrow \tan(\theta)=1\Rightarrow\theta=\frac{\pi}{4}$
also can't be $2\pi$ because $\theta \in [0,\pi] $for more information: here
A: Not technically am answer, just an alternative solution.
We can also solve this problem using solids of rotation. Take the area bounded by $y=x$, $y=\sqrt{2-x^2}$, and the $x$ axis. Then rotate it about the $x$ axis. Our volume, then is
$$V=\pi\int_0^{x_*} x^2 \mathrm{d}x + \pi\int_{x_*}^{\sqrt{2}} (\sqrt{4-x^2})^2\mathrm{d}x$$
$x_*$ is the point where the upper boundary switches from the straight line to the circular arc. Using trigonometry we can deduce $x_*=\sqrt{2}\cos(\pi/4)=1$.
So our volume is
$$V=\pi\left(\int_0^1 x^2 \mathrm{d}x +\int_1^{\sqrt{2}} 4-x^2 \mathrm{d}x\right)=\frac{10\pi}{3}(\sqrt{2}-1)\approx 1.183.$$
A: Intersection of $x^2+y^2+z^2=2$ and $z=\sqrt{x^{2}+y^{2}}$ on $OXY$ plane gives $x^2+y^2=1$ so on Cartesian coordinates we have $$\int\limits_{-1}^{1}\int\limits_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}\int\limits_{\sqrt{x^{2}+y^{2}}}^{\sqrt{2-x^2-y^2}}dxdydz = 4\int\limits_{0}^{1}\int\limits_{0}^{\sqrt{1-x^2}}\int\limits_{\sqrt{x^{2}+y^{2}}}^{\sqrt{2-x^2-y^2}}dxdydz$$
Now let's take spherical coordinates:
\begin{array}{}
x = r \sin \phi \cos \theta;  \\ 
y = r \sin \phi \sin \theta; \\
z = r \cos \phi
\end{array}
From $z$ coordinate bounds
$$r \sin \phi \leqslant r \cos \phi \leqslant \sqrt{2-r^2 \sin^2 \phi}$$
Left inequality gives $\sin \phi \leqslant \cos \phi$, from which we can obtain $\phi \leqslant \frac{\pi}{4}$. Right inequality gives $r \leqslant \sqrt{2}$.
So for integral in spherical coordinates we have
$$4\int\limits_{0}^{\frac{\pi}{2}}\int\limits_{0}^{\frac{\pi}{4}}\int\limits_{0}^{\sqrt{2}} r^{2} \sin \theta d r  d \phi d \theta$$
