Integral from infinity to infinity My physics professor today wrote on the blackboard:
$$ \int_{\infty}^{\infty} f(x) dx = 0 $$
for every function $f$. 
And the proof he gave was:
$$ \int_{\infty}^{\infty} f(x) dx = \int_{\infty}^{a} f(x) dx + \int_{a}^{\infty} f(x)dx = - \int_{a}^{\infty} f(x) dx + \int_{a}^{\infty}f(x)dx = 0$$
However I'm still not convinced, for me an integral from infinity to infinity has no meaning. Therefore, what I'm asking is: does the above equations make sense? If not, are there cases where they do make sense? I'm thinking about functions that converge to 0 in $+\infty$.
EDIT: Actually, the function f considered was a density, i.e.:
$$ \int_{-\infty}^{+\infty} f(x)dx = 1 $$
and $f(x) \geq 0$ for all $x$. 
 A: As has been pointed out by other answers, this is not always true because the symbol $\infty$ can hide many things, even if we work with the extended reals. The actual meaning of the $\infty$ is a limiting process as a certain variable becomes arbitrarily large. The upper and lower limits in the $$\int_a^b f(x)\mathrm d x$$ however may approach $\infty$ at different rates, and this is the key point. Your professor's argument works only when $a$ and $b$ approach infinity equally fast, or in other words, when they are of equal order at infinity. In particular it is always valid if $a=b.$
