Is the given function is Riemann integrable or not reimann integrable ?

real-analysis

Is the given function is Riemann integrable or not Riemann integrable on the interval $[0,1] $?

$$ { f }(x)=\begin{cases} \cos x \quad \text{if}\quad x \in [0,\frac{1}{2}] \\ \sin x \quad \text {if} \quad x \in (\frac{1}{2},1]\end{cases} $$

My attempts: I know that $f$ will continuous when $\cos x =\sin x$ by putting $x = \pi/4$. I'm confused that here $x = \pi/4 $ is not given. Now how can I conclude that it is Riemann integrable or not ?

Any Hints/solution will be appreciated.

Thank you.

Best Answer

The measure theory approach here is a bit of overkill I think. Let $\epsilon>0.$ Let $n>2.$ Choose partitions $P_n$ of $[0,1/2-1/n]$ and $Q_n$ of $[1/2+1/n,1]$ such that

$$U(P_n,f)-L(P_n,f)<\epsilon,\,\,U(Q_n,f)-L(Q_n,f)<\epsilon.$$

Then $R_n=P_n\cup Q_n$ is a partition of $[0,1],$ and

$$\tag 1 U(R_n,f)-L(R_n,f) < \epsilon + (C_n-c_n)\frac{2}{n} + \epsilon.$$

Here $C_n,c_n$ are the $\sup, \inf$ of $f$ over $[1/2-1/n,1/2+1/n].$ The Riemann integrability of $f$ on $[0,1]$ follows.