If $f(0)=1$ and $f(x)=0$ for $x\ne0$ then $f$ is Riemann integrable on $[-1,1]$ with integral $0$.
I simply used the def of R integral and I think I proved that f is indeed R integrable. But I only can say the value is $0 \le$ the value of integral $ \le 2$.
1) If I am wrong to prove it only with definition here please correct me for proving R integrability
2)If I am right, how can I find the value?
Let $P_t=\{-1,-t,t,1\}$ with $t$ in $(0,1)$, then $L(f,P_t)=0$ and $U(f,P_t)=2t$ hence $U(f,P_t)-L(f,P_t)$ can be made as close to zero as desired. This proves that $f$ is Riemann integrable. Furthermore, $L(f,P_t)\to0$ when $t\to0$ hence the Riemann integral of $f$ is $0$.