So what about your professor's "proof"? Well, the ambiguity should now be obvious -- he uses the same symbol $\infty$ for things that may behave differently. I think it's safe to assume he's thinking only of the case when the variables are of equal order at infinity. Otherwise his proof breaks down since $\infty-\infty$ can then be anything.
PS. However, you say an integral from $\infty$ to $\infty$ has no meaning to you. Well, I see you're thinking of the usual ordering of the reals here. But note that we're not just dealing with the reals here, but the extended reals. As explained above, the best way to think of it is to think of the limits of the integral as approaching infinity (at not necessarily equal rates). Then it's easy to make sense of it. Another way may be to think of the one-point compactification of the real axis.
A: This is not necessarily true. Take the following example;
$$\int_a^{2a}\frac1x\mathrm{d}x=[\ln{|x|}]_a^{2a}=\ln{(2)}$$
If we take $a\to\infty$ then the integral becomes
$$\int_\infty^\infty\frac1x\mathrm{d}x=\ln{(2)}$$ 
as the integral is constant for all $a\in\mathbb{R}$. What I guess your professor meant was that
$$\lim_{a\to\infty}\int_a^a f(x)\mathrm{d}x=0$$
which is trivially true as the LHS is constantly zero.
A: I disagree with the answers here. From Lebesgue's perspective, we can think of the integral under question as an integral over the set of all real $x$ satisfying $\infty < x < \infty$. That's an integral over the empty set, which is always 0.
A: An improper integral with an endpoint of $\infty$ means a limit of proper integrals where the endpoint approaches $\infty$.  Thus a reasonable definition of 
$\int_{\infty}^\infty f(x)\; dx$ would be
$$ \int_{\infty}^\infty f(x)\; dx = \lim_{a, b \to \infty} \int_a^b f(x)\; dx $$
This is $0$ if and only if $\int_a^\infty f(x)\; dx$ converges for some $a$.
EDIT: If the double limit is $0$, there is $N$ such that 
$\left|\int_a^b f(x)\; dx\right| < 1$ for all $N < a < b$.
For any $\epsilon > 0$ there is $M > N$ such that for $b, c > M$, 
$$ \left|\int_b^c f(x)\; dx \right| = \left| \int_a^c f(x)\; dx - \int_a^b f(x)\; dx \right|< \epsilon$$
and this implies that $\lim_{b \to \infty} \int_a^b f(x)\; dx$ exists, i.e.
$\int_a^\infty f(x)\; dx$ converges.
Conversely, if $\int_a^\infty f(x)\; dx = L$ converges, then for any $\epsilon > 0$ there is $N$ such that $\left|\int_a^b f(x)\; dx - L\right| < \epsilon/2$ whenever $b > N$.  Then if $b > N$ and $c > N$, 
$$ \left| \int_b^c f(x)\; dx\right| = \left|\int_a^c f(x)\; dx - \int_a^b f(x)\; dx \right| < \epsilon $$
A: As Peter Foreman mentioned, there are some occasions where you will get an integral of this form, however the exact integral does matter. Firstly visualise the error function:
$$\operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}dt$$
notice that:
$$\lim_{x\to 0}\operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^0e^{-t^2}dt$$
Normally we can visualise an integral as area, but in this form it does not make sense since the range over which the area found $\to0$. The most obvious case when this integral is zero, no matter the function, would be when both the bounds are equal as the range of the integral is then zero. Overall, it comes down to notation and making sure the bounds are properly defined.
A: It makes perfectly sense to integrate from -inf to inf - just look at a probability density, e.g. the normal distributions density. 
A: I believe your professor is correct under the conditions that $\int_{-\infty}^{+\infty} f(x)dx = 1$ and $f(x) \geq 0$ for every $x\in\mathbb{R}$. I will flesh out his proof in greater detail below, but first I want to show how we can make sense of $\int_{\infty}^{\infty} f(x) dx$:
First, let $f$ be a density function such that $\int_{-\infty}^{+\infty} f(x)dx = 1$ and $f(x) \geq 0$. 
Now, for every $a,b\in\mathbb{R}$ such that $a\lt b$, consider $\int_{a}^{b} f(x) dx=F(a)-F(b)$ where $F'(x)=f(x)$, by FTOC.
Observe $F(a)-F(b)=g(a,b)$. Then, by substitution we have $\int_{a}^{b} f(x) dx=g(a,b)$. Next, we take the limit of this equation as $b\to\infty$ so that
$lim_{b\to \infty}g(a,b)=lim_{b\to \infty}\int_{a}^{b} f(x) dx=\int_{a}^{\infty} f(x) dx$ 
by definition of an improper integral. We again take the limit of the equation, this time as $a\to\infty$, so that
$\lim_{a\to \infty}\{lim_{b\to \infty}g(a,b)\}=\lim_{a\to \infty}\{\lim_{b\to \infty}\int_{a}^{b} f(x) dx\}=\lim_{a\to \infty}\int_{a}^{\infty} f(x) dx=\int_{\infty}^{\infty} f(x) dx$
So really this odd looking integral $\int_{\infty}^{\infty} f(x) dx$ is simply saying that we are taking the nested limit of some bivariate function, $g(a,b)$, as $a\to\infty$ and $b\to\infty$. Now let's prove $\int_{\infty}^{\infty} f(x) dx=0$ as follows:
$\int_{\infty}^{\infty} f(x) dx = \lim_{a\to \infty}\{\lim_{b\to \infty}\int_{a}^{b} f(x) dx\}$
$=\lim_{a\to \infty}\{\lim_{b\to \infty}[\int_{a}^{c} f(x) dx + \int_{c}^{b} f(x) dx]\}$
where $c$ is some real constant such that $a\lt c\lt b$, by properties of definite integrals
$=\lim_{a\to \infty}\{\int_{a}^{c} f(x) dx + \lim_{b\to \infty}\int_{c}^{b} f(x) dx\}$
by the constant function rule for limits
$=\lim_{a\to \infty}\int_{a}^{c} f(x) dx + \lim_{b\to \infty}\int_{c}^{b} f(x) dx$
by the constant function rule for limits
$=\lim_{a\to \infty}-\int_{c}^{a} f(x) dx + \lim_{b\to \infty}\int_{c}^{b} f(x) dx$
by properties of definite integrals
$=-\lim_{a\to \infty}\int_{c}^{a} f(x) dx + \lim_{b\to \infty}\int_{c}^{b} f(x) dx$
by the constant multiple rule for limits
$=-\lim_{a\to \infty}[F(a)-F(c)] + \lim_{b\to \infty}[F(b)-F(c)]$ 
by FTOC
$=-[\lim_{a\to \infty}F(a)-F(c)] +\lim_{b\to \infty}F(b)-F(c)$ 
by the constant function rule of limits
$=-\lim_{a\to \infty}F(a)+F(c) +\lim_{b\to \infty}F(b)-F(c)$
by the distributive law
$=\lim_{b\to \infty}F(b)-\lim_{a\to \infty}F(a) + F(c)-F(c)$
by the commutativity law
$=\lim_{b\to \infty}F(b)-\lim_{a\to \infty}F(a)$
by the additive inverse and identity laws
Since $f$ is a density function such that $\int_{-\infty}^{+\infty} f(x)dx = 1$ and $f(x) \geq 0$ for every $x\in\mathbb{R}$, then $\lim_{x\to \infty}F(x)$ exists, or in other words, $\lim_{x\to \infty}F(x)=L\in\mathbb{R}.$ Now, $a$ and $b$ are just arbitrary variables whose values increase positively without bound. Hence, $\lim_{b\to \infty}F(b)=\lim_{a\to \infty}F(a)=L$. By substitution, we have
$=L-L=0$
Therefore, if $\int_{-\infty}^{+\infty} f(x)dx = 1$ and $f(x) \geq 0$, then $\int_{\infty}^{\infty} f(x) dx =0$
(to confirm properties of definite integrals used in this proof, see http://mathworld.wolfram.com/DefiniteIntegral.html.)
