Let x0,x1,…,xn−1,xn=x0 be reals and let f:R→R be a function. The numbers yi for i=0,1,…,n−1 are chosen such that yi is between xi and xi+1. Prove that ∑i=0n−1(xi+1−xi)f(yi) can attain both positive and negative values, by varying the yi.