What is with this integral: $\int_{-1}^{1} \frac 1x dx$ 
Evaluate $\int_{-1}^{1} \frac 1x dx$

Does this integral converge or diverge because if we "just solve it" we get
$$\int_{-1}^1 \frac 1x dx = \ln \left| x\right|_{-1}^1=0.$$
But if we do this: $\int_{-1}^0\frac 1x dx + \int_0^1 \frac 1x dx$ it diverges. Why? What really happens here?
 A: You cannot apply the fundamental theorem of calculus since the function $$\frac{1}{x}$$ is not defined on the interval $[-1,1]$. Split the integral in the following way
$$\int_0^1\frac{dx}{x}+\int_{-1}^0\frac{dx}{x}$$
Now you can apply the following theorem

Let $a$ be a real, then $$\int_0^a \frac{1}{x^\alpha}dx$$ converges if and only if $\alpha<1$.

Hence both integral diverge, then the sum of them diverges.
A: This is an improper integral. It is defined as$$\lim_{\varepsilon\to0^+}\int_\varepsilon^1\frac1x\,\mathrm dx+\lim_{\varepsilon\to0^-}\int_{-1}^\varepsilon\frac1x\,\mathrm dx$$if both limits exist. In this case, none of the limits exist (in $\mathbb R$).
A: For $[a,b]$ an interval in $\mathbb{R}$, let $f\colon [a,b]\to \mathbb{R}$. Then $F\colon [a,b]\to \mathbb{R}$ is an antiderivative of $f$ on $[a,b]$ if $F$ is continuous on $[a,b]$. It will be necessarily so in $(a,b)$, while left continuous at $a$: $F(a)=\lim_{x\to a^+} F(x)$, and right continuous at $b$: $F(b)=\lim_{x\to b^-} F(x)$ .
If $f\colon [a,b]\to \mathbb{R}$ has an antiderivative $F$ on $[a,b]$, then $f$ is integrable and so we have the Fundamental Theorem of Calculus:
$$\int_a^b f(x)\,dx=F(b)-F(a)$$
The integral in the question is improper in the sense that the function $\frac{1}{x}$ is unbounded over the limits of integration $[-1,1]$, namely at the problem spot $x=0$ where it cannot be continuously defined, with the branch of the hyperbola to the left of $x=0$ an asymptote to negative $y$-axis, the branch of the hyperbola to the right of $x=0$ an asymptote to positive $y$-axis. Therefore you cannot invoke the Fundamental Theorem of Calculus over $[-1,1]$ in the manner you have done as you integrate over a discontinuity.
As an example of something that looks like it shouldn't integrate but does consider $g(x)=\frac{\sin x}{x}$; at the singular point $x=0$ we have the indeterminate expression $\frac{0}{0}$, but we know
$$\lim_{x\to0} \frac{\sin x}{x}=1$$
and so $g(x)$ is continuous, having $g(0)=1$, and is bounded over $[-1,1]$.
