Answer
(a)
The given integeral
$$
\int_{-\infty}^{\infty} x d x= \infty
$$
is divergent
(b)
$$
\lim _{t \rightarrow \infty} \int_{-t}^{t} x d x=0
$$
We can’t define
$$
\int_{-\infty}^{\infty} f(x) d x = \lim _{t \rightarrow \infty} \int_{-t}^{t} f(x) d x
$$
Work Step by Step
(a) The given integral
$$
\int_{-\infty}^{\infty} x d x
$$
is an improper integral, hence
$$
\int_{-\infty}^{\infty} x d x =\int_{-\infty}^{0} x d x+\int_{0}^{\infty} x d x
$$
and
$$
\begin{split}
\int_{0}^{\infty} x d x & = \lim _{t \rightarrow \infty} \int_{0}^{t} x d x\\
& =\lim _{t \rightarrow \infty}\left[\frac{1}{2} x^{2}\right]_{0}^{t}
\\
& =\lim _{t \rightarrow \infty}\left[\frac{1}{2} t^{2}-0\right]
\\
& = \infty,
\end{split}
$$
so the integral
$$
\int_{0}^{\infty} x d x
$$
is divergent , and hence,
$$
\int_{-\infty}^{\infty} x d x
$$
is divergent .
(b)
$$
\begin{split}
\int_{-t}^{t} x d x & = \left[\frac{1}{2} x^{2}\right]_{-t}^{t} \\
& =\left[\frac{1}{2} t^{2}-\frac{1}{2} t^{2}\right]
\\
& = 0,
\end{split}
$$
so
$$
\lim _{t \rightarrow \infty} \int_{-t}^{t} x d x=0
$$
Therefore,
$$
\lim _{t \rightarrow \infty} \int_{-t}^{t} x d x \ne \int_{-\infty}^{\infty} x d x
$$
This shows that we can’t define
$$
\int_{-\infty}^{\infty} f(x) d x = \lim _{t \rightarrow \infty} \int_{-t}^{t} f(x) d x
$$