I'm currently studying for my Analysis exam and am struggling with the following question.
Give (with proof) an example of a function f : [a, b] → R, such that |f| : [a, b] → R, x → |f(x)| is Riemann integrable but f is not.
I'm currently studying for my Analysis exam and am struggling with the following question.
Give (with proof) an example of a function f : [a, b] → R, such that |f| : [a, b] → R, x → |f(x)| is Riemann integrable but f is not.
For example, $f(x)=-1$ when $x$ is irrational and $f(x)=1$ when $x$ is rational. The upper Riemann integral is $b-a$ and the lower Riemann integral is $a-b$. It is hence not integrable. But $$\int_a^b|f(x)|dx=b-a.$$