Uhm…

For the non-mathsy people: cot is defined as cos/sin, so f1 and f2 should represent the same function – as Maple also confirms on the line simplify(f1-f2) – and yet it somehow manages to get different results for what should be the same integral. The correct result is the second one of them. I should note that evaluating the integrals numerically yields the same result for both to within the accuracy used.