Can unbounded functions be Riemann integrable?

I need to prove or disprove that the next function is Riemann integrable on $[0,2]$:

$$f(x) = \begin{cases} \dfrac{1}{x} &x > 0 \\ 0 &x = 0 \end{cases}$$

My intuition is that it's not, because $f$ is unbounded in that interval, so $U(f,Pn) = L(f,Pn) = \infty$

So I have two questions:

1. Am I right?
2. Can unbounded functions be Riemann integrable?
• Well since a Riemann integrable function have to be bounded, then yes unbounded one cannot be Riemann integrable. – Azlif Jan 7 '18 at 1:05
• math.stackexchange.com/questions/2246901/… – Azlif Jan 7 '18 at 1:11
• in the title "If and only f" part is not true since bounded functton need not be Rieman Integrable – Azlif Jan 7 '18 at 1:15

Regarding proper Riemann integrability, it is true that if a function is unbounded on $[a,b],$ it is not integrable. And we do have $U(f,P) = \infty$ for every partition of $[a,b].$ It is not the case that for $L(f,P)=\infty$ for all partitions, but it's enough that $U(f,P) = \infty$ to prove it the function is not integrable.
For improper Riemann integrability, the function need not be bounded. For instance $1/\sqrt{x}$ has an improper Riemann integral with value $2$ on $[0,1].$ However $1/x$ does not have an improper Riemann integral either on $[0,2]$ since $$\int_a^2 \frac{1}{x}dx = \ln(2/a)\to_{a\to 0^+} \infty.$$
• Why not for $L(f,P)$? – Pilpel Jan 7 '18 at 1:22
• Why would $L(f,P) = \infty$? – spaceisdarkgreen Jan 7 '18 at 1:23
• Same reason for $U$, no? – Pilpel Jan 7 '18 at 1:23
• No.... $L(f,P)$ is the lower sum. In the case of $1/x$ on $[0,2],$ it will never be the case for any partition $P$ that $L(f,P) = \infty.$ – spaceisdarkgreen Jan 7 '18 at 1:25
• $L(f) = \sup_{P}L(f,P)$ may well be infinity (and is in this case). – spaceisdarkgreen Jan 7 '18 at 1:26