$\int_{\frac{1}{3}\pi}^{\frac{2}{3}\pi} {\sin(x)\;dx}$ using Riemann sums? How to find the integral $$\int_{\frac{1}{3}\pi}^{\frac{2}{3}\pi} {\sin(x)\;dx}=1$$ using Riemann sums?
 A: We will use the identities
$$
\sum_{k=1}^n\cos(kx)=\frac12\left(\frac{\sin\left(\frac{2n+1}{2}x\right)}{\sin\left(\frac12x\right)}-1\right)
$$
and
$$
\sum_{k=1}^n\sin(kx)=\frac{\sin\left(\frac{n+1}{2}x\right)\sin\left(\frac n2x\right)}{\sin\left(\frac12x\right)}
$$
The Riemann Sum is
$$
\begin{align}
&\int_{\pi/3}^{2\pi/3}\sin(x)\,\mathrm{d}x\\
&=\lim_{n\to\infty}\sum_{k=1}^n\sin\left(\frac\pi3+\frac\pi3\frac kn\right)\frac\pi{3n}\\
&=\lim_{n\to\infty}\sum_{k=1}^n\left(\sin\left(\frac\pi3\right)\cos\left(\frac\pi3\frac kn\right)+\cos\left(\frac\pi3\right)\sin\left(\frac\pi3\frac kn\right)\right)\frac\pi{3n}\\
&=\lim_{n\to\infty}\sin\left(\frac\pi3\right)\frac\pi{6n}\left(\frac{\sin\left(\frac{2n+1}{2}\frac\pi{3n}\right)}{\sin\left(\frac12\frac\pi{3n}\right)}-1\right)+\cos\left(\frac\pi3\right)\frac\pi{3n}\frac{\sin\left(\frac{n+1}{2}\frac\pi{3n}\right)\sin\left(\frac n2\frac\pi{3n}\right)}{\sin\left(\frac12\frac\pi{3n}\right)}\\
&=\sin^2\left(\frac\pi3\right)+2\cos\left(\frac\pi3\right)\sin^2\left(\frac\pi6\right)\\[9pt]
&=\frac34+2\cdot\frac12\cdot\frac14\\[15pt]
&=1
\end{align}
$$
A: Hint: $\sin(a) \sin(h/2) = \dfrac{\cos(a - h/2) - \cos(a + h/2)}{2}$ can be used to get a nice formula for $\sin(a) + \sin(a+h) + \ldots \sin(a + nh)$.
