Stuck at the proof of the Riemann-Lebesgue lemma I'm currently trying to prove the Riemann-Lebesgue lemma using lower Darboux-sums and an approximation of any integrable function $f: [0,1] \to \mathbb{R}$ defined as
$$t(x) := \begin{cases} m_i & \text{for } x_i \leq x < x_{i+1},\; i < n\\ m_n & \text{for } x= 1 \end{cases},$$
where $m_i := \inf\nolimits_{\xi \in [x_i, x_{i+1}]} f(\xi)$ and $P = \{x_i\}_{1 \leq i \leq n}$ is a partition of the interval $[0,1]$. Now I want to show that
$$\int_0^1 t(x) \cos(\lambda x) \; \mathrm dx \leq \varepsilon$$
for some $\varepsilon > 0$. 
Our assistant professor told us that it was possible to actually integrate $t(x) \cos(\lambda x)$ but I just don't see how to. I guess I would have to make use of the product rule twice (as $\int t(x) \; \mathrm dx = s(f,P)$), but the problem is that I don't know the integral of the lower Darboux-sum (or whether it even exists) and also I don't know the derivative of $t(x)$ (or whether it exists). 
How am I supposed to proceed? Is there a different trick to integrate $t(x) \cos(\lambda x)$?
Thanks for any answers in advance.

We can integrate piecewise:
$\int_0^1 t(x) \cos(\lambda x) \; \mathrm dx = \sum_{i=1}^{n-1} \int_{x_i}^{x_{i+1}} m_i \cos(\lambda x) \; \mathrm dx = \sum_{i=1}^{n-1} m_i \cdot \int_{x_i}^{x_{i+1}} \cos(\lambda x) \; \mathrm dx$
$ = \sum_{i=1}^{n-1} m_i \cdot \left. \left( \frac{1}{\lambda}\cdot \sin(\lambda x) \right) \right|_{x_i}^{x_{i+1}}$
$ = \frac{1}{\lambda} \cdot \sum_{i=1}^{n-1} m_i \cdot (\sin(\lambda x_{i+1}) - \sin(\lambda x_i)).$
