Calculate $L(f,P)$ and $U(f,P)$ for the following: $$f(x) = 2x, x \in [0,1];~ P = \{0,\frac{1}{4},\frac{1}{2},1\}.$$
By definition I know that
$$L(f,P) = \sum_{i=1}^{n} m_i(x_{i}-x_{i-1}) \text{ and } U(f,P) = \sum_{i=1}^{n} M_i(x_{i} - x_{i-1})$$ where $m_i = inf\{f(x)|x \in[x_{i-1},x_i]\}$ and $M_i = sup\{f(x)|x\in[x_{i-1},x_{i}]\}$.
I think since the function is densed so we can say that $M_i = 2(1)$ and $m_i = 0$ ?
Then $$L(f,P) = \sum_{i=1}^{n} 0(x_{i}-x_{i-1}) \text{ and } U(f,P) = \sum_{i=1}^{n} 2(x_{i} - x_{i-1})$$
Therefore $$L(f,P) = 0(1-0)=0 \text{ and } U(f,P) = 2(1-0)=2.$$
Am I right?