I am trying to find the marginal pdf of a uniform distribution on a unit disk.
Let $f_{XY}=\frac{1}{\pi}$, where $X^2+Y^2\leq1$
Here's my attempt:
$$f_X(x)=\int^{\sqrt{1-x^2}}_{-\sqrt{1-x^2}}\frac{1}{\pi}dy = \frac{1}{2\sqrt{1-x^2}}$$
But i'm not sure whether the upper and lower limits are right. Even if I am right, I want to know why the limits look like this instead of $-1$ and $1$
Your procedure is correct...but some errors in the calculations
$$x^2+y^2\le 1$$
Because your joint density is defined over a disk and not over a square. More formally, solving in $y$ the above inequality you get
$$-\sqrt{1-x^2}\le y \le \sqrt{1-x^2}$$
thus integrating $f_{XY}$ w.r.t. $y$ you get
$$f_X(x)=\frac{1}{\pi}\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}dy=\frac{2}{\pi}\sqrt {1-x^2}\cdot\mathbb{1}_{[-1;1]}(x)$$