Convolution of Real Function with Rectangle Function

Theorem
Let $f: \R \to \R$ be a bounded piecewise continuous real function.

Consider the rectangle function $\Pi: \R \to \R$.

Then:
 * $\forall x \in \R: \map \Pi x * \map f x = \ds \int_{x \mathop - \frac 1 2}^{x \mathop + \frac 1 2} \map f u \rd u$

where $*$ denotes the convolution integral.

Proof
By definition of convolution integral:
 * $\ds \map \Pi x * \map f x = \int_{-\infty}^\infty \map \Pi {x - t} \map f x \rd t$

The above integral exists because $f$ is discontinuous on a countable set (see Lebesgue-Vitali Theorem).

This is equal to:
 * $\ds \int_{-\infty}^{x - \frac 1 2} \map \Pi {x - t} \map f t \rd t + \int_{x - \frac 1 2}^{x + \frac 1 2} \map \Pi {x - t} \map f t \rd t + \int_{x + \frac 1 2}^\infty \map \Pi {x - t} \map f t \rd t$

By definition of the rectangle function we have:
 * $\map \Pi {x - t} = 1 \iff \size {x - t} \le \dfrac 1 2$


 * $\map \Pi {x - t} = 0 \iff \size {x - t} > \dfrac 1 2$

Therefore:

What remains is: