3

I wanted to integrate $\int \cos x\cos 2x\cdots \cos nx \, dx$.
What I know is that $ \cos x\cos 2x\cdots \cos nx=\dfrac{1}{2^{n-1}}\sum_\pm \cos((n\pm(n-1)\pm\cdots\pm2\pm1)x)$ where the sum is over all $2^{n-1}$ possible $\pm$.
But quite obviously this is hard to integrate.
From this, I came to know about Werner's formula which I think quite less complicated to solve the above problem. But I don't know how to put this formula for an arbitrary $n$ for the given problem.

Thanks for helping me in advance.

Manjoy Das
  • 1,006
  • 7
  • 21
  • Well, it's not hard to integrate that, but it's non-trivial to take care of all the summands contributing to it. It's still harder to understand why anybody would want to do that. –  Dec 30 '20 at 19:04
  • Are you interested in the antiderivative or a definite integral? – user Dec 30 '20 at 19:49
  • @user it should be the antiderivative. if i can find the antiderivative, then finding definite integral would be just a matter of time, just imposing the upper and lower limits or using the even function rule. – Manjoy Das Dec 30 '20 at 19:53
  • I don't quite understand your remark about "this is hard to integrate". Of course to integrate a sum of cosines is very simple. It is even not hard to write down all $2^{n-1}$ alternatng sums (for small $n$). The only meaningful question would be to ask for a closed form expression for multiplicities of the sum values. – user Dec 30 '20 at 21:22
  • I asked a similar question here: https://math.stackexchange.com/questions/2872469/proof-of-int-0-pi-cosnx-cosnxdx-frac-pi2n where the binomial expansion was used on the complex representation of $\cos(x)$ and that worked quite well – Henry Lee Dec 30 '20 at 22:46
  • 1
    I think the only close form obtainable is : $$ \int\frac{1}{2^{n-1}}\sum_{k=0}^{\frac{n(n-1)}{2}}N_{n-1}(k)\cos\left(\left(\frac{n(n+1)}{2}-2k\right)\right);\text{d}x$$ Where $N_{n}(k)$ denotes the number of ways we can write $k$ as $k=\sum_{i=1}^{m}x_{i}$ Unless you wish to compute integral for easy $\pi$ intervals. See this link https://ysharificalc.wordpress.com/2018/02/24/integral-of-cosxcos2x-cosnx/ – B E I R U T Dec 30 '20 at 22:54
  • I honestly think you should elevate this question to math overflow if you wish to find the anti-derivative instead of integrating it to some boundaries. – B E I R U T Dec 30 '20 at 23:07
  • @GAUSS1860 I went through that site before posting this question here. But that was not the answer what I was looking for. – Manjoy Das Dec 31 '20 at 22:07
  • @user integrating cosine is not so hard. But what i meant was that integrating that summand of cosine isn't providing a closed form of the integral. Moreover there are so many combinations of plus-minus present in the formula of the cosine products. Also you never know the value of $n$. So if integration of that integrand is possible, please help me out. – Manjoy Das Dec 31 '20 at 22:23
  • 1
    This is wrong. Look at the closed form expression in the above comment of @GAUSS1860. It remains only to calculate the well-defined integer coefficients $N (k) $. – user Jan 01 '21 at 06:01

1 Answers1

1

Your question is: $$I_n=\int\prod_{k=1}^n\cos(kx)dx$$ we could try and use the fact that: $$\cos(kx)=\frac{e^{ikx}+e^{-ikx}}{2}=\frac{e^{-ikx}}{2}\left(e^{2ikx}+1\right)$$ and then say: $$\prod_{k=1}^n \cos(kx)=\left(\prod_{k=1}^n\frac{e^{-ikx}}{2}\right)\left(\prod_{k=1}^n(e^{2ix})^k+1\right)$$ this first part is quite easy to do: $$\prod_{k=1}^n\frac{e^{-ikx}}{2}=2^{-n}\exp\left(-ix\sum_{k=1}^nk\right)=2^{-n}e^{-\frac{in(n+1)}{2}x}$$ now the tough part is calculating: $$\prod_{k=1}^n(e^{2ix})^k+1$$ and then obviously integrating whatever the result is

Henry Lee
  • 12,215