7

Is there an easy way to evaluate the integral $\int_0^\pi \cos(x) \cos(2x) \cos(3x) \cos(4x)\, dx$?

I know that I can plugin the $e$-function and use the linearity of the integral. However this would lead to 16 summands which I really dont want to calculate separately.

5 Answers5

15

Because I like it, I will add a tricky approach ($C$ denotes the unit circle):

$$ I=\frac{1}{2}\int_{-\pi}^{\pi}dx\prod_{n=1}^4\cos(nx)\underbrace{=}_{z=e^{ix}}\frac{1}{32i}\oint_C\frac{1}{z^{11}}\prod_{n=1}^4(z^{2n}+1). $$

Now, since $\oint_Cz^{n}=0$ for $n\in \mathbb{Z}$ and $n\neq-1$, only the terms of the product with total power of $10$ will contribute. There are exactly two of them $2+8=4+6=10$, so

$$ I=\frac{1}{32i}\oint_C\frac{2}{z}=\frac{\pi}8 $$

where the last equality results from the residue theorem.


Fiddling around with generalizations of this result and consulting OEIS I stumbled over this interesting set of slides: http://www.dorinandrica.ro/files/presentation-INTEGERS-2013.pdf So integrals of this kind have a deep connection to problems in number theory which is pretty awesome

Leucippus
  • 26,329
tired
  • 12,325
12

HINT: We have the following identities

$\cos(A+ B) = \cos A \cos B - \sin A \sin B$ and

$\cos(A-B) = \cos A \cos B + \sin A \sin B$

$2\cos A \cos B = \cos(A+B) + \cos (A-B)$

$\cos A \cos B = \dfrac{\cos(A+B) + \cos(A-B)}{2}$

Take $\cos x$ and $\cos 4x$ together and $\cos 2x$ and $\cos 3x$ together.

Then $\cos(x) \cos(2x) \cos(3x) \cos(4x) =\\ \frac18[1 + \cos(10x) + \cos(8x)+ \cos(6x)+2\cos(4x)+2\cos(2x)+\cos(x) ]$.

Now you can do with your usual integration formula.

User8976
  • 12,637
  • 9
  • 42
  • 107
2

Using Werner's formula with $a\ge b>0$ so that $a\pm b$ are integers

$$\int_0^\pi\cos ax\cos bx\ dx=\dfrac12\int_0^\pi\{\cos(a+b)x+\cos(a-b)x\} dx=\cdots=\begin{cases}0&\mbox{if } a\ne b\\ \dfrac\pi2 & \mbox{if } a=b\end{cases}$$

Now, $(2\cos x\cos4x)(2\cos2x\cos3x)=(\cos3x+\cos5x)(\cos x+\cos5x)$

$=\cos3x\cos x+\cos x\cos5x+\cos3x\cos5x+\cos5x\cdot\cos5x$

So, $\displaystyle4\int_0^\pi\cos x\cos2x\cos3x\cos4x\ dx=\dfrac\pi2$ for $a=b=5$

1

There is a well-known identity which says

$$\cos A + \cos B = 2\cos\left(\frac{A-B}{2}\right)\cos\left(\frac{A+B}{2}\right)$$

If we put $\frac{A-B}{2} = x$ and $\frac{A+B}{2}=2x$ then we get $A=3x$ and $B=x$, so $$ \cos x \cos 2x \equiv \frac{1}{2}(\cos x+\cos 3x) $$

We can repeat this for $\cos 3x$ and $\cos 4x$. Solving $\frac{A-B}{2} = 3x$ and $\frac{A+B}{2}=4x$ gives $$\cos 3x \cos 4x \equiv \frac{1}{2}(\cos x + \cos 7x)$$ Putting this together gives $$\cos x \cos 2x \cos 3x \cos 4x \equiv \frac{1}{4}(\cos x+\cos 3x)(\cos x+\cos 7x)$$

Now, you need to expand these brackets and follow the same procedure to simplify $\cos x \cos x$, $\cos x \cos 7x$, $\cos 3x \cos x$ and $\cos 3x \cos 7x$.

Fly by Night
  • 32,272
1

Let $$I=\int_0^\pi \cos(x) \cos(2x) \cos(3x) \cos(4x)\, dx,$$ since $\cos(x+\pi) \cos(2x+2\pi) \cos(3x+3\pi) \cos(4x+4\pi)=\cos(x) \cos(2x) \cos(3x) \cos(4x)$, $$I=\int_{-\frac\pi2}^\frac\pi2 \cos(x) \cos(2x) \cos(3x) \cos(4x)\, dx =2\int_0^\frac\pi2 \cos(x) \cos(2x) \cos(3x) \cos(4x)\, dx.$$ Make change $x\to\frac\pi2-x$, we get $$I=2\int_0^\frac\pi2 \sin(x) \cos(2x) \sin(3x) \cos(4x)\, dx.$$ So $$2I=2\int_0^\frac\pi2[\cos(x) \cos(2x) \cos(3x) \cos(4x)+\sin(x) \cos(2x) \sin(3x) \cos(4x)]\, dx$$ $$=2\int_0^\frac\pi2\cos^2(2x)\cos(4x)\, dx =\int_0^\frac\pi2[1+\cos(4x)]\cos(4x)\, dx$$ $$=\int_0^\frac\pi2\cos^2(4x)\, dx =\int_0^\frac\pi2\frac{1+\cos(8x)}{2}\, dx =\frac{\pi}{4}.$$ Hence $$I=\frac\pi8.$$

Riemann
  • 7,203