3

In another question one user helped me prove that the sum of three angles was a multiple of 360 degrees with formulas for sine and cosine sums of three angles. The sine formula was: $\sin⁡(α+β+γ)=\sin ⁡α\cos⁡\beta\cos ⁡γ+\cos ⁡α\sin ⁡β\cos ⁡γ+\cos ⁡α\cos ⁡β\sin ⁡γ-\sin ⁡α\sin ⁡β\sin ⁡γ$

I infer that the pattern for five angles is as shown below? For brevity, I'm using a shorthand, e.g. $\sin⁡(α+β+γ):s(a_1+a_2+a_3 )$ and $\sin ⁡α\cos ⁡\beta\cos ⁡γ∶s_1 c_2 c_3$. So, is the following the proper pattern for summing five angles? $$s(a_1+a_2+a_3+a_4+a_5)=s_1 c_2 c_3 c_4 c_5+c_1 s_2 c_3 c_4 c_5+c_1 c_2 s_3 c_4 c_5+c_1 c_2 c_3 s_4 c_5+c_1 c_2 c_3 c_4 s_5-s_1 s_2 s_3 s_4 s_5$$

If so, I can also infer the pattern for cosine and use the patterns for any number of angles.

jgon
  • 29,394
poetasis
  • 6,795
  • I am looking for the correct form of a 5-angle sum using the format in my attempt above. I hope to use it to find certain combinations among thousands or millions of sets of angles generated programmatically. – poetasis Jul 21 '18 at 13:54

5 Answers5

4

In my opinion this formula is the best one: \begin{equation} \sin\left[\sum_{j=1}^N a_j\right] = \sum_{\sigma_{1,\dots,N-1}=\pm} \left[\prod_{j=1}^{N} \sin\left[a_j + \left(2 + \sigma_j-\sigma_{j-1} -\delta_{j1}(1-\sigma_{j-1}) - \delta_{jN}(1+\sigma_{j})\right)\frac{\pi}4\right]\right] \end{equation} The $\delta$'s are Kronecker deltas.

I hope it will be of use to someone; I used it to write the sine as a product of eigenvalues = a matrix. (This last fact is not relevant to the question, but a useful consequence of the above decomposition, i.e. any symbolic product can be written as a matrix with the individual factors of the product along the diagonal. The above produces a signed sum of these matrices, which gave the decomposition as given above some other application.)

EDIT:

Applied to the case N=5, the formula predicts \begin{align} \sin\left[\sum_1^5 a_j\right] = \sum_{\sigma_1,\sigma_2,\sigma_3,\sigma_4=\pm} \sin\left[a_1+(1+\sigma_1)\frac\pi4\right]\sin\left[a_2+(2+\sigma_2-\sigma_1)\frac\pi4\right]\sin\left[a_3+(2+\sigma_3-\sigma_2)\frac\pi4\right]\sin\left[a_4+(2+\sigma_4-\sigma_3)\frac\pi4\right]\sin\left[a_5+(1-\sigma_4)\frac\pi4\right] \end{align}

which can be verified by using the Mathematica code

pmlist = {-1, 1};
n = 5;
sigma\[LetterSpace]list\[LetterSpace]symb = 
  Reap[Do[Sow[
       ToExpression["\[Sigma]\[LetterSpace]" <> ToString[l]]], {l, 
       Range[n]}]][[2]][[1]];
