2

Q)I am facing problem in $$\int [\sin(x)×\sin(2x)×\sin(3x)×....×\sin(nx)]dx$$ for $n\geq 4$. I want a shortcut method to this Integral.

My Approach:

I can evaluate $\int [\sin(x)×\sin(2x)]dx$ and $\int[\sin(x)×\sin(2x)×\sin(3x)]dx$ very easily.

Let me show how to integrate these two integrals.

For the integral $\int[\sin(x)×\sin(2x)]dx$ :

Let $$I=\int[\sin(x)×\sin(2x)]dx$$

$$\implies I=\frac{1}{2}\int[2×\sin(x)×\sin(2x)]dx$$

$$\implies I=\frac{1}{2}[\int\cos(x)dx-\int\cos(3x)dx]$$

Now after this step it is easy to integrate.

Similarly to integrate $\int[\sin(x)×\sin(2x)×\sin(3x)]dx$ we have to write $\sin(x)×\sin(3x)$ as $\frac{1}{2}[\cos(2x)-\cos(4x)]$. Therefore finally the integral will become $$\frac{1}{4}(\int[2×\cos(2x)×\sin(2x)]dx-\int[2×\cos(4x)×\sin(2x)]dx)$$

Now after this step it is easy to integrate.

But how to integrate $\int [\sin(x)×\sin(2x)×\sin(3x)×....×\sin(nx)]dx$ for $n\geq 4$. My process will be very much lengthy for $n\geq 4$.

Please help me out with any shortcut process to this Integral.

  • 1
    Here is a related integral except with a product of cosines. – Sahaj Jun 21 '24 at 19:28
  • It's an indefinite integral @Masacroso –  Jun 21 '24 at 19:31
  • Indeed; the provided link was for your reference. – Sahaj Jun 21 '24 at 19:32
  • 3
    This was asked recently: https://math.stackexchange.com/questions/4934565/integrating-a-large-product-of-sines – Sean Roberson Jun 21 '24 at 19:32
  • 3
    While the linked question is related, that one was for the definite integral rather than the indefinite one. That renders the problem substantially simpler, since it amounts to asking for one coefficient in the expansion of the integrand rather than all of them. – Semiclassical Jun 21 '24 at 20:39
  • 1
    You will probably want to distinguish between four cases, depending on the value of $n$ mod 4. – Semiclassical Jun 21 '24 at 20:41
  • This bounty is on the way to be wasted since it doesn't clarify what details are sought for exactly. – Ѕᴀᴀᴅ Aug 17 '24 at 02:21
  • Be careful with such high bounties. On StackOverflow I once raised a bounty of 500 points and immediately, two guys put my question on ChatGPT and copy/pasted the answer in order to collect the bounty points. – Dominique Aug 22 '24 at 07:46

2 Answers2

7

