Let $f(x)= \begin{cases} 1 & |x|\lt 1 \\ 0 & |x|\ge 1 \end{cases}$
I want to find the convolution $f(x) \ast f(x) = \int\limits^{\infty}_{-\infty}f(y)f(x-y)\,\mathrm{d}y$
I started out by: $\;\;=\int\limits_{-1}^{1}f(x-y)\,\mathrm{d}y\;\;$ from here I tried variable substitution: $t=x-y,\;\; \mathrm{d}t=-\mathrm{d}y$
and then I get $\int\limits^{x-1}_{x+1}-\mathrm{d}t=-t|^{x-1}_{x+1}=-(x-1-x-1)=2$
I know the answer is $f(x)\ast f(x) = \begin{cases} 2-|x| & |x|\lt 2 \\ 0 & |x|\ge 2\end{cases}\;\;$ but can not figure out why (here's the Wolfram alpha answer).
Thank you for your time and effort.