What I meant is that [imath]f(x) = (x-\pi)\cos x[/imath] is anti-symmetric relative to [imath]\pi[/imath], i.e. [imath]f(x) = -f(2\pi-x)[/imath]. This means that in the partial sums (used in the definition of definite integrals) each element is canceled by the symmetrical element and all partial sums are 0.
This can also be achieved by breaking the integral into two: [imath]\int_0^{2\pi} f(x)dx = \int_0^{\pi} f(x)dx + \int_\pi^{2\pi} f(x)dx[/imath], and then replacing the variable in the second integral: [imath]u=2\pi-x[/imath]