I can't find the exact limits to find the marginal probability density function (PDF) from a uniformly joint PDF. For a uniform probability density function (PDF) of two random variables $X$ and $Y$, the PDF exists only in the square of length $\sqrt{2}$, whose vertices are $(1,0)$, $(0,1)$, $(-1,0)$ and $(0,-1)$ (please see attached image below, where I also defined the equations of the lines).
Now, we know that the area of this square is $2$, and its PDF is $$f_{X,Y}(x,y)=\frac{1}{2}$$
Now, if I want to find the marginal PDF of $X$, for example, I want to sum the joint PDF over all values $Y$ can take. But I don't know what the limits of integration will be. Do I just sum from -1 to 1 for $y$?

 A: In cases like this it is often handsome to go for finding the CDF of $X$.
Observe that for $x\in[-1,0]$ we have: $$F_X(x)=P(X\leq x)=\frac12(1+x)^2$$
This expression corresponds with area of triangle with vertices $(-1,0)$,$(x,x)$ and $(x,-x)$ divided by $2$.
For $x\in[0,1]$ we find on a similar way that: $$F_X(x)=P(X\leq x)=1-\frac12(1-x)^2$$
To be complete we note that (of course) $F_X(x)=0$ for $x<-1$ and that $F_X(x)=1$ for $x>1$.
Now PDF $f_X(x)$ can be found by differentiating $F_X(x)$ leading to:$$f_X(x)=1-|x|\text{ if }|x|\leq1\text{ and }f_X(x)=0\text{ otherwise}$$
A: When you are finding the marginal pdf of $X$ from the joint pdf of $X$ and $Y$, you are calculating the integral
$$f_X(x) = \int_{-\infty}^\infty f_{X,Y}(x,y)\, \mathrm dy\tag{1}$$
in which $x$ is just a constant, say $0.123$ or $-0.456$. That is, you need to evaluate $(1)$ for uncountably infinitely many values of $x$. However, things are not as bad as this suggests, because we can figure out the value of $f(x)$ for huge chunks of values of $x$ if we just try to draw a few more lines on the figure that you have sketched.  For example, Eq. $(1)$ tells us that
for any choice of $x \in [-1,0)$,
\begin{align}f_X(x) &= \int_{-\infty}^\infty f_{X,Y}(x,y)\, \mathrm dy\\
&= \int_{-1-x}^{1+x} \frac 12\, \mathrm dy\end{align}
which you can figure out by drawing a vertical line at some choice of $x \in [-1,0)$ and checking where it intersects the edges of the joint pdf support. You even have the equations for the edges marked on your sketch!!
Similarly,  for any choice of $x \in [0,1]$,
\begin{align}f_X(x) &= \int_{-\infty}^\infty f_{X,Y}(x,y)\, \mathrm dy\\
&= \int_{-1+x}^{1-x} \frac 12\, \mathrm dy.\end{align}
