Q: Independence of uniformly distributed random variables on a square. 
Let $X$ and $Y$ be two random variables that are uniformly distributed in the square of vertices $(1,0), (0,1), (-1,0)$ and $(0,-1).$
  Are they independent?

My thinking:
To answer the question I must see whether or not the joint density function is the product of the marginal distributions which can be found once I have written the joint pdf.
I check for the area of the square in which they are uniformly distributed (so I can do simple substitution and find my joint pdf), I find this area is $2$. Now my joint pdf is:
\begin{align}
&\begin{aligned}
f_{X,Y}(x,y) =
 \begin{cases}
      1/2, & \text{if } (x,y)\in D \\
      0, & \text{otherwise}
    \end{cases}
\end{aligned}
\end{align}
where $D$ is my square.
Off to find $f_Y(y)$ and $f_X(x)$. By definition, $f_Y(y)=\int_{-\infty}^{\infty} f_{X,Y}(x,y)\text{d}x$. So I see that $-1<x<1$ and therefore
$f_Y(y)=\int_{-1}^{1} (1/2) \text{d}x = (1/2)[x]_{-1}^{1}=(1/2)\cdot 2 = 1$. And due to similar arguments I'd get $f_X(x)=1$. So $f_X(x)\cdot f_Y(y)\neq f_{X,Y}(x,y)$, which goes against what those well versed in probability and statistics know, and it's that they indeed are independent.
Page four of ('https://www.math.arizona.edu/~tgk/464_f14/chap6.pdf') says:
"Suppose that $X$ and $Y$ have a joint density function that is uniform on the square $[a,b]\times[c,d]$, then they are independent."
So naturally the question arises, what am I doing wrong?

A: Note $D$ is diamond-shaped ($\lozenge$)
$$D=\{\langle x,y\rangle\in\Bbb R^2: -1\leq x\leq 1, -1+\lvert x\rvert\leq y\leq 1-\lvert x\rvert\}\\~~~=\{\langle x,y\rangle\in\Bbb R^2:-1\leq y\leq 1, -1+\lvert y\rvert\leq x\leq 1-\lvert y\rvert\}$$
So your integration has to take that into account. $$\begin{align}f_Y(y)&=~\int_{-1+\lvert y\rvert}^{1-\lvert y\rvert}\tfrac 12\cdot\mathbf 1_{y\in[-1.. 1]}~\mathrm d x\\[2ex]&=(1-\lvert y\rvert)~\mathbf 1_{y\in[-1..1]}\end{align}$$

Remark: Even without integration, it should be clear that the distribution entails that the variables will be dependent.   The value of $X$ places conditions on the possible values for $Y$ - consider the possible values for $Y$ when $X$ approaches $1$ (eg, say $X=0.99$).

A: Hint
One way to think about statistical independence is this:  If I know the value of one variable, do I have any information or constraints upon the other?  For the axes-aligned square, of course you do not.  If I tell you that $x = .7$, you have no additional information about the $y$ distribution; $y$ could have any value between $0$ and $1$.
Now consider your diamond case.  If I tell you that $x = .9$, do you have any information about $y$?  Think about it.  Can $y=.8$?  Can $y = -.7$?
Hope this helps.
