# Is it legal to convert triple integral to a double integral problem instead?

i am given the following problem: $$\iiint_K e^z$$ where :

$$K \{x^2+y^2+z^2 \leq 1\}$$

here are the steps that i did= $$z=\sqrt{1-x^2-y^2}$$

then the problem becomes a double integral problem : $$\iiint_K e^z = \iint_D e^{\sqrt{1-x^2-y^2}} dxdy$$

using the polar coordinates we get: $$x=r \cos(t)$$ $$y=r\sin(t)$$ $$0\leq t \leq 2\pi$$ $$0\leq x\leq1$$ partial derivitives of $z_x, z_y$ are given by: $$z_x= \frac{-x}{\sqrt{1-x^2-y^2}}$$
$$z_y= \frac{-y}{\sqrt{1-x^2-y^2}}$$ now the integral becomes: $$\int_0^1\int_0^{2\pi}\frac{e^\sqrt{1-r^2} }{\sqrt{1-r^2}}r dtdr$$ $$=2\pi \int_0^1 e^udu$$ $$=2\pi(e-1)$$ my question here if this operation is mathematically legal, given that this is really a projection on the $xy$ plane right?

For any $z_0\in[-1,1]$, the section $z=z_0$ of the ball $x^2+y^2+z^2\leq 1$ is a circle with radius $\sqrt{1-z_0^2}$, hence area $\pi(1-z_0^2)$. By Cavalieri's principle
$$\iiint_{B}e^{z}\,dx\,dy\,dz = \int_{-1}^{1}e^{z_0}\pi(1-z_0^2)\,dz_0 =\color{red}{\frac{4\pi}{e}}$$ nice and easy.