\begin{equation} f(x)=\begin{cases} x& x=\frac{1}{n}&n=\mathbb Z/\{0\}\\ \\ 1 & \text{others} \end{cases} \end{equation}
The Riemann integration is $ \displaystyle \int^1_{-1} f$
I actually don't know whether this funtion is integrable or not, but I suspect that it is integrable, so I try to prove it is integrable. Below is my attempt
The domain of the integration is from -1 to 1, and this function is bounded on $[-1,1]$. $\sup_{[-1,1]} f-\inf_{[-1,1]} f=1-(-1)=2$
Then for partition $P,\{t_0=1<...<t_n=1\}$, let $|P|<\dfrac{\epsilon}{2n},$for all $\epsilon>0$
For each interval $[t_{i-1},t_i]$ let $\omega_i=\sup_{[t_{i-1},t_i]} f-\inf_{[t_{i-1},t_i]} f$
Then by the Riemann criterion:
$\displaystyle \sum^n_{i=1} \omega_i\Delta t_i\leq\displaystyle \sum^n_{i=1}2\Delta t_i\leq\displaystyle \sum^n_{i=1} 2\cdot \dfrac{\epsilon}{2n}=2\cdot\dfrac{\epsilon}{2n}\cdot n=\epsilon$
Thus the function is intergrable on $[-1,1]$ by Riemann criterion.
Is this proof right?
Edit:
Divide the integration into two parts $\displaystyle \int_{-1}^0f+\displaystyle \int_0^1 f$
Then consider the $[0,1]$ interval will be sufficient, if the function is integrable on $[0,1]$, then it will be integrable on $[-1,1]$
the discontinuous points are $\frac{1}{n}$ and for any interval $[\frac{1}{n},\frac{1}{n-1}]$ let $|P|<\frac{1}{n-1}-\frac{1}{n}=\dfrac{1}{n(n-1)}$ for $n>\epsilon>0$
and on $[0,1]$ interval $\omega=\sup_{[0,1]} f-\inf_{[0,1]} f = 1- \frac{1}{n}=\frac{n-1}{n}$ and $n>\epsilon>0$
Thus $\displaystyle \sum^n_{i=1} \omega_i\Delta t_i\leq\displaystyle \sum^n_{i=1}\frac{n-1}{n}\cdot \frac{1}{n(n-1)}=\dfrac{1}{n}<\epsilon$ based on Archemidean property
Edition 2
Regard the function on $[0,1]$, if it is integrable on $[0,1]$ then it should also be integrable on $[-1,1]$
The discontinuous points on $[0,1]$ are $\frac{1}{2},\frac{1}{3},\frac{1}{4},\cdots, \frac{1}{n}$ for $n=1,2,3,...$
Then regard interval $[\frac{1}{2},1]$, since only $\frac{1}{2}$ is the point that is discontinuous on this interval, the function is integrable on $[\frac{1}{2},1]$
Thus there exists a partition $P_1$ such that $\displaystyle \sum^{n_1}_{i=1} \omega_i \Delta t_i <\epsilon$
Also for interval $[\frac{1}{3},\frac{1}{2}]$, since the function is only discontinuous at two end points, then it is integrable on it.
Thus there also exists a partition $P_2$ such that $\displaystyle \sum^{n_2}_{i=1} \omega_i \Delta t_i <\epsilon$
Similarly, for all intervals $[\frac{1}{n+1},\frac{1}{n}]$
There always exists a partition $P_n$ such that $\displaystyle \sum^{n_n}_{i=1} \omega_i \Delta t_i <\epsilon$
Then let $P=\min \{P_1,P_2,...,P_n\}$ for $n=1,2,3,...$
Thus on each interval it has
$\displaystyle \sum^{m_1}_{i=1} \omega_i \Delta t_i <\epsilon/n$ (on $[\frac{1}{2},1]$)
$\displaystyle \sum^{m_2}_{i=1} \omega_i \Delta t_i <\epsilon/n$ (on $[\frac{1}{3},\frac{1}{2}]$)
...
$\displaystyle \sum^{m_n}_{i=1} \omega_i \Delta t_i <\epsilon/n$ (on $[\frac{1}{n+1},\frac{1}{n}]$)
As a result, on the entire $[0,1]$
$\displaystyle \displaystyle \sum^{M}_{i=1} \sup f_i \Delta_i-\displaystyle \sum^{M}_{i=1}\inf f_i \Delta t_i =\sum^{M}_{i=1} \omega_i \Delta t_i=\sum^{m_1}_{i=1} \omega_i \Delta t_i +\sum^{m_2}_{i=1} \omega_i \Delta t_i+...+\sum^{m_n}_{i=1} \omega_i \Delta t_i < n \cdot \epsilon/n=\epsilon $
Thus, the function is integrable on $[0,1]$
No, it is not correct.
First of all, you seem to think that $\inf_{[-1,1]}f=-1$. Actually, $\inf_{[-1,1]}f=0$.
After writing that$$\sup_{[-1,1]}f-\inf_{[-1,1]}f=2,\tag1$$you use no other property of the function in your proof. Therefore, if your proof was correct, it would prove that any function for which $(1)$ holds is Riemann-integrable. That's not the case. If, say,$$f(x)=\begin{cases}1&\text{ if }x\in\Bbb Q\\-1&\text{ otherwise,}\end{cases}$$then $f$ is not Riemann-integrable, although $(1)$ holds.
Your error lies in assuming that, for every $\varepsilon>0$ and every $n\in\Bbb N$, there is a partition $P$ of $[-1,1]$ into $n$ intervals with $|P|<\frac\varepsilon{2n}$.
Your function is actually Riemann-integrable. To see why, take $\varepsilon>0$. Since $\frac\varepsilon2>0$ and since $f(x)=1$ only for finitely many points of $\left[\frac\varepsilon2,1\right]$, it's not hard to see that there is a partition $P=\left\{a_0\left(=\frac\varepsilon2\right),a_1,\ldots,a_n(=1)\right\}$ of $\left[\frac\varepsilon2,1\right]$ such that$$\overline\sum\left(f_{\left[\frac\varepsilon2,1\right]},P\right)-\underline\sum\left(f_{\left[\frac\varepsilon2,1\right]},P\right)<\frac\varepsilon2.$$But then, if $P^\star=\left\{-1,0,a_0,a_1,\ldots,a_n\right\}$, then$$\overline\sum\left(f_{\left[-1,1\right]},P^\star\right)-\underline\sum\left(f_{\left[-1,1\right]},P^\star\right)<\varepsilon.$$