Evaluating the definite integral of $\cot^2(t)dt$ Given that:
$$\cot(t) \to \infty \text{ when } t=0$$
and:
$$\int \cot^2(t) dt = -\cot(t) -t +C$$
It seems strange that:
$$\left[-\cot(t)-(t)\right]^{\pi+\frac{\pi}{2}}_{\frac{\pi}{2}} = (-\cot^2(\pi+
\left(\frac{\pi}{2}\right))-(\pi+\left(\frac{\pi}{2}\right)))-(-\cot^2(\frac{\pi}{2})-(\frac{\pi}{2})) = \pi$$
since there as an asymptote in the middle of the area. Would somebody be able to identify my mistake? Even just a reference for me to read would be very much appreciated.
I am no mathematician, apologies!

The fundamental theorem of calculus breaks if there is a singularity in the integration interval.
Check the conditions of application: https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus#Formal_statements.
