Real Analysis – If $f^2$ is Riemann Integrable is $f$ Always Riemann Integrable?

integrationreal-analysis

Problem: Suppose that $f$ is a bounded, real-valued function on $[a,b]$ such that $f^2\in R$ (i.e. it is Riemann-Integrable). Must it be the case that $f\in R$ ?

Thoughts: I think that this is not necessarily true, but I am having trouble refuting or even proving the above. Of course, the simplest way to prove that it is not necessarily true would be to give an example, but I am unable to think of one! I also have tried using $\phi(y)=\sqrt y$ and composing this with $f^2$ (to try show $f$ is continuous); however, the interval $[a,b]$ may contain negative numbers so I can't utilise $\phi$ in that case.

Question: Does there exist a function $f$ such that $f^2\in R$ but $f$ $\not\in R$ ? Or conversely, if $f^2\in R$ does this always imply $f$ $\in R$ ? (If so, could you provide a way of proving this).

Best Answer

Yes, there exists such functions. Think of $$ f(x) = \begin{cases} 1 & \text{ if } x \in \mathbb Q \\ -1 & \text{ if } x \notin \mathbb Q. \end{cases} $$ It is well-known that $f$ is not Riemann-integrable over any interval $[a,b]$ (just compute the Riemann lower/upper sums). But $f^2 = 1$ is very integrable. =)

Related Question