# Need to simplify this Trigonometric Expression?

I want to use simplified the expression of the following sum because I don't want to use numerical approach. Is there an equivalent to the following expression.

$\left (\sum_{i=1}^{k}\sin\left ( \varphi _{i}\right ) \right )^{2}+\left (\sum_{i=1}^{k}\cos\left ( \varphi _{i}\right ) \right )^{2}$

I think that if you just develop the squares and use Werner's second and third formulas you should get

$$k + 2\sum_{i<j} cos (\phi_i - \phi_j)$$

• I had never seen the name "Werner's formulas": I strongly disapprove giving (unknown !!!) mathematician's names to old formulas named "addition/product formulas". If you have the choice give them the name "Al kasi" to celebrate their real discoverer. – Jean Marie Oct 22 '16 at 21:35
• Excuse me Jean Marie, but in Italy those are called Werner's Formulas even in high-school texts. – Luca Oct 26 '16 at 15:46
• Thank you for your interesting answer. I am conscious that there are a few naming differences between contries. In this case, in France, which has so many things in common with Italy, this naming is completely unknown. – Jean Marie Oct 27 '16 at 9:19

Let me give a vectorial presentation of the excellent answer by Luca:

Let $V_i:=\binom{\cos(\varphi_i)}{\sin(\varphi_i)}$ which is a unit vector.

What you are looking for is

$$\|\sum_{i=1}^k V_i\|^2=(\sum_{i=1}^k V_i)^2=\sum_{i=1}^k\sum_{j=1}^k V_i . V_j=\sum_{i=1}^k V_i^2+2\sum_{1 \leq i<j\leq k}V_i . V_j$$

$$=k+2 \sum_{1 \leq i<j\leq k}\cos(\varphi_i-\varphi_j)$$