# Changing the order of integration to find the volume

My goal is to set up the triple integral that will solve the volume $$\iiint \ xyz \ dV$$ if S if the region bounded by the cylinders $$x^2 + y^2 = 25$$ and $$x^2+ z^2 = 25$$ and the 1st octant with dV = dxdydz.

With order dV = dzdydx, the value of the volume is $$\frac{15625}{24}$$. My attempt is to set up the triple integral with order dV = dxdydz in which it should have the same answer with the triple integral with order dV = dzdydx.

The S I have computed is S $$\lbrace (x, y, z) \in \mathbb{R}^3: 0 \leq x \leq 5, 0 \leq y \leq \sqrt{25 - x^2}, 0 \leq z \leq \sqrt{25 - x^2} \rbrace$$ this is for triple integral with order dV = dzdydx

The S I have computed is S $$\lbrace (x, y, z) \in \mathbb{R}^3: 0 \leq x \leq \sqrt{25 - \frac{y^2}{2} - \frac{z^2}{2}}, 0 \leq y \leq \sqrt{50 - z^2}, 0 \leq z \leq \sqrt{50} \rbrace$$ this is for triple integral with order dV = dxdydz

When I set up the triple integral, I found out that it should be $$\frac{1}{2} \int_0^\sqrt{50} \int_0^\sqrt{50-z^2} \int_0^\sqrt{25 - \frac{y^2}{2} - \frac{z^2}{2}} xyz \ dxdydz$$ and not simply $$\int_0^\sqrt{50} \int_0^\sqrt{50-z^2} \int_0^\sqrt{25 - \frac{y^2}{2} - \frac{z^2}{2}} xyz \ dxdydz$$. What is the principle behind this? Why I should divide the volume of this triple integral to 2?

The second $$S$$ is incorrect. On one surface we have $$0\le x\le\sqrt{25-y^2}$$ and on the other $$0\le x\le\sqrt{25-z^2}$$, which one do you choose? Since we have to take the intersection of the regions enclosed by these surfaces, we take the intersection of these inequalities as well, i.e.\begin{align*}0\le x\le\sqrt{25-y^2}\text{ and }0\le x\le\sqrt{25-z^2}&\iff0\le x\le\min\{\sqrt{25-y^2},\sqrt{25-z^2}\}\\& \iff0\le x\le\begin{cases}\sqrt{25-y^2},&0\le z
I have attached a visual of the region. The horizontal plane is the $$xy$$ plane and the vertical axis is $$z$$ axis. I have tried to show its cross-sections lying in $$xy,yz,xz$$ planes. You may see the cross-section in the $$yz$$ plane is the square $$0\le y,z\le5$$. Thus we will have to split the integral according as $$y>z$$ or $$y\le z$$:$$I=\left[\int_{z=0}^{z=5}\int_{y=z}^{y=5}\int_{x=0}^{x=\sqrt{25-y^2}}+\int_{z=0}^{z=5}\int_{y=0}^{y=z}\int_{x=0}^{x=\sqrt{25-z^2}}\right]xyz~dx~dy~dz$$