left riemann sum of dirichlet function

519 Views Asked by At

Note: Let $n\in Z>0$. Let $a, b\in R$ with a < b. Let y = f(x) be a continuous real-valued function on [a, b]. Let $P=\{{x_i}\}_{i=0}^n$ be a Riemann partition of [a, b], i.e., define $\triangle x = \frac {b-a} n$ and $x_i = a +i\triangle x,i=0,1,...,n$. Let $L_n$ and $R_n$ be the left and right Riemann sums for f over [a, b] with n subintervals, respectively. Let $M_n$ denote the Midpoint (Riemann) sum for f over [a, b] with n subintervals.

Consider the real-valued function g defined on [0, 1] by g(x) = 1 if x is a rational number and g(x) = 0 if x is an irrational number. For an arbitrary n , compute each of the following :

the left Riemann sum $L_n$, the right Riemann sum $R_n$, and the midpoint Riemann sum $M_n$. (Hint : Between any two real numbers lie a rational and an irrational number (i.e., $Q$ and $I$ are dense in $R$.)

i know how to compute for Lower/Upper Riemann sum for this question. but i'm not sure how to compute it for left,right,midpoint Rienmann sum.

Q1, because given domain [a,b] a=0,b=1, a,b is rational. so can i assume $\triangle x =\frac{b-a}n$ is rational and $x_i$ always rational, then $g(x_i)$and$g(\frac{x_{i-1}+x_i}2)$ always equal to 1?

Q2, how about if there is not given specific domain(only tell you domain is [a,b]), how do i compute $L_n, R_n,M_n$?do i need to compute them based on a,b is rational/irrational?