Calculate the volume of points in a cube where a function f(x,y,z) satisfies given conditions A value for each point in my data-set is defined as $$v=xyz$$where $$a\le x\le b$$$$c\le y\le d$$$$e\le z\le f$$
for ease of visualisation, for now I will assume the following:
$$a=c=e=0$$$$b=d=f=1$$$$0\le L\le 1$$
Treating $xyz$ as a cube, I am trying to calculate the volume of the cube where $v<L$. I have plotted a visualisation bellow as an aid in understanding my problem, where $L=0.2$.

For example, in the above cube I am trying to compute the volume of the yellow isovolume.
I thought that I might acheive this by setting $xyz=0.2$, and then triple integrating the function as follows:
$$\int_a^b\int_c^d\int_e^f(xyz-0.2)\,dz,dy\,dx$$
Which with my limits of $0$ and $1$ gives the following:
$$volume=\frac{x^2y^2z^2}{8} - 0.2xyz$$
However, the result of this function is $-0.075$, which is both smaller than expected, and also negative. I am unsure if this behaviour is due to the asymptotes in the function?
Does anyone have any idea how I can acheive my goal, and also point out the errors in my method? It would be much appreciated.
Thank you in advance!
 A: It's vague to me which quantity are you trying to compute. 
We want to have $xyz \le L$, that is upon fixing $x, y$ where they are positive, we want $z$ to satisfy $z \le \frac{L}{xy}$.
If you want to compute the regular volume.
\begin{align}&\int_0^1\int_0^1\int_0^{\min(\frac{L}{xy},1)}1\,\,\, dzdydx \\&=\int_0^1\int_0^1 \cdot \min\left(\frac{L}{xy},1\right)\,\,dydx\\&=\int_0^1\int_{\min(1, \frac{L}{x})}^1 \min\left(\frac{L}{xy},1\right)\,\,dydx + \int_0^1\int_0^{\min(1,\frac{L}{x})} \min\left(\frac{L}{xy},1\right)\,\,dydx\\
&=\int_0^1\int_{\min(1, \frac{L}{x})}^1\frac{L}{xy}\,\,dydx + \int_0^1\int_0^{\min(1,\frac{L}{x})}1 \,\,dydx
\\&=\int_0^1\frac{L}{x}\left(-\ln\left(\min(1,\frac{L}{x} \right) \right)\,dx +\int_0^1\min(1,\frac{L}{x}) \,dx\\
&=\int_L^1\frac{L}{x}\left(-\ln\left(\min(1,\frac{L}{x} \right) \right)\,dx \\&+\int_0^L\min(1,\frac{L}{x}) \,dx+\int_L^1\min(1,\frac{L}{x}) \,dx\\
&=\int_L^1\frac{L}{x}\left(-\ln\left(\frac{L}{x} \right) \right)\,dx +\int_0^L1 \,dx+\int_L^1\frac{L}{x} \,dx\\
&=L\left[\frac12\ln^2 \left(\frac{L}x \right) \right]_L^1 +L+L(-\ln L)\\
&=L\left( \frac{\ln^2 L}2-\ln L+1 \right)
\end{align}
Suppose you want to integrate $xyz$ over the region.
\begin{align}&\int_0^1\int_0^1\int_0^{\min(\frac{L}{xy},1)}{xyz}\,\,\, dzdydx \\&=\frac{1}2\int_0^1\int_0^1xy \cdot \min\left(\frac{L^2}{x^2y^2},1\right)\,\,dydx\\&=\frac{1}2\int_0^1\int_{\min(1, \frac{L}{x})}^1xy \cdot \min\left(\frac{L^2}{x^2y^2},1\right)\,\,dydx + \frac{1}2\int_0^1\int_0^{\min(1,\frac{L}{x})}xy \cdot \min\left(\frac{L^2}{x^2y^2},1\right)\,\,dydx\\
&=\frac{1}2\int_0^1\int_{\min(1, \frac{L}{x})}^1\frac{L^2}{xy}\,\,dydx + \frac{1}2\int_0^1\int_0^{\min(1,\frac{L}{x})}xy \,\,dydx
\\&=\frac{1}2\int_0^1\frac{L^2}{x}\left(-\ln\left(\min(1,\frac{L}{x} \right) \right)\,dx + \frac{1}4\int_0^1x\min(1,\frac{L^2}{x^2}) \,dx\\
&=-\frac{L^2}2\int_L^1\frac{1}{x}\left(\ln\left(\frac{L}{x} \right) \right)\,dx + \frac{1}4\int_L^1\frac{L^2}{x} \,dx+\frac{1}4\int_0^Lx \,dx\\
&=-\frac{L^2}{2}\left[-\frac12 \ln^2 \left( \frac{L}{x}\right) \right]_L^1 + \frac{L^2}4(-\ln L)+\frac{L^2}8\\
&=\frac{(L\ln L)^2}{4} - \frac{L^2\ln L}4+\frac{L^2}8\end{align}
