# When do improper integrals converge?

I am studying for an exam, and I am getting myself confused about how to tell if an improper integral is convergent or not. I know that if a function $f$ is unbounded on $[a,b]$ then $f$ is not integrable on $[a,b]$. However, when you consider improper integrals, this rule is thrown out the window. For example, $f(x) = \log(x)$ is unbounded on $(0,1]$ but the improper integral $\int_0^1 \log(x) \,dx = -1$. Is there any such rule that holds true for improper integrals that lets one tell quickly if it converges or diverges?

I have this function $f = \begin{cases} \frac{1}{x} & x \in (-1,1), x \not= 0\\ 0 & x = 0 \\ \end{cases}$

and I am trying to determine if $f$ is integrable on $(-1,1)$. I am having a hard time deciding whether it is or not. Intuitively, if the integral does exist I believe it should be $0$, but I am struggling to directly compute the integral. Can I say that $\int_{-1}^1 f \,dx= \int_{-1}^0 f \,dx + \int_0^1 f \,dx$, and then since $f$ is locally integrable on $[-1,0)$ and $(0,1]$, apply the definition of an improper integral to get that $\int_{-1}^0 f \,dx + \int_0^1 f \,dx = \lim_{c \to 0^-} \log|c| + \lim_{k \to 0^+} \log(k) = -\infty$.

Which of these answers makes sense?

Applying the definition would give the correct answer, although you made a sign error: you should get $(+\infty) + (-\infty)$, and so the integral is undefined.