Why is the integral of sec^2(x) from 0 to pi infinity? Why is it, if you take the integral of sec^2(x) from 0 to pi, my calculator returns "infinity" as the answer, but according to the second fundamental theorem of calculus, I got 0 with my own work.
I integrated sec^2(x) to get tan(x), then evaluated at a, and b, and took the difference:
tan(pi) - tan(0) = 0 
I would love to understand how infinity is an answer that my "math tool" got. 
 A: You can't really take the integral on $[0,\pi/2]$ since $\sec^2x=1/\cos^2 x$ is discontinuous at $\pi/2$. So what we really want is
$$
\lim_{\theta\to\pi/2^-}\int_0^{\theta}\sec^2x\,dx+\lim_{\psi\to\pi/2^+}\int_{\psi}^\pi\sec^2x\,dx.
$$
We have to split the integral up around the singularity. In this case, we have
$$
\lim_{\theta\to\pi/2^-}\int_0^{\theta}\sec^2x\,dx=\lim_{\theta\to\pi/2^-}\tan x\big|^\theta_0=\lim_{\theta\to\pi/2^-}\tan\theta=\infty\\
\lim_{\psi\to\pi/2^+}\int_{\psi}^\pi\sec^2x\,dx=\lim_{\psi\to\pi/2^+}\tan x\big|_\psi^\pi=\infty.
$$
So the while the integral as you put it doesn't really work, this should approximate what your calculator is working out.
A: Hint
As you correctly found, the antiderivative of $\sec ^2(x)$ is $\tan (x)$. If the bounds of integration are $0$ and $a$, the value of the integral is  $\tan (a)$ which means that the results approached infinity when $a$ approached $\pi/2$.  
I am sure that you can take from here.
A: $sec^{2}(x)$ = $\frac{1}{cos^2(x)}$  As $x$ goes from 0 to $\frac{\pi}{2}$ what happends?  Well, think about this: $cos(\frac{\pi}{2})=0$. As we approach $\frac{\pi}{2}$ from either side, we have $\frac{1}{cos^2(x)} \rightarrow \infty$.  Then, if you think of the integral as measuring the area under the curve, you see why this integral goes to $\infty$.
.
