Examples of non-Riemann integrable functions besides unbounded and Dirichlet functions. Everywhere I've tried to look, the only two common examples of non-Riemann integrable functions are unbounded functions or Dirichlet function.
What are some examples of non-Riemann integrable functions besides those functions?
I assume for such non-Riemann integrable functions, the lower integral and the upper integral must exist but are unequal. (Because the lower integral and upper integral both either exist or don't, together and since I have removed unbounded functions from the picture, both integrals exist but are unequal.)
I'd really appreciate multiple examples, if that's possible, of functions that have unequal lower and upper integral.
 A: You can take, for instance$$\begin{array}{rccc}f\colon&[0,1]&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}x&\text{ if }x\in\Bbb Q\\0&\text{ if }x\notin\Bbb Q.\end{cases}\end{array}$$It is bounded. And it is not Riemann integrable since it is discontinuous at every point of $(0,1]$, and this is is uncountable. Another possibility would be$$\begin{array}{rccc}g\colon&[0,1]&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}x&\text{ if }x\in\Bbb Q\\-x&\text{ if }x\notin\Bbb Q.\end{cases}\end{array}$$
A: Let $A\subset [0, 1]$ be any set.
$\mathbf{1}_A:[0,1]\to\Bbb{R}$ defined by
$\mathbf{1}_A(x)=\begin{cases}1&x\in A\\ 0& x\notin A\end{cases}$
$\mathbf{1}_A$ is called indicator function of $A$.


Set of discontinuity of $\mathbf{1}_A=\partial(A)$
where $\partial(A)$  denote the set of all boundary points of $A$



Lebesgue's criteria for Riemann integrability :   $f:[a,b]\to
\Bbb{R}$ is Riemann integrable if and only if $f$ is bounded, and the
set of discontinuities has Lebesgue measure zero.


Step $1$ : Choose $A\subset [0, 1]$ such that $m(\partial (A)) >0$
Where $m$ is the $1$-dimensional Lebesgue measure.
Step $2$: Then choose $\mathbf{1}_A$

Few examples: (Bounded functions which are not Riemann integrable)


*

*Choose the set of rationals $Q$ . Then $m(\partial({\Bbb{Q}\cap [0,1]}))=[0, 1]=1>0$
Hence $\mathbf{1}_{\Bbb{Q}} : [0, 1]\to \Bbb{R}$ defined by $\mathbf{1}_A(x)=\begin{cases}1&x\in \Bbb{Q}\\ 0& x\notin \Bbb{Q}\end{cases}$
(It is your known example, Dirichlet function)



*Choose the set of irrationals $A=\Bbb{R}\setminus \Bbb{Q}$.

Then $\mathbf{1}_{{A}} : [0, 1]\to \Bbb{R}$ defined by $\mathbf{1}_{A}(x)=\begin{cases}1&x\in \Bbb{Q}\\ 0& x\notin \Bbb{Q}\end{cases}$
Another bounded function which is not Riemann integrable.



*Choose the indicator function of $S\subset [0, 1] $ Cantor set of positive measure ( Specifically  S-V-C set of measure $\frac{1}{2}$)


*Choose the indicator function of $A=\{\sin n :n\in \Bbb{N}\}$


*Choose the indicator function of $A=\Bbb{Q}\cup \{\text{ few of your favorite irrationals!}\}$
There are many more. Can you list few more?
