Contour integrate $\int_{-\infty}^{\infty} \frac{dt}{t}$ A paper (admittedly a physics paper) I read has 
$$\int_{-\infty}^{\infty} \frac{dt}{t}  = \pm i \pi$$
"where a semicircular path of infinitesimal radius $\epsilon$ passes either counterclockwise or clockwise around $t=0$, yielding $+i\pi$ or $-i\pi$."
Any symbolic computing software says the integral does not converge. Can someone explain this?
 A: Indeed, the integral does not converge, and $\pm i \pi$ is not a possible value for the integral of a real-valued function on an interval of real numbers, so taken at face value the statement makes no mathematical sense.  However, physicists have a habit of making statements that make mathematical sense only if you don't take them too literally.  In this case what makes mathematical sense is that the path integral $$\int_C \dfrac{dz}{z} = \pm i \pi$$
where $R > 0$ and $C$ is a path in the complex plane that goes from $-R$ to $R$ near the real line but avoids the origin, either passing above or below it.
A: The reason you get $\pm i\pi$ is explained perfectly in Robert Israel's question, but I would like to add something else.
Basically, it is claimed the integral in question is 
$$ \int_{-R}^{-\epsilon} \frac{1}{t}dt + \int_{\text{semicircle}} ... + \int_{\epsilon}^{R} \frac{1}{t}dt.$$
By symmetry, we have that
$$ \int_{-R}^{-\epsilon} \frac{1}{t}dt + \int_{\epsilon}^{R} \frac{1}{t}dt = 0,$$
leaving only that middle integral.
However - this symmetry argument only holds if the two integrals in question are finite, i.e. $R < \infty$ and $\epsilon > 0$, otherwise you are making the claim that $-\infty + \infty = 0$.
Most symbolic computing software, as you call it, know well enough that $-\infty + \infty$ is undefined and hence correctly state that the integral does not converge.
For physical purposes, however, it may be the case that $R$ is simply "very large" and $\epsilon$ is "very small", and hence the result is (somewhat?) justified.
A: As an alternative to interpreting the integral as a path along the real axis with a semi-circular deformation around the origin, we can interpret the integral of interest as 
$$\begin{align}
PV\int_{-\infty}^\infty \frac1t\,dt&\equiv \lim_{\epsilon\to 0^+}\lim_{L\to \infty}\int_{-L}^L \frac{1}{t\pm i\epsilon}\,dt\\\\
&=\lim_{\epsilon\to 0}\lim_{L\to \infty} \log\left(\frac{L\pm i\epsilon}{-L\pm i\epsilon}\right)\\\\
&=\mp i\pi
\end{align}$$
where the branch cut for the complex logarithm does intersect the straight-line path from $z=-L\pm i \epsilon$ to $z=L\pm i \epsilon$.
A: The integral 
$$
\int_{-\infty}^{+\infty} \frac{dx}{x} = \lim_{M_1, M_2\to+\infty} \lim_{\eta_1,\eta_2\to0^+} \left(\int_{-M_1}^{-\eta_1}\frac{dx}{x}+ \int_{\eta_2}^{M_2}\frac{dx}{x} \right) = \lim_{M_1, M_2\to+\infty} \lim_{\eta_1,\eta_2\to0^+} \log\frac{M_2\eta_1}{\eta_2M_1}
$$
as it stands obviously does not converge because none of the above (independent) limits give a finite answer. Nevertheless, we can choose some prescription to deal with the singularities in the integration domain, allowing us to associate a finite value to it.
For instance, we could declare that the above limits are to be taken in a symmetric way: $\eta_1=\eta_2$, $M_1=M_2$. Then, the value of the regularized integral is simply $\log 1 =0$.
Another possibility is as follows.
First, we take care of the singularity at $x=0$ by going around it with a small counterclockwise (clockwise) half-circular deformation of the real axis, as suggested by your reference; this amounts to moving the singularity slightly above (below) the real axis itself, namely to replacing $f(x)=1/x$ with
$$
f_\epsilon(x)=\frac{1}{x\mp i\epsilon}\,,
$$
for positive $\epsilon$. 
Then, the theory of distributions comes to our aid with the following identity (see below):
\begin{equation}
\lim_{\epsilon\to 0^+}f_\epsilon(x)= \mathrm{PV} \frac{1}{x}\pm i\pi\delta(x)\,,
\end{equation}
where PV is the Cauchy principal value.
This means that, whenever we integrate $f_\epsilon(x)\varphi(x)$, where $\varphi(x)$ is a smooth ''test'' function, which decays sufficiently fast at infinity,
$$
\lim_{\epsilon\to0^+} \int_{-\infty}^{+\infty}f_\epsilon(x) \varphi(x)dx=
\lim_{\eta\to0^+}\left(\int_{-\infty}^{-\eta}\frac{\varphi(x)}{x} dx + \int_{\eta}^{+\infty} \frac{\varphi(x)}{x} dx \right)\pm i\pi \varphi(0)
\\
=\lim_{\eta\to 0^+} \int_{\eta}^{+\infty} \frac{\varphi(x)-\varphi(-x)}{x}dx\pm i \pi \varphi(0)\,,
$$
(note the symmetric limit $\eta\to0^+$ in the integration limits).
Now, let us choose as $\varphi$ a smooth function $0\le\varphi(x)\le1$ defined by
$$
\varphi_M(x)= \begin{cases}
1 & \text{if } |x|<M\\
0 & \text{if } |x|>M+1\,.
\end{cases}
$$
Then, the integral on the right-hand side of the previous equation vanishes by the symmetry of $\varphi_M(x)$ and hence
$$
\lim_{\epsilon\to 0^+}\int_{-\infty}^{+\infty} f_\epsilon(x) \varphi_M(x) dx =  \pm i \pi\,.
$$
Since we got a result which does not depend on $M$, we may well sent $M\to+\infty$ and finally retrieve the regularized version of the starting integral
$$
\int_{-\infty}^{+\infty}\frac{dx}{x} \overset{\text{reg}}{=}\lim_{M\to+\infty} \lim_{\epsilon\to 0^+}\int_{-\infty}^{+\infty} f_\epsilon(x) \varphi_M(x) dx = \pm i\pi\,.
$$
[The above distributional identity is briefly justified by the following steps: choosing the branch cut of the logarithm along the negative real axis, as $\epsilon\to0^+$
$$
\frac{1}{x\mp i\epsilon}= \frac{d}{dx}\log(x\mp i \epsilon) = \frac{d}{dx}\left( \log|x| + i \mathrm{arg}(x\mp i \epsilon) \right) \\
= 
\frac{d}{dx}\left( \log|x| \mp i \arctan(\epsilon/x) \right) = \mathrm{PV} \frac{1}{x} \pm i\pi\delta(x) \,.]
$$
A: In addition to the other good information of earlier answers: this seeming paradox is a thing which had intermittently disturbed me for a long time. E.g., how could a real-valued integral (convergent or not) produce a complex value? WTF? Indeed!
Ok, yes, as in other comments and answers, a way to make sense of that not-convergent integral is as a "principal value integral", which, NB, is no longer a literal integral at all. And, even then, the PV resolution of divergence at $0$ does not quite cope with the divergence at $\pm\infty$.
Without necessarily trying to resolve those issue, there is a sorta-well-known result about the discrepancy between a complex-analysis limit presentation and the principal-value presentation: due to Sokhotski-Plemelj:
$$
\lim_{\varepsilon\to 0^+} \int_{-\infty}^\infty {f(x)\over x+\varepsilon i}\;dx
\;=\; -\pi i \,f(0) +PV\int_{-\infty}^\infty {f(x)\over x}\;dx
$$
This is the kind of thing that, once stated, is not hard to verify.
In particular, the apparent operational physicists' interpretation of the integral is the left-hand side of the latter, rather than being the principal value interpretation.
Well, ok, that's potentially consistent, too. Depends what we want. These symbols don't interpret or context-set themselves. :)
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \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{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#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}$

Lets $\ds{\left.\vphantom{\Large A}\mc{I}\pars{a,b} \right\vert_{\ a,b\ >\ 0} \equiv \mrm{P.V.}\int_{-a}^{b}{\dd t \over t}}$

\begin{align}
\left.\vphantom{\Large A}\mc{I}\pars{a,b} \right\vert_{\ a,b\ >\ 0} & \equiv \mrm{P.V.}\int_{-a}^{b}{\dd t \over t} =
\mrm{P.V.}\pars{\int_{-a}^{a}{\dd t \over t} + \int_{a}^{b}{\dd t \over t}} =
\ln\pars{b \over a}
\\[5mm]
\implies\quad &
\left\{\begin{array}{rcr}
\ds{\lim_{a \to \infty}\left.\vphantom{\Large A}\mc{I}\pars{a,b} \right\vert_{\ b\ >\ 0}} & \ds{=} & \ds{-\infty}
\\[2mm]
\ds{\lim_{b \to \infty}\left.\vphantom{\Large A}\mc{I}\pars{a,b}
\right\vert_{\ a\ >\ 0}} & \ds{=} & \ds{\infty}
\end{array}\right.\qquad\implies
\mrm{P.V.}\int_{-\infty}^{\infty}{\dd t \over t}\ \mbox{is}\ divergent.
\end{align}
