Show that $f: [0, \pi] \to \mathbb R$, $f(x) = \sin(x)$ is Riemann-integrable and determine $\int_0^\pi f$ (e.g. by Riemann sums)
I showed it being Riemann-integrable because it is continuous.
So, I made an equal partition $P_n$, s. t. $|x_i - x_{i-1}|= {\pi \over n}$ and $$S(f, P, Z) = \sum_{i=1}^n \sin({i\pi \over n}){\pi \over n}$$
I've been given a formula $\sin(a)+\sin(a+t)+\sin(a+2t)+...+\sin(a+(n-1)t) = {\sin(nt/2) \over \sin(t/2)} \sin(a+{n-1 \over 2}t)$ whis is good for all $a, t \in \mathbb R$, $t \neq 0$.
I took out $\pi \over n$ from the sum and put it in front of it, ran the formula and got $${{\sin({n({\pi \over n}) \over 2})} \over \sin({{\pi \over n} \over 2})} \sin({\pi \over n} + {n-1 \over 2}{\pi \over n})$$
I rolled it around a bit, but could not get $2$ out of it, any help?