According to my calculusbook the following integral diverges: $$\int_{-\pi/2}^{\pi/2}\csc{x}dx$$
This is the case since $\csc{x}\ge\frac{1}{x}$ on $(0,\pi/2]$
My question is: I would have guessed the integral would be zero, since $\csc{x}$ is an odd function. Why is this not the case?
On $(0,\pi/2]$ the integral goes to $\infty$ and on $[-\pi/2,0)$ the integral goes to $-\infty$ so we have $\infty-\infty$, which is usually undefined, but doesn't the fact that $\csc{x}$ is odd imply that $\infty-\infty=0$ in this case?
The integral does not exist as proper Riemann integral because the function is not bounded. If you interpret the integral as limit of $\int_{\epsilon <|x|<\frac {\pi} 2} \csc (x) dx$ as $\epsilon \to 0$ then the integral exists and the value is $0$. As a Lebesgue integral it does not exist because the integrand behaves like $\frac 1 x$ near $0$. So the answer depends very much what type of integral you want to consider.