# Convert this integral to cylindrical and spherical coordinates: $\int_{-2}^2 \int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}\int_{x^2+y^2}^4 x \ dz\ dy\ dx$

I am asked to solve the following problem:

Convert this integral to cylindrical and spherical coordinates: $\int_{-2}^2 \int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}\int_{x^2+y^2}^4 x \ dz\ dy\ dx$

For the cylindrical coordinates, I got the following result:

$$\displaystyle\int_0^{2\pi} \int_0^{2}\int_{r^2}^4 r^2\cos\theta \; dz\, dr\, d\theta = 0$$

Which is correct. But my question is, in the caso of spherical coordinates, is there a straightforward way to find the variation of $\phi$?

$$\displaystyle \int_0^{2\pi} \int_0^{???}\int_{0}^{4 \sec \phi} \rho^3 \sin^2 \phi \cos\theta \; d\rho \, d\phi \, d\theta +$$

$$+ \int_0^{2\pi}\int_{???}^{\pi/2}\int_0^{\cot\phi\csc\phi} \rho^3 \sin^2\phi \cos\phi \; d\rho\, d\phi \, d\theta = 0$$

Note: The textbook's answer gives $\phi = \arctan \left(\frac{1}{2} \right)$

Thank you

I think the difficult part is to know why has to be $\cot\phi\csc\phi$ and all that stuff, but it seems you got it very well, even the need for two integrals for the two different surfaces limiting the variation of $\rho$. Anyway.
Here is a plot of the intersection of the plane $z=4$ and the paraboloid with the $xz$ plane. Clearly $\tan\phi=2/4$. so, $\phi$ has to vary between $0$ and $\arctan(1/2)$ for the first integral and from here to $\pi/2$ for the second. All the other limits are ok.
More technically. The plane in sphericals is $\rho\cos\phi=4$ and the paraboloid $\rho=\dfrac{\cos\phi}{\sin^2\phi}$. In the intersection $\dfrac{\cos\phi}{\sin^2\phi}=\dfrac{4}{\cos\phi}\implies \tan^2\phi=1/4$ and dropping the negative solution.