pdfs of i.i.d. with uniform distribution As I understand it, from Robert Israel's answer here, if $X, Y, Z$ are i.i.d. with uniform distribution on the interval $[0,1]$, then $T = X+Y+Z$ has the piecewise PDF given in the link.
How did he find this? How would I go about finding the PDF for any $X_1, X_2, \dots X_n$ that are i.i.d. with uniform distribution on the interval $[0,1]$? Where should I look for literature on the subject?
 A: 
Theorem: Let $X$ and $Y$ be two  independent  random  variables  with  pdf
  $f_X(x)$ and $f_Y(y)$ then the sum $Z = X+Y$ is a random variable with pdf
  $$f_Z(z) = (f_X * f_Y)(z) \equiv \int_{-\infty}^\infty f_X(z-y)f_Y(y)\,{\rm d}y$$ 

For a reference see e.g. Theorem 7.1 here. 
If $f_n$ is the pdf of the sum $S_n = X_1 + X_2 + \ldots + X_n$ and $X_i$ are i.i.d. random variables with uniform distribution on $[0,1]$ then the theorem above gives us
$$f_{n}(z) = \int_0^1 f_{n-1}(z-y)\,{\rm d}y = \int_{z-1}^{z} f_{n-1}(t)\,{\rm d}t$$
so we can compute the pdf of $S_n$ recursively (see the end of the answer for a simple algorithm). 

For $n=2$ we find
$$f_{X+Y}(z) = \int_{z-1}^{z} f_X(t)\,{\rm d}t = \cases{z&$0 \le z\le 1$\cr 2-z&$1 \le z\leq 2$\cr 0& otherwise}$$ 
${\bf\text{Explanation}}$: The integrand $f_{X}(t)$ is zero if $t \not \in [0,1]$ and one otherwise so if $0<z<1$ the integral is simply $\int_0^{z}{\rm d}z = z$ and if $1<z<2$ then the integral is $\int_{z-1}^1{\rm d}z = 2-z$.
For $n=3$ we find:
$$f_{X+Y+Z}(z) = \int_{z-1}^z f_{X+Y}(t)\,{\rm d}t = \cases{ \frac{z^2}{2}&$0 \le z\le 1$\cr -\frac 3 2- {z}^{2}+3\,z&$1 \le z\le 2$\cr \frac 92-3\,z+\frac{z^2}{2}&$2 \le z\leq 3$\cr 0& otherwise}$$ 
${\bf\text{Explanation}}$: The integrand $f_{X+Y}(t)$ is zero if $t\not\in[0,2]$ so if $0<z<1$ the integral becomes $\int_0^z z\,{\rm d}z = \frac{z^2}{2}$. If $1<z<2$ the integral becomes $\int_{z-1}^{1}z\,{\rm d}z + \int_{1}^{z}(2-z)\,{\rm d}z = -\frac{3}{2} - z^2 + 3z$. Since the pdf is symmetric about the midpoint $z=\frac 32$ the pdf becomes $\frac{(3-z)^2}{2} = \frac{9}{2} - 3z  + \frac{z^2}{2}$ if $2<z<3$.

Here is a simple algorithm for evaluating the integrals in general. If we have derived that
$$f_{n}(z) = \cases{ g_{1,n}(z) & $0 \le z\le 1$ \cr g_{2,n}(z) & $1 \le z\le 2$ \cr \ldots & $\ldots$}$$
then we get the following recurrence for $g_{k,n+1}(z)$: $$g_{1,n+1}(z) = \int_0^z g_{1,n}(z)\,{\rm d}z$$ and  $$g_{k,n+1}(z) = \int_{z-1}^{k-1} g_{k-1,n}(z)\,{\rm d}z + \int_{k-1}^z g_{k,n}(z)\,{\rm d}z~~~~~\text{for}~~~~ k=2,3,\ldots, \lfloor n/2\rfloor$$
and the remaining functions can be found by using the symmetry of $f_{n+1}(z)$ about $z=\frac{n+1}{2}$ so $g_{k,n+1}(z) = g_{n+1-k,n+1}(n+1-z)$.
Here is an implementation of this in Mathematica:
n = 4;
ffunc = Table[If[i == 1, 1, 0], {i, 1, n}];
Do[
  temp = ffunc;

  temp[[1]] = Integrate[ffunc[[1]], {z, 0, z}];
  Do[temp[[k]] = Integrate[ffunc[[k - 1]], {z, z - 1, k-1}] + Integrate[ffunc[[k]], {z, k-1, z}];
   , {k, 2, Floor[(i + 1)/2]}];
  Do[temp[[k]] = temp[[i - k + 1]] /. z -> i - z;, {k, Floor[(i + 1)/2] + 1, i}];

  ffunc = temp;
  , {i, 2, n}];
ExpandAll[ffunc] // MatrixForm

