7

Consider,

$$ \sin A \sin B$$

Using exponential definition of sine,

$$ \frac{ e^{iA} - e^{-iA} }{2i} \cdot \frac{ e^{iB} - e^{-iB} }{2i}$$

$$ =\frac{1}{-4} ( e^{ i (A+B) } - e^{i (A-B)} -e^{ -i(A-B) } + e^{ - i(A+B)})$$

$$ =\frac{-1}{4} ( 2\cos(A+B) - 2 \cos(A-B) )$$

or,

$$ \frac{1}{2} ( \cos(A-B) - \cos(A+B) )$$

Now, I want to generalize this trick for like

$$ \sin A \sin B \sin C \sin D....$$

  • 4
    a very good question I've been wondering about it last year before I found this site. – BriggyT Jul 17 '20 at 22:47
  • 2
    For me, it tends to be easier to get a sense of things by setting-aside the exponentials, expanding appropriate multiple-angle functions, and then seeing how they combine to get just the product desired. Eg, seeking $\sin A\sin B\sin C$, I'd define $s_0=\sin(A+B+C)$, $s_A:=\sin(-A+B+C)$, $s_B:=\sin(A-B+C)$, $s_C:=\sin(A+B-C)$, each of which expands to $\pm\sin A\cos B\cos C\pm\cos A\sin B\cos C\pm\cos A\cos B\sin C\pm\sin A\sin B\sin C$ for appropriate choices of $\pm$. Then, I'd try to combine so that unwanted terms cancel; as it turns out: $$\sin A\sin B\sin C=\frac14(-s_0+s_A+s_B+s_C)$$ – Blue Jul 17 '20 at 22:51
  • @DDD4C4U Great! If you find a good solution, consider posting it as an answer. – user804886 Jul 18 '20 at 04:04
  • You were too early – Yuri Negometyanov Oct 04 '21 at 13:26

3 Answers3

5

In more general terms we are being asked to express a product of sines and cosines as a sum of sines and cosines. So let us begin with the easiest case, that of a product of cosines and then see how to manipulate the answer in that case to deal with the product of sines case.

So let $\theta_1,\theta_2,\dots,\theta_n\in\mathbb{R}$ be the angles. We want to find a simplification for $$ \prod_{k=1}^{n}\cos\theta_k=\frac{1}{2^n}\prod_{k=1}^{n}\left(\exp (i\theta_k)+\exp(-i\theta_k)\right). $$ The difficulty is keeping track of the signs, so we introduce the notation $\epsilon=(\epsilon_1,\dots,\epsilon_n)$, where each $\epsilon_k\in\{-1,+1\}$. For convenience let us write $\theta:=(\theta_1,\dots,\theta_n)$. We then can sensibly use the compact notation $\epsilon\cdot\theta=\sum_{k=1}^{n}\epsilon_k\theta_k$. It is also convenient to use the compact notation $(-1)^\epsilon:=\epsilon_1\dots \epsilon_n$.

With this notation in place we see at once that $$ \prod_{k=1}^{n}\left(\exp (i\theta_k)+\exp(-i\theta_k)\right)= \sum_{\epsilon} \exp(i \epsilon\cdot\theta), $$ where the sum is over the $2^n$ choices of $\epsilon$.

As the left hand side is real we need only take the real part of the right hand side, and so in fact have $$ \prod_{k=1}^{n}\left(\exp (i\theta_k)+\exp(-i\theta_k)\right)= \sum_{\epsilon} \cos(\epsilon\cdot\theta), $$ or $$ \prod_{k=1}^{n}\cos\theta_k=\frac{1}{2^n}\sum_{\epsilon} \cos(\epsilon\cdot\theta). $$

To transform $\cos\theta_k$ to $\sin\theta_k$ we need only apply the operator $-\frac{\partial}{\partial\theta_k}$; and so we have $$ \prod_{k=1}^{n}\sin\theta_k=\frac{(-1)^n}{2^n}\frac{\partial^n}{\partial\theta_1\dots\partial\theta_n}\sum_{\epsilon} \cos(\epsilon\cdot\theta). $$

For the moment let us write $\cos^{(n)}(x)$ for the $n$-derivative of $\cos x$. Then we have $$ \prod_{k=1}^{n}\sin\theta_k=\frac{(-1)^n}{2^n}\sum_{\epsilon}(-1)^{\epsilon} \cos^{(n)}(\epsilon\cdot\theta). $$ Recall that $\cos'=-\sin$ and $\sin'=\cos$, which means that our answer depends on the congruence class of $n$ modulo $4$. So write $n=4m+r$ with $0\leqslant r<4$.

