Integral of $\cos(3x) \cos(4x) \cos(5x)$ The integral $$\int_0^{\pi/8}\cos(3x)\cos(4x)\cos(5x) \,dx$$ is equal to $k/24$. Find the constant $k$.  
So far, I assume that the best way to solve this question is to solve the integral and compare the answer to find $k$.
I have thought about rewriting the integral by using the identity 
$\cos(2x) = \cos^2(x) - \sin^2(x)$ or $\cos(2x) = 1 - 2\sin^2(x)$,
but that results in a very long and confusing function. 
I don't see any possible substitutions.
Please help!
 A: Hint
$$\cos 5x\cdot\cos 3x\cdot\cos 4x
\\=\cos 5x\cdot\frac{(\cos 7x+\cos x)}{2}
\\=\frac{\cos 5x\cdot\cos 7x+\cos 5x\cdot\cos x}{2}
\\=\frac{\cos 13x+\cos 2x+\cos 6x+\cos 4x}{4}$$
A: Adding together the following trig identities:
$$\cos(A+ B) = \cos A \cos B - \sin A \sin B$$
$$\cos(A-B) = \cos A \cos B + \sin A \sin B$$
gives
$$2\cos A \cos B = \cos(A+B) + \cos (A-B)$$
and hence
$$\cos A \cos B = \dfrac{\cos(A+B) + \cos(A-B)}{2}$$
You can apply this identity to reduce your integral to a sum of cosines, which can be easily integrated.
A: HINT 
Use the formula for $\cos(5x+3x)$ and $\cos(5x-3x)$ to show that
$$\cos 5x \cos 3x \equiv \tfrac{1}{2}(\cos 8x + \cos 2x)$$
Substitute this into $\cos 5x \cos 3x \cos 4x$, expand and then apply the same trick to the expansion.
A: Using 
\begin{align}
\cos(x) \cos(y) &= \frac{1}{2} \, (\cos(x+y) + \cos(x-y) ) \\
\sin\left(\frac{\pi}{4} \right) &= \sin\left(\frac{3 \pi}{4}\right) = \frac{1}{\sqrt{2}} \\
\sin\left(\frac{3 \pi}{2}\right) &= - \sin\left(\frac{\pi}{2}\right) = -1
\end{align}
then
\begin{align}
\cos(3 x) \cos(4 x) \cos(5 x) &= \frac{1}{2} \, (\cos(2 x) \cos(4 x) + \cos(4 x) \cos(8 x) ) \\
&= \frac{1}{4} \, (\cos(2 x) + \cos(4 x) + \cos(6 x) + \cos(12 x)).
\end{align}
The integral in question becomes:
\begin{align}
I &= \int_{0}^{\pi/8} \cos(3 x) \cos(4 x) \cos(5 x) \, dx \\
&= \frac{1}{4} \, \int_{0}^{\pi/8} (\cos(2 x) + \cos(4 x) + \cos(6 x) + \cos(12 x)) \, dx \\
&= \frac{1}{48} \, [ 6 \, \sin(2 x) + 3 \sin(4 x) + 2 \sin(6 x) + \sin(12 x) ]_{0}^{\pi/8} \\
&= \frac{1}{48} \, \left( 6 \sin\left(\frac{\pi}{4} \right) + 3 \sin\left(\frac{\pi}{2} \right) + 2 \sin\left(\frac{3 \pi}{4} \right) + \sin\left(\frac{3 \pi}{2} \right) \right) \\
&= \frac{1}{24} \, \left( 1 + \frac{4}{\sqrt{2}} \right) \\
&= \frac{1 + 2 \sqrt{2}}{24}. 
\end{align} 
