Key idea: Use ∫0af(x)dx=∫0af(a−x)dx together with [t]+[−t]=−1 for non-integer t.
- Let I=∫0π[cotx]dx. Replacing x by π−x gives I=∫0π[−cotx]dx.
- Adding: 2I=∫0π([cotx]+[−cotx])dx.
- cotx is an integer only at finitely many points, which do not change the integral. Everywhere else the bracket equals −1.
- So 2I=−π, which gives I=−2π.
Answer: (D) −2π