I suppose that by integrable you mean Riemann-integrable.
You are almost right. However, if $f$ is the DIrichlet function, then neither $f$ nor $|f|$ are Riemann-integrable; after all, $|f|=f$. You should take $2f-1$ instead, that is, the function$$\begin{array}{ccc}[a,b]&\longrightarrow&\mathbb{R}\\t&\mapsto&\begin{cases}1&\text{ if }x\in\mathbb{Q}\\-1&\text{ otherwise.}\end{cases}\end{array}$$
0
Bumbble Comm
On
No. If it is the Reimann integral, take $f = 1_\mathbb{Q}- 1_{\mathbb{Q}^c}$. Then $|f| = 1$ is integrable, but $f$ is not.
If it is the Lebesgue integral, let $E$ be a non measurable set and define $f = 1_E - 1_{E^c}$ Then $|f|$ is integrable, but $f$ is not.
I suppose that by integrable you mean Riemann-integrable.
You are almost right. However, if $f$ is the DIrichlet function, then neither $f$ nor $|f|$ are Riemann-integrable; after all, $|f|=f$. You should take $2f-1$ instead, that is, the function$$\begin{array}{ccc}[a,b]&\longrightarrow&\mathbb{R}\\t&\mapsto&\begin{cases}1&\text{ if }x\in\mathbb{Q}\\-1&\text{ otherwise.}\end{cases}\end{array}$$