TITLE: Convolution of a function with itself
QUESTION [13 upvotes]: Function $\phi (x)$ is defined as:
$$\phi(x) = \begin{cases} 1 & \text{ if } 0 \leq x \leq 1\\0 & \text{otherwise} \end{cases} $$
How do I find the convolution of $\phi(x)$ with itself? I tried to take the Fourier transform of $\phi(x)$ and square it, then take the inverse Fourier transform. However, in the latter step I couldn't figure out what the limits on the integral are (I think it would be integral in all space, but I'm not sure). More importantly, I don't know how to do that integral for the inverse Fourier step. Thank you!

REPLY [4 votes]: I feel hopeless for midterm tomorrow, so I just added my answer to the question of "Future Professor:"
$$\phi(x) = \begin{cases} 1 & \text{ if } 0 \leq x \leq 1\\0 & \text{otherwise} \end{cases} $$
The answer of this convolution should be: $$\phi_{[0,1]}*\phi_{[0,1]}(x) = \begin{cases} 0 &  x\leq 0\\x & 0 \leq x \leq 1 \\ 2-x & 1 \leq x \leq 2 \\0 & x\geq 2 \end{cases}$$
To see why, we write convolution in the form: 
$$\phi_{[0,1]}*\phi_{[0,1]}(x) = \int_{\mathbb{R}} \phi_{[0,1]}*\phi_{[0,1]}(x-y)dy = \int_{0}^{1}\phi_{[0,1]}(x-y)dy$$
This is the definition of Convolution, you should know it by now "sir"
For $x \leq 0,\; y \in [0,1]$, we have $\phi_{[0,1]}(x-y) = 0$, so the integral equals 0.
For $x,y \in[0,1]$, we have  $\phi_{[0,1]}(x-y) = 1$ when $0 \leq y \leq x$, so the integral equals x. 
For $x \in [1,2], y \in [0,1]$, we have $\phi_{[0,1]}(x-y) = 1$ when $x-1 \leq y \leq 1$, so the integral equals $2-x$.
For $x \geq 2$, $y \in [0,1]$, we have $\phi_{[0,1]}(x-y) = 0$, so the integral equals 0.
P/S: This answer is from a suffered and desperate Applied Math student in Haunted Building.