Key idea: Both f and cosπx have period 2, so the integral over [−10,10] is 10 times the integral over [0,2].
- On [0,1), [x]=0 is even, so f=1−x. On [1,2), [x]=1 is odd, so f=x−1.
- Let I=∫01xcosπxdx=[πxsinπx]01−π1∫01sinπxdx=−π22.
- ∫01(1−x)cosπxdx=0−I. Putting u=x−1: ∫12(x−1)cosπxdx=∫01ucos(πu+π)du=−I.
- Over one period: −2I=π24. Over [−10,10]: π240.
- 10π2⋅π240=4.
Answer: 4