Determining Whether an Improper Integral Converges or Diverges

Determine whether \(\int_{0}^{\pi /2}\tan x\,dx\) converges or diverges.

Solution The function \(f (x)\) = \(\tan x\) is continuous on \(\left[ 0,\,\dfrac{\pi }{2}\right) \) but is not defined at \(\dfrac{\pi }{2}\), so \(\int_{0}^{\pi /2}\tan x\,dx\) is an improper integral. \[ \begin{eqnarray*} \int_{0}^{\pi /2}\tan x~dx\hbox{:} \lim\limits_{t\,\rightarrow \left( \pi /2\right) ^{-}}\int_{0}^{t}\tan x\,dx&=&\lim\limits_{t\,\rightarrow \ (\pi /2) ^{-}}\big[ \ln \vert \sec x \vert\big] _{0}^{t}\\[4pt] &=&\lim\limits_{t\,\rightarrow (\pi /2) ^{-}}[\ln \vert \sec t \vert -\ln \vert \sec 0 \vert ] \\[4pt] &=& \lim\limits_{t\,\rightarrow (\pi /2) ^{-}}\ln (\sec t)=\infty \end{eqnarray*} \]

So, \(\int_{0}^{\pi /2}\tan x\,dx\) diverges.