Approximate the sum of a non $C^1(0,1)$ function by its integral

348 Views Asked by At

Consider the function $f: [0,1] \to \mathbb{C}$ defined by $$ f(x)=\sum_{n=1}^{9} e^{2\pi n i x}, $$ so that $$ |f(x)|=\bigg|\frac{\sin(9\pi x)}{\sin(\pi x)}\bigg|. $$ I'm interested in approximating $\frac{1}{q}\sum_{0 \lt a \lt q} |f(\frac{a}{q})|$ by $\int_{0}^{1} |f(t)|dt$. The first idea that comes to mind is using the Euler Mac Laurin formula. The problem is that the function $|f(x)|$ is not continuosly differentiable. Another approach I tried was the following: By partial integration, for any $\alpha\in\mathbb{R}$ and $\delta\gt 0$, $$ \int_{\alpha}^{\alpha+\delta}(x-\alpha)f'(x)dx=\delta f(\alpha+\delta)-\int_{\alpha}^{\alpha+\delta} f(x)dx. $$ Therefore, by taking $\delta=1/q$ and $\alpha=a/q$, we have $$ \frac{1}{q}f\Big(\frac{a+1}{q}\Big)=\int_{\frac{a}{q}}^{\frac{a}{q}+\frac{1}{q}}f(x)dx+\int_{\frac{a}{q}}^{\frac{a}{q}+\frac{1}{q}}\Big(x-\frac{a}{q}\Big)f'(x)dx. $$ Hence, by taking absolute value and summing with respect to $a$ from $0$ to $q-1$, we have $$ \frac{1}{q}\sum_{0 \lt a \le q} |f\Big(\frac{a}{q}\Big)|\le \int_{0}^{1}|f(x)|dx + \frac{1}{q}\int_{0}^{1} |f'(x)| dx $$ The problem is that I would like a much more precise approximation because $\int_{0}^{1} |f'(x)|dx$ is quite big compared to $\int_{0}^{1}|f(x)|dx$, and I know that as $q$ gets bigger this is less of a problem, but I would also like to know how big does $q$ has to be in order for this sum to be well approximated by the integral. Is it possible to obtain a similar lower bound in terms of the integral plus an error term? And is there any way to bound the error term in terms of $q$ but that it doens't involve the integral of the absolute value of the derivative?