Bring one factor out of a sum using Lipschitz continuity

34 Views Asked by At

I'm currently doing my master's thesis and I have to work with Lipschitz continuous functions for the first time. I need to factor out a Lipschitz continuous function out of a sum, I have found a reasoning but it seems to my that I'm wrong.

Let $f:(0,1) \to \mathbb{R}$ be a bounded Lipschitz continuous function and $g:\mathbb{R} \to \mathbb{R}$ be another bounded function.
Then we can say that for $T >0$: $$ \begin{align} \frac{1}{T}\sum_{m=1}^{T} f\left(\frac{m}{T}\right)g(m) &= \frac{1}{T}\sum_{n=1-k}^{T-k} f\left(\frac{n+k}{T}\right)g(n+k) \end{align} $$ by substituting $m = n+k $ and now by using the Lipschitz continuity of $f$ we obtain, $$ \frac{1}{T}\sum_{n=1-k}^{T-k} f\left(\frac{n+k}{T}\right)g(n+k) = \frac{1}{T}\sum_{n=1-k}^{T-k} f\left(\frac{k}{T}\right)g(n+k) + \frac{1}{T}\sum_{n=1-k}^{T-k} O(nT^{-1}) $$ we can finally factor out $f$ such that : $$ \frac{1}{T}f\left(\frac{k}{T}\right)\sum_{n=1-k}^{T-k}g(n+k) + \frac{1}{T}\sum_{n=1-k}^{T-k}O(nT^{-1}) $$ for all $k=1, \dots, T$.

It seems to me that my reasoning is wrong but I can't figure out why and where.

NB: This is my first post :)