Existence of Improper Integrals I've tried to do the following question:
Spivak Chapter 14 Question 27:
The improper integral $\int_{-\infty}^{a} f$ is defined in the obvious way, as $\lim_{N\to -\infty} \int_{N}^a f$.  But another kind of improper integral $\int_{-\infty}^{\infty} f$ is defined in a nonobvious way: it is $\int^{\infty}_{0} f +\int_{-\infty}^{0} f$, provided these improper integrals both exist.
a) Explain why $\int_{-\infty}^\infty \frac{1}{x^2+1}$ exists
b)Explain why $\int_{-\infty}^\infty x d{x}$ does not exist. (But notice that $\lim_{N\to \infty} \int_{-N}^N xd{x}$ does exist)
What I did:
For the first item, I just said that using the Fundamental Theorem of Calculus, we know that integral is $\tan^{-1} (\infty)-\tan^{-1} (-\infty)=\pi$. But I'm not sure it's correct and it seems, from the questions around it, that the book is looking for something from more fundamental stuff maybe (?).
For the second one, I don't understand how that's possible as it seems to be the very definition of this kind of integral from $-\infty \to \infty$. I've seen questions related to this item,  but it's still not clear to me why the integral in question doesn't exist. 
 A: Remember how that type of integral is defined:
$$\int_{-\infty}^{\infty}f(x)\,dx=\lim_{b\to-\infty}\int_b^0 f(x)\,dx+\lim_{b\to\infty}\int_0^b f(x)\,dx$$
In your case, $f(x)=x$.
$$\int_{-\infty}^{\infty}x\,dx=\lim_{b\to-\infty}-\frac{b^2}{2}+\lim_{b\to\infty}\frac{b^2}{2}$$
Both of the latter limits do not exist; therefore, the improper Riemann integral does not exist.
A: For the first integral, by definition $\int_{-\infty}^\infty\frac{dx}{x^2+1}$ exists if and only if the integral $\int_{0}^\infty\frac{dx}{x^2+1}$ exists because the function $x\mapsto \frac{1}{x^2+1}$ is even. To check this, we can use the fundamental theorem of calculus like you did:
\begin{align*}
\int_0^\infty\frac{dx}{x^2+1} \stackrel{\rm def}{=}\lim_{b\to\infty}\int_0^b\frac{dx}{x^2+1} = \lim_{b\to\infty}[\arctan(b)-\arctan(0)] = \pi/2.
\end{align*}
Or we can justify it with the integral test because the series $\sum_{n=0}^\infty\frac{1}{n^2+1}$ converges.
For the second one, by our definition of what $\int_{-\infty}^\infty x\,dx$ means, this integral exists if and only if both the integrals $\int_{-\infty}^0 x\,dx$ and $\int_{0}^\infty x\,dx$ are finite, but neither of these integrals is finite. However, that doesn't stop the following limit from existing:
\begin{align*}
\lim_{N\to\infty}\int_{-N}^Nx\,dx = \lim_{N\to\infty}\bigg[\frac{x^2}{2}\bigg]_{-N}^N = \lim_{N\to\infty}0 = 0.
\end{align*}
A: You should use the given definitions.
(a): you're right, more fundamentally you could write
$lim_{N\to-\infty}\int_N^0\frac{1}{1+x^2}dx + lim_{N\to\infty}\int_0^N\frac{1}{1+x^2}dx = \int_{-\infty}^{\infty}\frac{1}{1+x^2}dx$. 
                                                                   $ \ $ And then
$lim_{N\to\infty}\int_{0}^{N}\frac{1}{1+x^2}dx=\lim_{N\to{\infty}}(arctan(N)-arctan(0))=\lim_{N\to{\infty}}arctan(N)-0=\frac{\pi}{2}$. 
Follow the same procedere with the other integral.
(b): Once again just use the given definition 
$\int_{-\infty}^\infty x dx=\int_0^\infty xdx+\int_0^\infty xdx=\infty\  +\ (-\infty)\;   $.
                   This Integral leads to an undefined expression and does therfore not exist.                                                         
You also might want to google Cauchy principal value 
$CH \int_{-\infty}^{\infty}f(x)dx\equiv lim_{R\to\infty}\int_{-R}^R f(x)dx.$ $(\Rightarrow CH\int_{-\infty}^{\infty}xdx=0)$
