My calculus book says that the integral of $\frac1x$ cannot cross zero. Now it seems obvious that because of symmetry, there will always be an interval whose integrals are equal in magnitude and opposite insign, so cancel, even though they do not converge.
Now typing into wolframalpha I got "does not converge" and only at the bottom did the expected result appeared ($\ln|b|-\ln|a|$) as "Cauchy principal value" (CPV, which I looked up on wikipedia). Why that fancyness? Does this has some implications in some application area?
And also, when I ask wolframalpha about "integral of cos/sin from $0$ to $\frac\pi2$", I get infinity (intuitive, looking at the plot, although $\ln|sin(\frac\pi2)|-\ln|sin(0)|$ is admittedly wrong ) as "CPV", but when I ask for "integral of cos/sin from $0$ to $\pi$" which I expect to be zero, because the plot is symmetric/odd I get "does not converge" and there is no CPV result either. Why?