Finally we have that $$ \textrm{ when $r=0$, } \prod_{k=1}^{n}\sin\theta_k=\frac{1}{2^n}\sum_{\epsilon}(-1)^{\epsilon} \cos(\epsilon\cdot\theta); $$ $$ \textrm{ when $r=1$, } \prod_{k=-1}^{n}\sin\theta_k=\frac{1}{2^n}\sum_{\epsilon}(-1)^{\epsilon} \sin(\epsilon\cdot\theta); $$ $$ \textrm{ when $r=2$, } \prod_{k=-1}^{n}\sin\theta_k=\frac{-1}{2^n}\sum_{\epsilon}(-1)^{\epsilon} \cos(\epsilon\cdot\theta); $$ $$ \textrm{ when $r=3$, } \prod_{k=-1}^{n}\sin\theta_k=\frac{-1}{2^n}\sum_{\epsilon}(-1)^{\epsilon} \sin(\epsilon\cdot\theta). $$

The technique can be adapted to describe a product of $s$ cosines with $(n-s)$ sines; the problem is fixing on a compact enough notation to keep track of the sign changes and the $\cos/\sin$ swaps.

ancient mathematician
  • 14,102
  • 2
  • 16
  • 31
2

This seems the most natural choice of generalization I could come up with of a product $N$ sines. Let's begin!

$$\prod_{n=0}^{N-1} \sin(\theta_n)$$

$$\frac{1}{2^Ni^N}\prod_{n=0}^{N-1} (e^{i \theta_n}-e^{-i\theta_n})$$

Now we have to be a bit careful and expand this product into a sum of $2^N$ terms by noticing that I can imagine each term in the sum as coming from picking either the $e^{i \theta_n}$ term or the $-e^{-i\theta_n}$ term. We can put the first term as a $0$ digit and the second term as a $1$ digit for counting them in terms of the base $2$ expansion of our numbers from $0$ to $2^N-1$, specifically this is nice because it means we can encode the negative sign that appears as a coefficient and exponent as $(-1)^0$ or $(-1)^1$.

I'll write out an example with 2 terms to help illustrate the idea if you need the stepping stone,

$$((-1)^0e^{i(-1)^0\theta_0}+(-1)^1e^{i(-1)^1\theta_0})((-1)^0e^{i(-1)^0\theta_1}+(-1)^1e^{i(-1)^1\theta_1})$$

$$(-1)^{0+0}e^{i((-1)^0\theta_0+(-1)^0\theta_1)}+(-1)^{1+0}e^{i((-1)^1\theta_0+(-1)^0\theta_1)}+(-1)^{0+1}e^{i((-1)^0\theta_0+(-1)^1\theta_1)}+(-1)^{1+1}e^{i((-1)^1\theta_0+(-1)^1\theta_1)}$$

Hopefully it's clear to make out where the binary number digits of 00, 01, 10, and 11 are appearing.

Now the fully general version, specifically I'll be using the indices written in binary as: $k=\sum_{t=0}^{N-1}k_t2^t$.

$$\frac{1}{2^Ni^N}\sum_{k=0}^{2^N-1} (-1)^{\sum_{t=0}^{N-1}k_t} e^{i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}$$

Now I want to highlight another trick with binary that we'll need to reform these exponentials back into trig functions. We want to pair up the exponentials that have the same angle, only negative. In terms of the binary digits, this means taking their complement, i.e. exchanging 0s and 1s. Thankfully this is a very simple operation, the complement of $k$ is $2^N-1 - k$. This is easily seen by the geometric series that $2^N-1 = \underset{\text{N times}}{\underbrace{11\dots11}}$ and so by subtracting $k\le 2^N-1$ we are simply removing the $1$s to get the complement. I will denote the $t$th digit of the complement as $\bar k_t$. Now we sum halfway and double up terms:

$$\frac{1}{2^Ni^N}\sum_{k=0}^{2^{N-1}-1} (-1)^{\sum_{t=0}^{N-1}k_t} e^{i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}+ (-1)^{\sum_{t=0}^{N-1}\bar k_t} e^{i\sum_{t=0}^{N-1}(-1)^{\bar k_t}\theta_t}$$

Let's focus the two terms where the complement came in. In particular we'll use the fact that $(-1)^{\bar k_t} = (-1)^{k_t+1}$, which just says that $k_t$ and its complement digit have opposite parity, I'll work out the first occurrence here:

$$(-1)^{\sum_{t=0}^{N-1}\bar k_t} = \prod_{t=0}^{N-1} (-1)^{\bar k_t} = \prod_{t=0}^{N-1} (-1)^{k_t+1} = (-1)^N\prod_{t=0}^{N-1} (-1)^{k_t}$$

Plugging this back in with the other occurrence to put the $\bar k_t$ in terms of $k_t$ gets,

