The original question was to calculate the characteristic function of a triangular distribution, with PDF $\frac{1}{a}(1-\frac{|x|}{a})$ for $x\in(-a,a)$, so I was calculating it by definition, but at my class, we "saw" that this PDF is also PDF of $X-Y$, where X,Y iid and ~$U(0,a)$. Here I am, trying to prove it.
I calculated the PDF of -Y, which is: $g(y)=\frac{1}{a}$ for $y\in(-a,0)$
now, the density of X-Y should be $h(x)=\int_{-\infty}^{\infty}f(x-y)g(y)dy$, but I do not know how to convert it from here.
Let's do it for special case $a=1$.
Observe that $f(x-y)g(y)$ takes values in $\{0,1\}$ and: $$f(x-y)g(y)=1\iff f(x-y)=1\text{ and } g(y)=1\iff 0<x-y<1\text{ and }-1<y<0\iff$$$$ x-1<y<x\text{ and }-1<y<0$$
That inspires to discern the cases:
So actually we found that $h(x)=1-|x|$ if $-1<x<1$ and $h(x)=0$ otherwise.
This is the result for $a=1$.
We can find the more general case by observing that $\frac1{a}h(\frac{x}{a})$ is the PDF for $a(X-Y)$