If $|f|$ can be integrated using Riemann integration, does that mean that $f$ can be integrated using Riemann integration?
Also
If $f^{2}$ can be integrated using Riemann integration, does that mean that $f$ can be integrated using Riemann integration?
Are there any examples?
Let $f(x)=1$ if $x$ is rational, and $-1$ if $x$ is irrational. The functions $|f|$ and $f^2$ are Riemann integrable on $[0,1]$, but $f$ is not.