principal value of $\int_{-\infty}^{\infty}\frac{\sin^2(x)}{x^2}\mathrm{d}x$ I know the answer is $\pi$ there is a proof
here.
Now looking to my textbook (textbook image) the result should be $0$.
Using the last equation on the right hand page we have:
$$ i\pi(\sin^2(x))'|_{x=0} = 0 $$
and there are no other poles except $0$ so the result should be $0$. 
What is the problem? Is the definition for principal value different in the two cases?

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\color{#f00}{\int_{-\infty}^{\infty}{\sin^{2}\pars{x} \over x^{2}}\,\dd x} & =
\int_{-\infty}^{\infty}\
\overbrace{\bracks{\half\int_{-1}^{1}\expo{\ic kx}\,\dd k}}
^{\ds{{\sin\pars{x} \over x}}}\
\overbrace{\bracks{\half\int_{-1}^{1}\expo{-\ic qx}\,\dd q}\,\dd x}
^{\ds{{\sin\pars{x} \over x}}}
\\[3mm] & =
{\pi \over 2}\int_{-1}^{1}\int_{-1}^{1}\ \overbrace{%
\int_{-\infty}^{\infty}\expo{\ic\pars{k - q}x}\,{\dd x \over 2\pi}}
^{\ds{\delta\pars{k - q}}}\ \,\dd k\,\dd q =
{\pi \over 2}\int_{-1}^{1}\
\overbrace{\int_{-1}^{1}\delta\pars{k - q}\,\dd k}^{\ds{=\ 1}}\
\,\dd q
\\[3mm] & =
{\pi \over 2}\int_{-1}^{1}\dd q = \color{#f00}{\pi}
\end{align}