$$\frac{1}{2^Ni^N}\sum_{k=0}^{2^{N-1}-1} (-1)^{\sum_{t=0}^{N-1}k_t} e^{i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}+ (-1)^N(-1)^{\sum_{t=0}^{N-1}k_t} e^{-i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}$$

$$\frac{1}{2^{N-1}i^N}\sum_{k=0}^{2^{N-1}-1} (-1)^{\sum_{t=0}^{N-1}k_t} \left(\frac{e^{i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}+ (-1)^Ne^{-i\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t}}{2}\right)$$

Now if $N$ is even we get,

$$\prod_{n=0}^{N-1} \sin(\theta_n) = \frac{1}{2^{N-1}(-1)^\frac{N}{2}}\sum_{k=0}^{2^{N-1}-1} (-1)^{\sum_{t=0}^{N-1}k_t} \cos\left(\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t\right)$$

And if $N$ is odd we get,

$$\prod_{n=0}^{N-1} \sin(\theta_n) = \frac{1}{2^{N-1}(-1)^\frac{N-1}{2}}\sum_{k=0}^{2^{N-1}-1} (-1)^{\sum_{t=0}^{N-1}k_t} \sin\left(\sum_{t=0}^{N-1}(-1)^{k_t}\theta_t\right)$$


We're done! But let's do a quick sanity check for the case when $N=2$ to see if we get what we know to be true.

$$\sin(\theta_0)\sin(\theta_1) = \frac{1}{-2}\sum_{k=0}^1(-1)^{\sum_{t=0}^1 k_t} \cos\left(\sum_{t=0}^1(-1)^{k_t}\theta_t\right)$$

$$=\frac{1}{-2}\left((-1)^{0+0}\cos((-1)^0\theta_0+(-1)^0\theta_1)+(-1)^{1+0}\cos((-1)^1\theta_0+(-1)^0\theta_1)\right)$$

$$=\frac{1}{2}\left(-\cos(\theta_0+\theta_1)+\cos(-\theta_0+\theta_1)\right)$$

This is exactly what we were expecting, that's a relief. If you need me to explain any parts more, just ask I'm happy to elaborate.

Merosity
  • 2,489
  • 1
  • 8
  • 16
0

$\color{brown}{\textbf{Identity for cosines.}}$

$\color{blue}{\textbf{Preliminary analysis.}}$


Applying the proposed trick to to production of a pair of cosines, one can get $$\cos x\cos y=\dfrac{e^{ix}+e^{-ix}}2\,\dfrac{e^{iy}+e^{-iy}}2 =\dfrac{e^{i(x+y)}+e^{-i(x+y)}+e^{i(x-y)}+e^{-i(x-y)}}4,$$ $$\cos x\cos y = \dfrac{\cos(x+y)+\cos(x-y)}2.\tag1$$


Let us define the sign factors $$p_{kj}=(-1)^{b_{kj}}=1-2b_{kj},\quad\text{where}\;b_{kj}=\genfrac{\lfloor}{\rfloor}{}{0}k{2^j}-2\genfrac{\lfloor}{\rfloor}{}{0}k{2^{j+1}}\tag2$$ is the $j$-th bit of the unsigned integer number $\,k\,$ from the least signed bit ($j=0$).

At the common case, any algebraic sum of the cosine production arguments (with the positive factor near the starting term) can be presented in the form of $$s_n\left(k,\bar v\right) = \bar p_n(k)\cdot\bar v,\qquad \left(k=0,1\dots2^{n-1}-1\right) \tag3$$ where $$\bar v=\{v_0, v_1,\dots,v_{n-1}\}\tag4$$ is the vector of a cosine production arguments and $$\bar p_n(k) =\{p_{k0}, p_{k1},\dots,p_{k,n-1}\}\tag5$$ is the sign combination vector.


$\color{blue}{\textbf{Simple examples.}}$


Are known the binary system representations $$0=0000_2,\;1=0001_2,\;2=0010_2,\;3=0011_2.$$ Taking in account $(2)-(5),$ easily to see that

$$s^\,_2(0,\bar v) \dbinom11\cdot\dbinom{v_0}{v_1} = v_0+v_1,\quad s^\,_2(1,\bar v) = \dbinom1{-1}\cdot\dbinom{v_0}{v_1} = v_0-v_1,$$ $$\cos v_0 \cos v_1 = \dfrac12\left( \cos s^\,_2(0,\bar v)+\cos s^\,_2(1,\bar v)\right),$$

