Expressing the integral as the limit of sums and evaluating Hello I'm having some issues with a homework problem.
I need to express the integral as the limit of sums and evaluate
$$\int_0^\pi \sin(7x)\,dx$$
I can find
$$ \Delta x = \frac{\pi-0}{n} = \frac{\pi}{n} \text{ and }x_i = 0 + \frac{\pi}{n}i$$
so I get
$$\int_0^\pi \sin(7x)\,dx = \lim_{n\to \infty}\sum_{i=1}^n\sin\left(\frac{7\pi}{n}i\right)\frac{\pi}{n} $$ 
I know that $$\lim_{n\to \infty}\sum_{i=1}^n\sin\left(\frac{7\pi}{n}i\right)\frac{\pi}{n} = \frac{2}{7}$$
but I need to understand how to get there only using limits and sums.
this is where I'm stuck, I don't know how to proceed while expressing the limit and sum.
Any help would be greatly appreciated.
 A: $$\begin{align}
  & \text{using}\ \text{lagrange trigonometric identity}\ \text{which reads:} \\ 
 & \sum\nolimits_{i=1}^{n}{\operatorname{Sin}\left( i\theta  \right)}=\frac{1}{2}Cot\left( \frac{\theta }{2} \right)-\frac{\operatorname{Cos}\left( \left( n+\frac{1}{2} \right)\theta  \right)}{2\operatorname{Sin}\left( \frac{\theta }{2} \right)}, \\ 
 & Now \\ 
 & \sum\nolimits_{i=1}^{n}{\operatorname{Sin}\left( i\frac{7\pi }{n} \right)}=\frac{1}{2}Cot\left( \frac{7\pi }{2n} \right)-\frac{\operatorname{Cos}\left( \left( n+\frac{1}{2} \right)\frac{7\pi }{n} \right)}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)} \\ 
 & \quad \quad \quad \quad \quad \quad =\frac{1}{2}Cot\left( \frac{7\pi }{2n} \right)-\frac{\operatorname{Cos}\left( 7\pi +\frac{7\pi }{2n} \right)}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)} \\ 
 & \quad \quad \quad \quad \quad \ \ =\frac{\operatorname{Cos}\left( \frac{7\pi }{2n} \right)}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)}-\frac{\operatorname{Cos}\left( 7\pi +\frac{7\pi }{2n} \right)}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)} \\ 
 & \quad \quad \quad \quad \quad \ \ =\frac{1}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)}\left( \operatorname{Cos}\left( \frac{7\pi }{2n} \right)-\operatorname{Cos}\left( 7\pi +\frac{7\pi }{2n} \right) \right) \\ 
 & So \\ 
 & \underset{n\to \infty }{\mathop{\lim }}\,\sum\nolimits_{i=1}^{n}{\operatorname{Sin}\left( i\frac{7\pi }{n} \right)}\frac{\pi }{n} \\ 
 & \underset{n\to \infty }{\mathop{\lim }}\,\frac{\pi }{n}\sum\nolimits_{i=1}^{n}{\operatorname{Sin}\left( i\frac{7\pi }{n} \right)}=\underset{n\to \infty }{\mathop{\lim }}\,\frac{\pi }{n}\left( \frac{1}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)}\left( \operatorname{Cos}\left( \frac{7\pi }{2n} \right)-\operatorname{Cos}\left( 7\pi +\frac{7\pi }{2n} \right) \right) \right) \\ 
 & \quad \quad \quad \quad \quad \ \ \quad \quad \quad =\underset{n\to \infty }{\mathop{\lim }}\,\frac{\frac{\pi }{n}}{2\operatorname{Sin}\left( \frac{7\pi }{2n} \right)}\ \underset{n\to \infty }{\mathop{\lim }}\,\left( \operatorname{Cos}\left( \frac{7\pi }{2n} \right)-\operatorname{Cos}\left( 7\pi +\frac{7\pi }{2n} \right) \right) \\ 
 & \quad \quad \quad \quad \quad \ \ \quad \quad \quad =\frac{\pi }{2\times \frac{7\pi }{2}}\times \left( \operatorname{Cos}\left( 0 \right)-\operatorname{Cos}\left( 7\pi  \right) \right)=\frac{1}{7}\times 2=\frac{2}{7} \\ 
\end{align}
$$
