Upper Riemann sum of a branchwise-defined function

146 Views Asked by At

Is the function $f(x) = \begin{cases} \cos x, & x \in \Bbb Q \\ \sin x, & x \notin \Bbb Q \end{cases}$ Riemann integrable over $[0, \frac \pi 4]$?

Here how do we calculate the upper Riemann uum, $U(P,f)$, after dividing the partition into $n$ equal intervals?

2

There are 2 best solutions below

5
On BEST ANSWER

On the interval $[0,\pi/4]$ we have $\cos x\ge\sin x$, with equality only on $\pi/4$. Moreover, $\cos x$ is decreasing on that interval. If $P=\{x_0,x_1,\dots,x_N\}$ is a partition of $[0,\pi/4]$, we deduce that $$ \sup_{x_{i}\le x\le x_{i+1}}f(x)=\cos x_{i} $$ and $$ U(P,f)=\sum_{i=0}^{N-1}(x_{i+1}-x_i)\cos x_{i}. $$ If the partition is into $N$ equal intervals, then $$ U(P,f)=\frac1N\sum_{i=0}^{N-1}\cos \frac{\pi\,i}{4\,N}. $$

1
On

Rational numbers and Irrational numbers are dense everyhere, so we can find an x such that value of sin(x) is close to cos(xi). Hence the supremum is taken so. Hope it is clear.