The following results:
For any function $f \in C^1[a,b]$ and any $q \in \mathbb{N}$,
$$\sum_{a < k \leq b, (k,q)=1} f(k)=\frac{\varphi(q)}{q} \int_a^b f(x) dx + O(\tau(q) (\sup_{x \in [a,b]} |f(x)|+\int_a^b |f'(x)| dx)).$$
And for any function $f \in C^1[a,b]$, $$\sum_{a < k \leq b}\frac{\varphi(k)}{k} f(k)=\frac{1}{\zeta(2)} \int_a^b f(x) dx + O(\log{b} (\sup_{x \in [a,b]} |f(x)|+\int_a^b |f'(x)| dx)).$$
These two looks like some kind of transformation related to Euler summation, but I have no idea. Could anyone point to me where can I read about things like these?