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).