Area beneath $y=x$ from $-\infty$ to $\infty$ $$\int_{-\infty}^{\infty}x\,dx$$ 
According to my teacher, this improper integral diverges because "if one or both integrals diverge, the entire integral diverges." Evaluating it as a limit, however, it seems to cancel out and give $0$. 
I understand this gives an indeterminate form, and that generally, it is incorrect to "cancel out infinity," but an indeterminate form doesn't mean that it can't be evaluated to diverge, as it seems to do in this case. Some intuition behind this conclusion also lies in the fact that either side is decreasing at the same rate, so it seems obvious that the area goes to $0$.
If it truly does diverge, then to what? it seems absurd to say that it blows up to $\pm\infty$.
 A: The issue in assigning a value to 
$$
\int_{-\infty}^\infty x\,\mathrm{d}x
$$
really involves what it means for a function $f$ to be integrable. Unfortunately, there is no short complete answer to this question. In the Lebesgue theory of integration, a function $f : \mathbb{R} \to \mathbb{R}$ is said to be integrable on $\mathbb{R}$ if
$$
\int_{-\infty}^{\infty} \left\vert f(x)\right\vert\mathrm{d}x < \infty.
$$
(Here we are ignoring any assumptions that are required for the above to make sense. In any case, these will always be satisfied for a continuous function and, in particular, your function $f(x) =x$.)
The requirement that $\int_{-\infty}^\infty |f|\mathrm{d}x < \infty$ is equivalent to asking that both
$$
\int_{-\infty}^{\infty} f_+(x)\,\mathrm{d}x < \infty 
\quad \text{and} \quad \int_{-\infty}^{\infty} f_-(x)\,\mathrm{d}x < \infty 
$$
where $f_{+}(x) = \max(f(x), 0)$ and $f_-(x) = \max(-f(x),0)$. If $f$ is integrable according to the definition above, we then define
\begin{equation}\label{eq:star}\tag{$\star$}
\int_{-\infty}^\infty f(x)\,\mathrm{d}x = \int_{-\infty}^\infty f_+(x)\,\mathrm{d}x - \int_{-\infty}^\infty f_-(x)\,\mathrm{d}x
\end{equation}
which will be a finite number.
Clearly, the function $f(x) = x$ does not satisfy any of these hypothesis because
\begin{align*}
\int_{-\infty}^{\infty} f_+(x)\,\mathrm{d}x
= \int_{0}^\infty x\,\mathrm{d}x = \infty.
\end{align*}
Now, we go through all of this trouble to ensure that we never end up writing something along the lines of $\infty - \infty$ in \eqref{eq:star}, which cannot be made sense of.
However, as you have observed, something interesting happens with $f(x)=x$. For each $\alpha > 0$, you have shown that
$$
\int_{-\alpha}^\alpha x\,\mathrm{d}x = \frac{\alpha^2 - \alpha^2}{2} = 0.
$$
Hence, the limit
$$
\lim_{\alpha \to \infty} \int_{-\alpha}^\alpha x\,\mathrm{d}x = 0
$$
exists and is well defined. This means that the number given by 
\begin{equation}\label{eq:dagger}\tag{$\dagger$}
\int_{-\infty}^\infty x\,\mathrm{d}x \stackrel{?}{=} \lim_{\alpha \to \infty} \int_{-\alpha}^\alpha x\,\mathrm{d}x = 0
\end{equation}
exists. Thus, the integral $\int_{-\infty}^\infty x\,\mathrm{d}{x}$ only exists in the improper sense (in this case, we are forced to use the Cauchy principle value as our definition of improper). In other words, $\int_{-\infty}^\infty x\,\mathrm{d}{x}$ should be interpreted as an improper integral (and even then, we need the Cauchy principle value). Although these do not make much sense in the Lebesgue sense (in which we require that $|f|$ be integrable), there are theories of integration that deal with these improper integrals (see the Gauge integral, for instance).
Short answer: Whether or not $\int_{-\infty}^\infty x\,\mathrm{d}x$ exists as an integral depends on the context. It does not exist as a Lebesgue (or Riemann) integral, but it does exist if you want to talk specifically about the value
$$
\lim_{\alpha \to \infty} \int_{-\alpha}^\alpha x\,\mathrm{d}x
$$

Edit: We also point out that the expression in \eqref{eq:dagger} would make a "bad" definition for an integral. To see why, consider first a (Lebesgue) integrable function $f : \mathbb{R} \to \mathbb{R}$. Then, $f$ will also be integrable on any interval $[a,b] \subset \mathbb{R}$. In fact, $f$ will be integrable on any interval of the form $(c,\infty)$. Moreover, the following additive rule would hold:
$$
\int_{-\infty}^\infty f(x)\,\mathrm{d}x = \int_{-\infty}^c f(x)\,\mathrm{d}x + \int_{c}^\infty f(x)\,\mathrm{d}x.
$$
Now, both of these properties are to be expected of an integral (after all, they are fundamental and very intuitive properties). However, despite existing as a limit, the "integral" $\int_{-\infty}^\infty x\,\mathrm{d}x$ fails both of these properties. Indeed, 
$$
\int_{c}^\infty x\,\mathrm{d}x = \infty \quad \text{and} \quad \int_{-\infty}^c x\,\mathrm{d}x = - \infty
$$
for every $c \in \mathbb{R}$. Consequently, the additive rule
$$
\int_{-\infty}^\infty x\,\mathrm{d}x \stackrel{?}{=} \int_{-\infty}^c x\,\mathrm{d}x + \int_{c}^\infty x\,\mathrm{d}x
$$
also fails. In short, incorporating \eqref{eq:dagger} into our definition of the integral would cause us to lose many of the nice properties the integral satisfies. So, although we can partially avoid having $\infty - \infty$ in this case, we still end up breaking several familiar properties the integral should satisfy.
A: Evaluating it as a limit, however, it seems to cancel out and give 0.
This is false. $\int_{-\infty}^{\infty} x dx := \lim_{S\to -\infty, T\to \infty} \int_S^T x dx$, and the latter limit simply does not exist. It is not $0$.
I understand this gives an indeterminate form, and that generally, it is incorrect to "cancel out infinity," but an indeterminate form doesn't mean that it can't be evaluated to diverge, as it seems to do in this case.
This is not an indeterminate form. The limit does not exist. To be clear, $\int_S^T x dx = \frac{T^2 - S^2}{2}$, and $\lim_{S\to -\infty, T\to \infty} \frac{T^2 - S^2}{2}$ does not exist.
Some intuition behind this conclusion also lies in the fact that either side is decreasing at the same rate, so it seems obvious that the area goes to 0.
It is not a fact that "either side is decreasing at the same rate". Therein lies the problem.
If it truly does diverge, then to what? it seems absurd to say that it blows up to $\pm \infty$.
Functions do not diverge "to" anything. The phrase "X diverges" is mathematical-speak for abbreviating the formal sentence "There is no real number L such that X converges to L".
