Estimation of a sum independent of $n$ Suppose $f$ is differentiable on $[0,1]$, $f(0)=f(1)$, $\int_0^1 f(x)dx=0$, $f'(x)\neq 1$. Furthermore, let $g(x)=f(x)-x$, $n\geq 2$ is an integer.
Show that $$\left|\sum_{i=1}^{n-1}g\left(\frac{i}{n}\right)\right|<\frac12.$$
I do not know how to prove it, only can prove $$-\frac{n}{2}<\sum_{i=0}^{n-1} g\left(\frac in\right)<-\frac n2+1$$

let $$f(x)\equiv 0 \Longrightarrow  g(x)=-x$$, and such all condition
But 
$$\sum_{i}^{n-1}g\left(\dfrac{i}{n}\right)=-\sum_{i=1}^{n-1}\dfrac{i}{n}=-\dfrac{n-1}{2}\to -\infty,n\to \infty$$
In fact, I think your reslut is true
we have  $f'(c)=0,c\in(0,1)$ since $f(0)=f(1)$
since $f'(x)\neq 1$,so $f'(x)<1$.
let $$g(x)=f(x)-x\Longrightarrow g'(x)=f'(x)-1<0$$
so
$$\dfrac{1}{n}-\dfrac{1}{2}=\int_{0}^{1}g(x)dx+\dfrac{1}{n}>\dfrac{1}{n}\left(\sum_{k=1}^{n}g\left(\dfrac{k}{n}\right)+1\right)=\dfrac{1}{n}\sum_{k=0}^{n-1}g\left(\dfrac{k}{n}\right)>\int_{0}^{1}g(x)dx=-\dfrac{1}{2}$$
