$\newcommand{\+}{^{\daga}}
\newcommand{\ángulos}[1]{\left\langle\, nº 1 \,\right\rangle}
\newcommand{\llaves}[1]{\left\lbrace\, nº 1 \,\right\rbrace}
\newcommand{\bracks}[1]{\left\lbrack\, nº 1 \,\right\rbrack}
\newcommand{\ceil}[1]{\,\left\lceil\, nº 1 \,\right\rceil\,}
\newcommand{\dd}{{\rm d}}
\newcommand{\down}{\downarrow}
\newcommand{\ds}[1]{\displaystyle{#1}}
\newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
\newcommand{\fermi}{\,{\rm f}}
\newcommand{\piso}[1]{\,\left\lfloor #1 \right\rfloor\,}
\newcommand{\mitad}{{1 \over 2}}
\newcommand{\ic}{{\rm i}}
\newcommand{\iff}{\Longleftrightarrow}
\newcommand{\imp}{\Longrightarrow}
\newcommand{\isdiv}{\,\left.\a la derecha\vert\,}
\newcommand{\cy}[1]{\left\vert #1\right\rangle}
\newcommand{\ol}[1]{\overline{#1}}
\newcommand{\pars}[1]{\left (\, nº 1 \,\right)}
\newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\parcial #3^{#1}}}
\newcommand{\pp}{{\cal P}}
\newcommand{\raíz}[2][]{\,\sqrt[#1]{\vphantom{\large Un}\,#2\,}\,}
\newcommand{\sech}{\,{\rm sech}}
\newcommand{\sgn}{\,{\rm sgn}}
\newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
\newcommand{\ul}[1]{\underline{#1}}
\newcommand{\verts}[1]{\left\vert\, nº 1 \,\right\vert}
\newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\pp\int_{-\infty}^{\infty}{\tan\pars{x} \over x}\,\dd x = \pi:\ {\large ?}}$
$$
\mbox{Nota que}\quad
\pp\int_{-\infty}^{\infty}{\tan\pars{x} \over x}\,\dd x
=2\lim_{\epsilon \to 0^{+}}\int_{\epsilon}^{\infty}{\tan\pars{x} \over x}\,\dd x
=2\int_{0}^{\infty}{\tan\pars{x} \over x}\,\dd x\etiqueta{1}
$$
Con $\ds{N \in {\mathbb N}}$, vamos a considerar el siguiente integral:
\begin{align}
&\color{#c00000}{\int_{0}^{N\pi}{\tan\pars{x} \over x}\,\dd x}
=\int_{0}^{\pi}{\tan\pars{x} \over x}\,\dd x
+\int_{\pi}^{2\pi}{\tan\pars{x} \over x}\,\dd x + \cdots
+\int_{\pars{N - 1}\pi}^{N\pi}{\tan\pars{x} \over x}\,\dd x
\\[3mm]&=\int_{0}^{\pi}\tan\pars{x}\sum_{n = 0}^{N - 1}{1 \over x + n\pi}\,\dd x
={1 \over \pi}\int_{0}^{\pi}\tan\pars{x}
\color{#00f}{\sum_{n = 0}^{N - 1}{1 \over n + x/\pi}}\,\dd x\tag{2}
\end{align}
\begin{align}
&\color{#00f}{\sum_{n = 0}^{N - 1}{1 \over x + n\pi}}
=\sum_{n = 0}^{\infty}\pars{{1 \over n + x/\pi} - {1 \over n + N + x/\pi}}
=N\sum_{n = 0}^{\infty}{1 \over \pars{n + x/\pi}\pars{n + N + x/\pi}}
\\[3mm]&=N\,{\Psi\pars{x/\pi} - \Psi\pars{N + x/\pi}
\over \pars{x/\pi} - \pars{N + x/\pi}}
=\color{#00f}{\Psi\pars{N + {x \over \pi}} - \Psi\pars{x \over \pi}}\tag{3}
\end{align}
donde $\ds{\Psi\pars{z}}$ es la
Digamma Función y hemos utilizado
A&S de la tabla de fórmula ${\bf\mbox{6.3.16}}$.
Reemplazamos $\pars{3}$$\pars{2}$:
\begin{align}
&\color{#c00000}{\int_{0}^{N\pi}{\tan\pars{x} \over x}\,\dd x}
={1 \over \pi}\int_{0}^{\pi}\tan\pars{x}\bracks{%
\Psi\pars{N + {x \over \pi}} - \Psi\pars{x \over \pi}}\,\dd x
\\[3mm]&=\int_{0}^{1}\tan\pars{\pi x}\bracks{\Psi\pars{N + x} - \Psi\pars{x}}\,\dd x
\\[3mm]&=\int_{-1/2}^{1/2}\bracks{-\cot\pars{\pi x}}\bracks{%
\Psi\pars{N + x + \half} - \Psi\pars{x + \half}}\,\dd x
\\[3mm]&=-\int_{0}^{1/2}\!\!\!\!\!\!\!\cot\pars{\pi x}\bracks{%
\Psi\pars{N + x + \half} - \Psi\pars{x + \half} - \Psi\pars{N - x + \half} + \Psi\pars{-x + \half}}\,\dd x
\end{align}
Hoever ( véase a&S de la tabla de identidad ${\bf\mbox{6.3.7}}$ ):
$$
-\Psi\pars{x + \mitad} + \Psi\pars{-x + \mitad}
=\pi\cuna\pars{\pi\bracks{x + \mitad}} = -\pi\tan\pars{\pi x}
$$
tal que
\begin{align}
&\color{#c00000}{\int_{0}^{N\pi}{\tan\pars{x} \over x}\,\dd x}
={\pi \over 2}-\
\overbrace{\int_{0}^{1/2}\cot\pars{\pi x}\bracks{%
\Psi\pars{N + x + \half} - \Psi\pars{N - x + \half}}\,\dd x}
^{\ds{\to 0\quad\mbox{when}\quad N \to \infty}}
\end{align}
Desde entonces ( véase el a&S tabla expansión asintótica ${\bf\mbox{6.3.18}}$ )
$$
\Psi\pars{z} \sim \ln\pars{z} - {1 \over 2z} - {1 \over 12z^{2}} + \cdots\,,
\qquad \verts{z} \gg 1\,,\quad \verts{{\rm arg}\pars{z}} < \pi
$$
tendremos $\ds{\int_{0}^{\infty}{\tan\pars{x} \over x}\,\dd x = {\pi \over 2}}$
y de $\pars{1}$:
$$\color{#00f}{\large%
\pp\int_{-\infty}^{\infty}{\tan\pars{x} \over x}\,\dd x = \pi}
$$