I don't understand how to do this question:
Compute the convolution $(f*g)(x)$ for the functions $f(x)$ and $g(x)$ defined as,
$f(x)$=\begin{cases} 0&\text{if}\, x\ < a\\ \exp(-x)&\text{if}\, a \leq x \ \ \end{cases}
$g(x)$=\begin{cases} 1&\text{if} \, \frac{-1}{2} \leq x \leq \frac{1}{2}\\ 0&\text{otherwise}\ \ \end{cases}
where $(f*g)(x) = \int^{\infty}_{-\infty}f(y)g(x-y)dy$
The answer should be a piecewise function like $f$ and $g$, with a as parameter, like the $f(x)$ function.
The problem I have is that I don't understand how to do the calculations with the intervals given for $f(x)$ and $g(x)$. Any help is appreciated :)
Kind regards, Pontus
$$(f*g)(x) = \int^{\infty}_{a}e^{-y}g(x-y)dy$$ by the definition of $f$
$$(f*g)(x) =e^{-x}\int^{\frac{1}{2}}_{-\frac{1}{2}}e^{p}dp$$ which leaves the range $-\frac{1}{2}\le a-x \le \frac{1}{2}$ and
$$(f*g)(x) =e^{-x}\int^{a-x}_{-\frac{1}{2}}e^{p}dp$$