Let $c \in \{0,1\}^n$ denote a binary string, $sgn(c): = (-1)^{\text{#ones in the string}}$ and $s(c) := \sum_{k=1}^{n} (-1)^{c_k}k$.

Now, observe that $$P = \prod_{m=1}^{n}{\sin{mx}} = \frac{1}{2^ni^n}\underbrace{\prod_{m=1}^n {e^{ixm}-e^{-ixm}}}_{A}$$

Let $C$ be the set of all $c$, such that $c_n = 0$. Then by choosing the first term of the factor if $c_m = 0$ or the second if $c_m=1$ we can write $P$ as the sum:

$$ A = \begin{cases} \sum_{c\in C} sgn(c) (e^{ixs(c)}+e^{-ixs(c)}) &\text{ if $n$ is even} \\ \sum_{c\in C} sgn(c) (e^{ixs(c)}-e^{-ixs(c)}) &\text{ if $n$ is odd} \end{cases} $$

This simplifies to $$ A = \begin{cases} 2 \sum_{c\in C} sgn(c) \cdot \cos(s(c)x) &\text{ if $n$ is even} \\ 2i \sum_{c\in C} sgn(c) \cdot \sin(s(c)x) &\text{ if $n$ is odd} \end{cases} $$

Substituting $A$ into $P$ gives $$ P = \begin{cases} \frac{(-1)^k}{2^{n-1}} \sum_{c\in C} sgn(c) \cdot \cos(s(c)x) &\text{ if $n = 2k$} \\ \frac{(-1)^k}{2^{n-1}} \sum_{c\in C} sgn(c) \cdot \sin(s(c)x) &\text{ if $n = 2k+1$} \end{cases} $$

Integrating this expresion, given extra care when s(c) = 0 (if $n$ is even then then the term integrates to $sgn(c) x$, if $n$ is odd the term vanishes) $$\boxed{ \int \prod_{m=1}^{n}{\sin{mx}} \cdot dx = \begin{cases} \frac{(-1)^k}{2^{n-1}} \sum_{c\in C} a(c) &\text{if $n = 2k$} \\ \frac{(-1)^{k+1}}{2^{n-1}} \sum_{c\in C} b(c) &\text{if $n = 2k+1$} \\ \end{cases}} $$ where $$ \boxed{a(c) = \begin{cases} \frac {sgn(c)}{s(c)} \cdot \sin(s(c)x) &\text{if $s(c) \neq 0$} \\ sgn(c) \cdot x &\text{if $s(c) = 0$} \\ \end{cases} \\ b(c) = \begin{cases} \frac {sgn(c)}{s(c)} \cdot \cos(s(c)x) &\text{if $s(c) \neq 0$} \\ 0 &\text{if $s(c) = 0$} \\ \end{cases}} $$

For example when $n=4$ the binary strings $c$ are \begin{array}{|c|c|} \hline c & 0000 & 0001 & 0010 & 0011 & 0100 & 0101 & 0110 & 0111 \\ \hline sgn(c) & 1 & -1 & -1 & 1 & -1 & 1 & 1 & -1 \\ \hline s(c) & 10 & 8 & 6 & 4 & 4 & 2 & 0 & -2 \\ \hline \end{array} and $k$=2 so the integral is equal to $$ \frac{1}{8} \left(1/10 \sin(10x) - 1/8 \sin(8x) - 1/6 \sin(6x) +\\ 1/4 \sin(4x) - 1/4 \sin(4x) + 1/2 \sin(2x) +\\ x + 1/2 \sin(-2x)\right) = \\\boxed{\frac{1}{8} \left(1/10 \sin(10x) - 1/8 \sin(8x) - 1/6 \sin(6x) + x\right)} $$

zetko
  • 869
0

Zetko gave a very nice answer. Another way is through partitions.

Let $l(\lambda)$ denote the length of a partition $\lambda\vdash k$ of $k$. Define $$s_n(k)=\sum_{\lambda\vdash k\\\lambda\in[1,n]\\\lambda_i\neq \lambda_j}(-1)^{l(\lambda)},$$ a sum over the partitions of $k$ whose components are distinct and not exceeding $n$.

$n$ is odd: $$\frac{(-1)^{\frac{n+1}2}}{2^{n-2}}\sum_{k=0}^{\lfloor\frac{n(n+1)}4\rfloor}\frac{s_{n}(k)}{n(n+1)-4k}\\\cos\left(\frac{n(n+1)}2-2k\right)+C$$ $n$ is even: $$\frac{(-1)^{\frac n2}}{2^{n-2}}\sum_{k=0}^{\lfloor\frac{n(n+1)}4\rfloor}\frac{s_{n}(k)}{n(n+1)-4k}\\\sin\left(\frac{n(n+1)}2-2k\right)+C$$ where if $n(n+1)-4k=0,$ then that term inside the summation will be $\frac12s_n(\tfrac{n(n+1)}4)x.$

Proof follows after we write the integrand as $$\frac{(-1)^n}{2^ni^n}t^{-\frac{n(n+1)}4}\sum_{k=0}^{\frac{n(n+1)}2}s_n(k)t^k$$ where $t=e^{2ix}.$

Bob Dobbs
  • 15,712