Verified Answer :

However the \(x_i\) are chosen, the sum is equivalent to the definite integral,

\(\displaystyle\lim_{n\to\infty}\sum_{i=1}^n x_i\cos x_i\Delta x=\int_0^{2\pi}x\cos x\,\mathrm dx\)

which can be computed via integration by parts. If \(u=x\) and \(\mathrm dv=\cos x\,\mathrm dx\), you have

\(\displaystyle\int_0^{2\pi}x\cos x\,\mathrm dx=[uv]_0^{2\pi}-\int_0^{2\pi}v\,\mathrm du\)

or equivalently,

\(\displaystyle\int_0^{2\pi}x\cos x\,\mathrm dx=[x\sin x]_0^{2\pi}-\int_0^{2\pi}\sin x\,\mathrm dx=[\cos x]_0^{2\pi}=0\)