$$s^\,_3(0,\bar v) = v_0+v_1+v_2,$$ $$s^\,_3(1,\bar v) = v_0+v_1-v_2,$$ $$s^\,_3(2,\bar v) = v_0-v_1+v_2,$$ $$s^\,_3(3,\bar v) = v_0-v_1-v_2,$$ $$\cos v_0 \cos v_1 \cos v_2 = \dfrac14\left(\cos s^\,_3(0,\bar v) +\cos s^\,_3(1,\bar v) + \cos s^\,_3(2,\bar v) + \cos s^\,_3(3,\bar v)\right).$$


$\color{blue}{\textbf{Identity proof.}}$


The analysis suggests the inequality in the form of $$\prod\limits_{j=0}^{n-1}\cos v_j=\dfrac1{2^{n-1}}\, \sum\limits_{k=0}^{2^{n-1}-1}\,\cos s^\,_n(k,\bar v).\tag6$$ Let us prove it by the method of mathematical induction.

  • For $\,n=2,\, n=3\,$ formulas $(6)$ holds.
  • Suppose that formulas $(6)$ holds for $\,n=m,\,$ i.e $$\prod\limits_{j=0}^{m-1}\cos v_j=\dfrac1{2^{m-1}} \,\sum\limits_{k=0}^{2^{m-1}-1}\,\cos s^\,_m(k,\bar v).\tag7$$ Then, taking in account formulas $(1)-(4),$ one can get $$\prod\limits_{j=0}^{m}\cos v_j=\dfrac1{2^{m-1}}\,\sum\limits_{k=0}^{2^{m-1}-1}\,\cos s^\,_m(k,\bar v)\cos v_m$$ $$=\dfrac1{2^{m-1}}\,\sum\limits_{k=0}^{2^{m-1}-1}\, \left(\dfrac{\cos(s^\,_m(k,\bar v)+v_m)+\cos(s^\,_m(k,\bar v)-v_m)}2 \right)$$ $$=\dfrac1{2^{m-1}}\,\sum\limits_{k=0}^{2^{m-1}-1}\, \left(\dfrac{\cos s^\,_{m+1}(2k,\bar v)+\cos s^\,_{m+1}(2k+1,\bar v)}2 \right)$$ $$=\dfrac1{2^m}\,\sum\limits_{k=0}^{2^m-1}\,\cos s^\,_m(k,\bar v).$$

Therefore, from the correctness of $(6)$ for $\,n=m\,$ follows its correctness for $\,n=m+1,\,$ and this completes the proof of $(6).$


$\color{brown}{\textbf{Identity for sines.}}$


From OP should that ​the identity for sines:

  • can contain the different signs between terms in the final sum;
  • can be expressed via sines or via cosines.

There is a motivation of the previous part of the work.

On the other hand, $$\sin z = \Im e^{iz} = \Re\left(-ie^{iz}\right) = \Re \exp\left(-i\,\dfrac\pi2+iz\right) = \cos\left(\dfrac\pi2-z\right),$$ and then $$\prod\limits_{j=0}^{n-1}\sin v_j=\prod\limits_{j=0}^{n-1}\, \cos\left(\dfrac\pi2-v_i\right) =\dfrac1{2^{n-1}}\,\sum\limits_{k=0}^{2^{n-1}-1}\,\cos\,\sum\limits_{j=0}^{n-1}\,p_{kj}\left(\dfrac\pi2 - v_j\right)$$ $$=\dfrac1{2^{n-1}}\,\sum\limits_{k=0}^{2^{n-1}-1}\,\cos \sum\limits_{j=0}^{n-1}\left(s^\,_n(k,v)-(1-2b_{kj})\,\dfrac\pi2\right),$$ $$\prod\limits_{j=0}^{n-1}\sin v_j= \dfrac1{2^{n-1}}\,\sum\limits_{k=0}^{2^{n-1}-1}\,\cos\left(s^\,_n(k,v)-\dfrac{\pi n}2 +\pi\sum b_{kj}\right),\tag8$$ $$\prod\limits_{j=0}^{n-1}\sin v_j\Bigg|_{n=2h+1} = \dfrac1{2^{n-1}}\,\sum\limits_{k=0}^{2^{n-1}-1}\,(-1)^{h+\beta_k} \sin s^\,_n(k,v),\tag{8$\text O$}$$ $$\prod\limits_{j=0}^{n-1}\sin v_j\Bigg|_{n=2h} = \dfrac1{2^{n-1}}\,\sum\limits_{k=0}^{2^{n-1}-1}\,(-1)^{h+\beta_k} \cos s^\,_n(k,v),\tag{8$\text E$}$$ wherein $$\beta_k = \sum b_{kj}\tag9$$ is the sum of bits in the binary number notation.


For example, in the case $\,\underline{n=5}$ the terms and the result are

Terms, n=5 Result, n=5