I want to compute the distribution function of $X-Y$, denoted by $F_{X-Y}$, where $X,Y$ are indepedently uniformly distributed on $[-1,1]$.
\begin{align*} &F_{X-Y}(z)=\begin{cases} 0,&z\leq -2\\1,&z\geq2. \end{cases} \end{align*} Now, we consider the cases $-2\leq z\leq 2$: \begin{align*} &P(X-Y\leq z)=P(x\leq z+y)=\int\limits_{-1}^1\int\limits_{-1}^{z+y}\frac{1}{4}1_{[-1,1]}(y)1_{[-1,1]}(x)~dx~\!dy \end{align*} Next, we evaluate the indicator functions according to $z\in[-2,2]$. We observe: \begin{align*} &-1\leq y\leq 1,~-1\leq z+y\leq 1\\ &\iff -1\leq y\leq 1,~-1-z\leq y\leq 1-z\\ &\text{if } z\in[-2,0]\implies -1-z\leq y\leq1\\ &\text{if } z\in[0,2]\implies -1\leq y\leq1-z. \end{align*} Based on those inequalities we can deduce the intervals where the indicator functions attain $1$: \begin{align*} &\dots=\int\limits_{-1}^1\int\limits_{-1}^{z+y}\frac{1}{4}1_{[-1,1]}(y)1_{[-1,1]}(x)~dx~\!dy\\ &=\begin{cases} \frac{1}{4}\int\limits_{-1-z}^1\int\limits_{-1}^{z+y}1~dx~\!dy=\frac{1}{2}+\frac{z}{2}+\frac{z^2}{8},&z\in[-2,0],\\\frac{1}{4}\int\limits_{-1}^{1-z}\int\limits_{-1}^{z+y}1~dx~\!dy=\frac{1}{4}\int\limits_{-1}^{1-z}z+y+1~dy=\frac{1}{4}(y+\frac{y^2}{2}yz)\Big|_{-1}^{1-z}=\frac{1}{2}-\frac{z^2}{8},&z\in[0,2]. \end{cases} \end{align*} The case of $z\in[0,2]$ is wrong it should be instead $\frac{1}{2}+\frac{z}{2}-\frac{z^2}{8}$ but I don't see my mistake? Maybe someone else spots my mistake.