Volume bounded between sphere and three planes I found a question in my homework that I have been trying to solve for days with minimal progress. We're given a sphere of form $x^2+y^2+z^2=9$ and three planes, $x=1,y=1,z=1$
The sphere in question:

We're asked to find the volume bounded above the planes and below the sphere using an integral. I tried using Cartesian coordinates, only to get a nonintegrable equation with way too many roots. I tried using polar coordinates, still too many roots. Finally I used spherical coordinates. I split the question into two parts. Since the area of the wedge will be symmetrical on either side I solved for the volume bounded by $y=1,z=1, x=y$, and the sphere. This way the boundary would exclude the x=0 plane. I defined the integral as follows $$\int_{\arccos(\sqrt{(14)/4)}}^{\pi/4}\int^{\arccos(\sqrt{(7)/3)}}_{\arccos(1/3)}\int^3_{1/\cos\theta \sin\phi}\sin\phi p^2dpd\phi d\theta$$
The arccos values come from computing $\phi$ and $\theta$ at the points of intersection between the sphere and planes. $\pi/4$ is the upper bound for $\theta$ because I cut the question in half to avoid the x=1 plane from messing with my boundaries. That way I can just double my answer.
I don't think this answer is right. It's impossible to solve without a computer or converting the arccos values into lower decimal places so they're computable by hand. My answer was in the ballpark of my estimate using a triangular prism but was clearly too high. If anyone knows a more reasonable way to compute the boundaries I'd appreciate any help I can get.
 A: Set up is easier in cylindrical coordinates so I will start with that and then go to spherical coordinates.
At the intersection of the plane $z = 1$ and the sphere, $x^2 + y^2 = r^2 = 8$
At the intersection of $y = 1, z = 1$ and the sphere, $x = \sqrt{7}$
$ \displaystyle \tan\theta = \frac{y}{x} = \frac{1}{\sqrt7}$
For $ \displaystyle \theta \leq \frac{\pi}{4}$, the lower bound of $r$ is defined by plane $y = 1 \implies r = \csc\theta$
So the integral is,
$ \displaystyle \int_{\arctan(1/\sqrt7)}^{\pi/4} \int_{\csc\theta}^{2\sqrt2} r (\sqrt{9-r^2} - 1) ~ dr ~ d\theta$
Using symmetry you can double the volume or write the other integral as,
$ \displaystyle \int_{\pi/4}^{\arctan(\sqrt7)} \int_{\sec\theta}^{2\sqrt2} r (\sqrt{9-r^2} - 1) ~ dr ~ d\theta$

Setting it up in spherical coordinates, I will go in the order $d\rho, d\phi, d\theta$.
I will set it up for $ \theta \leq \pi/4$ and we can multiply the volume by $2$.
$\displaystyle \int_{\arctan(1 / \sqrt7)}^{\pi/4} \int_{\arcsin((\csc\theta)/3)}^{\arctan(\csc\theta)} \int_{\csc\theta \csc\phi}^3 \rho^2 \sin\phi ~ d\rho ~d\phi ~d\theta ~ + $
$ \displaystyle \int_{\arctan(1 / \sqrt7)}^{\pi/4} \int_{\arctan(\csc\theta)}^{\arccos(1/3)} \int_{\sec\phi}^3 \rho^2 \sin\phi ~ d\rho~ d\phi ~d\theta $
A bit of explanation for the above set up -
We know the bounds of $\theta$ from the work in cylindrical coordinates. For bounds of $\phi$, note that when $\rho$ is bound below by $y = 1$, lower bound of $\phi$ comes from intersection of $y = 1$ and the sphere, which is $y = 1 = 3 \sin\theta \sin\phi$. The upper bound of $\phi$ comes from intersection of plane $ y = 1$ and $z = 1$. At $z = 1, \rho = \sec\phi$ so $y = 1 = \sec\phi \sin\phi \sin\theta \implies \phi = \arctan(\csc\theta)$.
Now when $\rho$ is bound below by $z = 1$, lower bound of $\phi$ comes from intersection of plane $ y = 1$ and $z = 1$. So, $\phi = \arctan(\csc\theta)$ as we obtained earlier. The upper bound of $\phi$ comes from intersection of plane $z = 1$ and the sphere. So, $z = 1 = 3 \cos\phi \implies \phi = \arccos(1/3)$
A: Following on from my comment we can see that the volume is bounded by four surfaces which we can convert to spherical coordinates
$$\begin{cases}x=1\\y=1\\z=1\\x^2+y^2+z^2=9\end{cases} \implies \begin{cases}\rho\sin\phi\cos\theta=1\\\rho\sin\phi\sin\theta=1\\\rho\cos\phi=1\\\rho=3\end{cases}$$
Using different orders of integration we have $\theta$ first
$$\int_{\sqrt{3}}^3\int_{\csc^{-1}\left(\frac{\rho\sqrt{8}}{3}\right)}^{\sec^{-1}(\rho)}\int_{\sec^{-1}(\rho\sin\phi)}^{\csc^{-1}(\rho\sin\phi)} \rho^2\sin\phi \:d\theta d\phi d\rho$$
$\phi$ first
$$\int_{\sqrt{3}}^3\int_{\sec^{-1}\left(\frac{\rho\sqrt{8}}{3}\right)}^{\frac{\pi}{4}}\int_{\csc^{-1}(\rho\cos\theta)}^{\sec^{-1}(\rho)}\rho^2\sin\phi\:d\phi d\theta d\rho + \int_{\sqrt{3}}^3\int_{\frac{\pi}{4}}^{\csc^{-1}\left(\frac{\rho\sqrt{8}}{3}\right)}\int_{\csc^{-1}(\rho\sin\theta)}^{\sec^{-1}(\rho)}\rho^2\sin\phi\:d\phi d\theta d\rho$$
and $\rho$ first would be quite the mess. The $\phi$ integral can be shortened with symmetry (do one integral and multiply the result by $2$). As a start
$$I =  2 \int_{\sqrt{3}}^3\int_{\sec^{-1}\left(\frac{\rho\sqrt{8}}{3}\right)}^{\frac{\pi}{4}}\int_{\csc^{-1}(\rho\cos\theta)}^{\sec^{-1}(\rho)}\rho^2\sin\phi\:d\phi d\theta d\rho = 2\int_{\sqrt{3}}^3\int_{\sec^{-1}\left(\frac{\rho\sqrt{8}}{3}\right)}^{\frac{\pi}{4}}\rho\sqrt{\rho^2-\sec^2\theta} - \rho\: d\theta d\rho$$
Can you take it from here?
