Double integral problem I'm given that 
$$
f(x,y)= \cases{
 \left(y-\tfrac{1}{2}\right)\left(x-\tfrac{1}{2}\right)^{-3} &  \text{if } \left|y-\tfrac{1}{2}\right|<\left|x-\tfrac{1}{2}\right|
\\
0 & \text{otherwise}
}
$$
I want to find the double integrals $$\int_0^1\int_0^1 f(x,y)\,dx\;dy$$ and $$\int_0^1\int_0^1 \left \lvert f(x,y)\right \rvert\,dx\;dy.$$
I've tried splitting each integral up into two integrals where the outer integral goes from $0$ to $\frac{1}{2}$ and from $\frac{1}{2}$ to $1$. But, I am having trouble determining what the inner integral bounds should be.
 A: $$f(x,y)= \cases{
 (y-\tfrac{1}{2})(x-\tfrac{1}{2})^{-3}, & \text{if } |y-\tfrac{1}{2}|<|x-\tfrac{1}{2}|
\\
0, & \text{otherwise}.
}$$  
Note that $|y-\tfrac{1}{2}|<|x-\tfrac{1}{2}|$ is true for: 
$$0 \leq x<1/2,\quad   x<y<1-x$$
or
$$1/2<x\leq1,\quad   1-x<y<x $$
Thus,
$$\int_0^1\int_0^1f(x,y)\,dx\,dy = \int_0^{0.5}dx\int_x^{1-x}dy\,f(x,y) + \int_{0.5}^{1}dx\int_{1-x}^{x}dy\,f(x,y),$$
and similarly
$$\int_0^1\int_0^1|f(x,y)|\,dx\,dy = \int_0^{0.5}dx\int_x^{1-x}dy\,|f(x,y)| + \int_{0.5}^{1}dx\int_{1-x}^{x}dy\,|f(x,y)|.$$
A: It's not so hard as we're interested only in $\;x,y>0\;$ :
$$\begin{align*}&x,y\ge\frac12\implies y-\frac12<x-\frac12\implies y<x\\{}\\&0<x<\frac12\;,\;\;y\ge\frac12\;\implies\;y-\frac12<\frac12-x\implies y\le-x+1\\{}\\&0<x,y<\frac12\;\implies\;\frac12-y<\frac12-x\implies y>x\\{}\\&x\ge\frac12\,,\,0<y<\frac12\;\implies\;\frac12-y<x-\frac12\implies y>-x+1\end{align*}$$
Draw the above lines that determine the integration domain, and then we get:
$$\int\limits_0^1\int\limits_0^1 f(x,y)\,dxdy=\int\limits_0^{1/2}\int\limits_x^{-x+1} f(x,y) \,dydx+\int\limits_{1/2}^1\int\limits_{-x+1}^x f(x,y)\,dydx$$
