Let $f:[0,\pi/2]\to \mathbb R$ such that $f(x)=\sin (x)$. Using the standard partition $P_n$ of $[0, \pi/2]$ with $n$ equal subintervals, evaluate $L(f, P_n)$ and $U(f, P_n)$. Deduce that $f$ is integrable, and evaluate $\int_0^{\pi/2} f(x)dx$.
I know that the value of this integral is $1$, but I don't know how to calculate the sums. I know their rules well but can't calculate them for $\sin(x)$.
Clearly $$ P_n=\{x_i: x_i=\frac{i\pi}{2n}, i=0,1,\cdots,n \}. $$ Noting that $f(x)=\sin x$ is increasing in $(0,\frac{\pi}{2})$, hence one has $$ M_i=\max_{i}\{f(x): x_{i-1}\le x\le x_i\}=f(x_i)=\sin x_i, $$ and $$ m_i=\min_{i}\{f(x): x_{i-1}\le x\le x_i\}=f(x_{i-1})=\sin x_{i-1}.$$ So \begin{eqnarray} U(f,P_n)&=&\sum_{i=1}^nM_i(x_i-x_{i-1})=\frac1n\sum_{i=1}^n\sin x_i,\\ L(f,P_n)&=&\sum_{i=1}^nm_i(x_i-x_{i-1})=\frac1n\sum_{i=1}^n\sin x_{i-1}, \end{eqnarray} and hence $$ U(f,P_n)-L(f,P_n)=\frac{\pi}{2n}\sum_{i=1}^n(\sin x_i-\sin x_{i-1})=\frac{\pi}{2n}\sin x_n=\frac{\pi}{2n}. $$ Thus for $\forall \epsilon>0$, there is $N\in\mathbb{N}$ such that $\frac{\pi}{2n}<\epsilon$ and hence $$ U(f,P_n)-L(f,P_n)<\epsilon. $$ Namely $f(x)=\sin x$ is integrable. Since \begin{eqnarray} \lim_{n\to\infty}U(f,P_n)&=&\lim_{n\to\infty}\frac{\pi}{2n}\sum_{i=1}^n\sin x_i\\ &=&\lim_{n\to\infty}\frac{\pi}{2n}\sum_{i=1}^n\sin \frac{i\pi}{2n}\\ &=&\lim_{n\to\infty}\frac{\pi}{2n}\frac{\sin\frac{\pi}{4}\sin[(1+\frac1n)\frac{\pi}{4}]}{\sin\frac{\pi}{4n}}\\ &=&1, \end{eqnarray} so $$ \int_0^{\pi/2}\sin xdx=1. $$