Evaluate the integral: $\int_{0}^{\frac{\pi}{2}}\sin (x) dx$ via Darboux's sums I have the following question:

Need to prove that the following integral: $\int_{0}^{\frac{\pi}{2}}\sin (x) dx$ is existed, and calculate via Derboux's sums

My attempt:
$Proof.$
We shall look for a partition $P_n$ to $n$ equavilent segments:
$$U(P_n,f)=\sum_{i=1}^{n}M_i\Delta x_i=\sum_{i=1}^{n}f(\frac{\pi\cdot i}{2n})\cdot\frac{1}{n}=\frac{1}{n}\cdot\sum_{i=1}^{n}\sin(\frac{\pi\cdot i}{2n})$$
and
$$L(P_n,f)=\sum_{i=1}^{n}m_i\Delta x_i=\sum_{i=1}^{n}f(\frac{\pi\cdot (i-1)}{2n})\cdot\frac{1}{n}=\frac{1}{n}\cdot\sum_{i=1}^{n}\sin(\frac{\pi\cdot (i-1)}{2n})$$

*

*Note that $m_i=\frac{\pi\cdot i}{2n}$ and $M_i=\frac{\pi\cdot (i-1)}{2n}$, because the function in the given domain is monotonically increasing.

In order to see that $f$ is integrable, we shall show that: $$\sup_{n}L(P_n,f)=\inf_{n}L(P_n,f)$$
since then,$$\sup_{n}L(P_n,f)\le \sup_{P}L(P,f)\le \inf_{P}U(P,f)\le \inf_{n}U(P_n,f)$$
satisfies $\sup_{P}L(P,f)= \inf_{P}U(P,f) \implies$ $f$ is integrable.

However, I'm stuck with the sums of $\sin$ in Derboux's sums calculation, and therefore don't know how to proceed from there. I have tried using trigonometric identities, algebra manipulations, etc... still nothing. Perhaps I am missing something, or not in the right direction. Hence, I will be glad for some help.
 A: Use the identity
$$\sum_{i=1}^n \sin ix = \frac{\sin \frac{nx}{2} \sin \frac{(n+1)x}{2}}{ \sin\frac{x}{2}}$$
The correct upper sum for a uniform partition of $[0,\pi/2]$ is
$$U(P_n,f) = \frac{\pi}{2n}\sum_{i=1}^n \sin \frac{\pi i}{2n} = \frac{\pi}{2n}\frac{\sin \left(\frac{n}{2}\frac{\pi}{2n}\right) \sin \left[\frac{(n+1)}{2}\frac{\pi}{2n}\right]}{ \sin\frac{\pi}{4n}} \\ = 2 \cdot \frac{\frac{\pi}{4n}}{\sin\frac{\pi}{4n}}\cdot \sin \frac{\pi}{4} \cdot \sin \left[\frac{\pi}{4}\frac{n+1}{n} \right] = \sqrt{2}\underbrace{\frac{\frac{\pi}{4n}}{\sin\frac{\pi}{4n}}}_{\underset{n \to \infty}\longrightarrow 1}\cdot \underbrace{\sin \left[\frac{\pi}{4}\frac{n+1}{n} \right]}_{\underset{n \to \infty}\longrightarrow 1/\sqrt{2}},$$
and, thus, $\lim_{n \to \infty} U(P_n,f) = 1$.
In a similar way we can prove that $\lim_{n \to \infty} L(P_n,f) = 1$.
Since,
$$L(P_n,f) \leqslant \sup_P L(P,f) \leqslant \inf_P U(P,f) \leqslant U(P_n,f),$$
it follows from the squeeze theorem that
$$ \sup_P L(P,f) = \inf_P U(P,f) = 1$$
Whence, we have proved both that $x \mapsto \sin x$ is Riemann integrable and
$$\int_0^{\pi/2}\sin x \, dx = 1$$
A: hint
Let
$$J=\int_0^{\frac{\pi}{2}}\sin(x)dx$$
and
$$I=\int_0^{\frac{\pi}{2}}\cos(x)dx$$
try to compute $$I+iJ=\int_0^{\frac{\pi}{2}}e^{ix}dx$$
using the fact that
$$\sum_{k=0}^{N-1}e^{ika}=\frac{1-e^{iNa}}{1-e^{ia}}$$