sigma\[LetterSpace]list\[LetterSpace]symb\[LetterSpace]appended = \
{sigma\[LetterSpace]list\[LetterSpace]symb[[#]], pmlist} & /@ 
  Range[n - 1]
Sin[Sum[Subscript[a, i], {i, 1, n}]] - 
  Fold[Sum[#1, #2] &, 
   Product[Sin[
     Subscript[a, 
       j] + (\[Pi]/4)*(2 + 
         ToExpression["\[Sigma]\[LetterSpace]" <> ToString[j]] - 
         ToExpression["\[Sigma]\[LetterSpace]" <> ToString[j - 1]] - 
         KroneckerDelta[j, 
           1]*(1 - 
            ToExpression[
             "\[Sigma]\[LetterSpace]" <> ToString[j - 1]]) - 
         KroneckerDelta[j, 
           n] (1 + 
            ToExpression[
             "\[Sigma]\[LetterSpace]" <> ToString[j]]))], {j, 1, n}], 
   sigma\[LetterSpace]list\[LetterSpace]symb\[LetterSpace]appended] // \
TrigExpand
  • I have no idea what you are talking about, especially after looking up Kronecker deltas and Eigenvalues. What I asked for is a formula for the sum of $5$ dissimilar acute angles. – poetasis Oct 22 '19 at 07:10
  • @poetasis I have added your application to the answer plus some code for symbolic verification. Best wishes – 1010011010 Oct 22 '19 at 14:55
  • Hello, are the sigmas +-1 or how does this work? :) – easymathematics May 12 '21 at 16:28
  • Hi @easymathematics, yes sigma is basically just a sign. The summation over sigmas then implies that you have two terms, one in which the sigma is + and the other in with it is -. The single summation sign over multiple sigma_1 sigma_2 etc. is actually an abuse of notation. Read the above example for $n=5$ as four separate summations. – 1010011010 Nov 25 '21 at 13:28
2

The correct formulas can be derived from the following knowledge. $$e^{i\alpha}=\cos\alpha + i\sin\alpha.$$

Hence $$\sin(a_1+a_2+a_3+a_4+a_5)=\renewcommand{\Im}{\operatorname{Im}}\Im e^{i(a_1+a_2+a_3+a_4+a_5)} = \Im e^{ia_1}e^{ia_2}e^{ia_3}e^{ia_4}e^{ia_5}$$ $$=\Im (c_1+is_1)(c_2+is_2)(c_3+is_3)(c_4+is_4)(c_5+is_5)$$ $$= \sum_{j=1}^5s_j\prod_{k\ne j} c_k - \sum_{\substack{\{j_1,j_2,j_3\}\subseteq[5]\\\{j_4,j_5\}=\{j_1,j_2,j_3\}^C}} s_{j_1}s_{j_2}s_{j_3} c_{j_4}c_{j_5} + s_1s_2s_3s_4s_5.$$

Note that the middle summation is the only piece missing from your formula above, and that the product of all sins has opposite sign from your formula. The reason we get this formula is that the only pieces of the product that contribute to the imaginary part are the pieces which have an odd number of sins in them. Thus we have three parts in our formula, since we can take 1 sin, 3 sins or 5 sins to get an imaginary piece.

In general, this leads one to derive the formula (correct me if my indices are messed up) $$\sin\left(\sum_{i=1}^n a_i\right) =\sum_{k=0}^{\lfloor(n-1)/2\rfloor}\sum_{\substack{A\subseteq [n]\\|A|=2k+1}}(-1)^k\prod_{i\in A} s_i\prod_{j\in A^C}c_j.$$

jgon
  • 29,394
  • I'm guessing your answer is probably correct but it is in terms that I don't remember how to use – it's been 4 decades since I got my degree and I've been out of academics since then. I'm more interested a simple yes or no about the pattern I inferred for the sum of 5 angles. Thanks. – poetasis Jul 20 '18 at 22:16
  • @poetasis Briefly, no. If I try to express the correct pattern in words it is: First take all possible products with one sine and the rest cosine, subtract all possible products with three sines and the rest cosines, add all possible products with 5 sines and the rest cosines, subtract again for 7 sines, add again for 9 sines, and so on until you run out of angles. (As in for 5 angles, you naturally can't take 7 sines.) – jgon Jul 20 '18 at 22:19
  • @poetasis if you could explain what dissatisfied you about my comment, I might be able to help you. My comment made no mention of e or imaginary parts, and I've never mentioned limits in my answer or comments. Moreover I answered your question both in my answer and the comments telling you that your formula was incorrect. What's more I have described the correct formula in both words and symbols, but I don't have the time to spend typing out all the pieces of the sum explicitly. – jgon Jul 21 '18 at 16:35
  • @poetasis ... Though I see you're responding to someone else whose comment is no longer present. That being said, I'd hoped my comment would be helpful. – jgon Jul 21 '18 at 16:38
  • I misread the 'Im' in your answer to be 'lim' but your answer did speak of 'e' and imaginary parts. Further, your attempt to explain in words left me skeptical because you indicated a need for 7 and 9 sines. I don't want to take up any more of your time and MSE discourages extended discussions so let us end this now, accepting that some communications are just not effective. – poetasis Jul 21 '18 at 19:09
  • @poetasis That's reasonable, I'll just try to clarify my comment slightly. There is no need for 7 or 9 sines in the case of 5 angles, since there are none. Rather you stop at 5. I was giving the general pattern that generalizes to any number of angles. – jgon Jul 21 '18 at 19:12
  • In case everyone else is wondering what those funny symbols mean: ${j_1,j_2,j_3}\subseteq[5]$ means a subset of three variables from a set of 5 integers (1 to 5). ${j_4,j_5}={j_1,j_2,j_3}^C$ means two variable subset complementary to the three chosen before. $\lfloor(n-1)/2\rfloor$ means round down the value of $(n-1)/2$, $|A|=2k+1$ is the number of elements inside $A$ chosen from $[n]$. For cosine formula, just swap $s_i$ with $c_i$ and $c_j$ with $s_j$ (maybe, I think). – syockit Feb 14 '21 at 10:26
2

$s(a_1+a_2+a_3) = s_1c_2c_3+c_1s_2c_3+c_1c_2s_3-s_1s_2s_3 $

$c(a_1+a_2+a_3) =$ $$s(\frac \pi 2 -(a_1+a_2+a_3)) \\ =s((\frac \pi 2 -a_1)+(-a_2)+(-a_3)) \\= c_1c_2c_3 -s_1s_2c_3- s_1c_2s_3-c_1s_2s_3$$ And we also know ... $s(a_4+a_5) = s_4c_5+ c_4s_5$

$c(a_4+a_5) = c_4c_5- s_4s_5$

So

$$s(a_1+a_2+a_3+a_4+a_5) \\ =( s_1c_2c_3+c_1s_2c_3+c_1c_2s_3-s_1s_2s_3) ( c_4c_5- s_4s_5) \\+ ( c_1c_2c_3 -s_1s_2c_3- s_1c_2s_3-c_1s_2s_3)(s_4c_5+ c_4s_5 ) $$ There will be no cancellations so you will get 16 terms ( they will be the half of the $2^5=32$ possible arrangements of sines and cosines having an odd number of sines )

The coefficient in front of each term having $(2k+1)$ sines will be $(-1)^k$

So for 5 angles you would expect...

$\binom 51=5$ terms having 1 sine , coefficient = +1

$\binom 53=10$ terms having 3 sines , coefficient = -1

$\binom 55=1$ term having 5 sines , coefficient = +1

WW1
  • 10,804
0

Alternatively, assuming that all angles $\,\alpha_j \in \left(0, 180^\circ\right)\,$ and none of them is a right angle, one can use that $\,\sum \alpha_j = k \cdot 360^\circ$ $\iff \sum \dfrac{\alpha_j}{2} = k \cdot 180^\circ$ $\iff \tan\left(\sum \dfrac{\alpha_j}{2}\right) = 0\,$.

For five angles $\,\alpha_j \mid j=1,2,3,4,5\,$, let $\,t_1 = \tan \dfrac{\alpha_1}{2}, t_2 = \tan \dfrac{\alpha_2}{2},\; \ldots \,, t_5 = \tan \dfrac{\alpha_1}{2}\,$, then using the $\tan$ of sum of angles formula:

$$ \tan\left(\frac{\alpha_1}{2}+\frac{\alpha_2}{2}+\ldots+\frac{\alpha_5}{2}\right) = \frac{e_1-e_3+e_5}{e_o-e_2+e_4} \quad\quad \style{font-family:inherit}{\text{where:}} \\[20px] \begin{align} \begin{cases} e_0 &= 1 \\ e_1 = \sum_{1 \le i \le 5} t_i &= t_1+t_2+t_3+t_4+t_5 \\ e_2 = \sum_{1 \le i \lt j \le 5} t_i &= t_1t_2+t_1t_3+t_1t_4+t_1t_5 \\ &\quad+t_2t_3+t_2t_4+t_2t_5 \\ &\quad+t_3t_4+t_3t_4 + \\ &\quad +t_4t_5 \\ e_3 = \sum_{1 \le i \lt j \lt k \le 5} t_it_jt_k &= t_1t_2t_3+t_1t_2t_4+t_1t_2t_5+t_1t_3t_4+t_1t_3t_5+t_1t_4t_5 \\ &\quad + t_2t_3t_4 + t_2t_3t_5+t_2t_4t_5 \\ &\quad + t_3t_4t_5 \\ e_4 = \sum_{1 \le i \lt j \lt k \lt l \le 5} t_it_jt_kt_l&= t_1t_2t_3t_4+t_1t_2t_3t_5+t_1t_2t_4t_5+t_1t_3t_4t_5+t_2t_3t_4t_5 \\ e_5 = \prod_{1 \le i \le 5} t_i &= t_1t_2t_3t_4t_5 \\ \end{cases} \end{align} $$

dxiv
  • 77,867
  • I appreciate your efforts here and in my prior question about proving that perimeter angle add up to $\pi$ but what I am looking for is a solution like 'Blue' provided in answer to 'that' question. I have extrapolated from his equation and, regrettably, used a shorthand that apparently doesn't make it clear what I want. I do want a solution in terms of sines and cosines that I can implement in Excel or programmatically. Can you offer a critique of my 'shorthand' extrapolation of Blue's solution? https://math.stackexchange.com/questions/2812907/how-to-prove-the-sum-of-angles-is-pi-radians – poetasis Jul 24 '18 at 16:34
  • @poetasis There was an answer posted already in terms of $,\sin,$ and $,\cos,$, so the above proposed an alternative in terms of $,\tan,$. As far as computations go, $,\tan \frac{A}{2} = \sqrt{\frac{(s-b)(s-c)}{s(s-a)}},$ in a triangle, which is as easy to calculate as $,\sin,$ and $,\cos,$. Can you offer a critique of my 'shorthand' extrapolation of Blue's solution? The correct formula is the one posted in jgon's answer, or here. – dxiv Jul 24 '18 at 16:51
0

This questions asks for a simpler expression for $$ \sin\left(\sum_{i=1}^n \theta_i\right) $$ We will work on this using Euler's formula \begin{align} \sin\left(\sum_{i=1}^n \theta_i\right) =& \frac{1}{2i}\left(e^{i \sum \theta_i} - e^{-i\sum{\theta_i}}\right)\\ =& \frac{1}{2i}\left(\prod_i e^{i\theta_i} - \prod_ie^{-i\theta_i}\right)\\ =&\frac{1}{2i}\left(\prod_i \left(\cos(\theta_i) + i \sin (\theta_i)\right) - \prod_i \left(\cos(\theta_i) - i \sin(\theta_i)\right)\right)\\ \end{align} let $[n] = \{1, \ldots, n\} = \{m \in \mathbb{N}: 1 \le m \le n\}$. Then \begin{align*} =& \frac{1}{2i}\sum_{A\subset [n]}\left(\prod_{k\in A}(+i)\sin(\theta_k)\prod_{k \in [n]/A}\cos(\theta_k) - \prod_{k\in A}(-i)\sin(\theta_k)\prod_{k \in [n]/A}\cos(\theta_k)\right)\\ =& \frac{1}{2i}\sum_{A\subset[n]}\left(\left((+i)^{|A|} - (-i)^{|A|}\right)\prod_{k\in A}\sin(\theta_k)\prod_{k\in [n]/A}\cos(\theta_k)\right) \end{align*} $|A|$ is the cardinality of the set $A \subset [n]$. We have \begin{align} (+i)^{|A|} - (-i)^{|A|} = \begin{cases} 0 \text{ if }|A|\text{ is even}\\ 2i \text{ if }(|A|-1)/2 \text{ is even}\\ -2i \text{ if }(|A|-1)/2 \text{ is odd} \end{cases} \end{align} so we can write \begin{align} \sin\left(\sum_{i=1}^n \theta_i\right) = \sum_{\substack{A\subset[n] \\ |A|\text{ is odd}}} (-1)^{\frac{|A|-1}{2}} \prod_{k\in A}\sin(\theta_k)\prod_{k\in [n]/A}\cos(\theta_k) \end{align}

We can provide a formula for $\cos\left(\sum_{i=1}^n \theta_i\right)$ following the same logic. The differences are that the overall prefactor during the intermediate steps is $1/2$ instead of $1/2i$ and the two terms are added instead of subtracted so we instead have \begin{align} (+i)^{|A|} + (-i)^{|A|} = \begin{cases} 0 \text{ if }|A|\text{ is odd}\\ 2 \text{ if }|A|/2\text{ is even}\\ -2 \text{ if }|A|/2\text{ is odd} \end{cases} \end{align} so we get \begin{align} \cos\left(\sum_{i=1}^n \theta_i\right) = \sum_{\substack{A\subset[n] \\ |A|\text{ is even}}} (-1)^{\frac{|A|}{2}} \prod_{k\in A}\sin(\theta_k)\prod_{k\in [n]/A}\cos(\theta_k) \end{align} These expressions match those found on Wikipedia.

We can use this to calculate $$ \sin(\theta_1 + \theta_2 + \theta_3 + \theta_4 + \theta_5) $$ Here we have $[5] = \{1, 2, 3, 4, 5\}$. We must include the odd sized subsets of this set. There are 5 with size 1 that will have a + sign, 1 with size 5 that will have a + sign, and 10 with size 3 that will have a - sign. I don't have time to write them all out right now.

Jagerber48
  • 1,631