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.

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)$
