# Trigonometric functions

I wonder how does a WolframAlpha get this relation where input is a LHS and output is RHS:

$$\cos^2(x)\cos(2x) = \tfrac{1}{4}\cos(4x) + \tfrac{1}{2}\cos(2x) + \tfrac{1}{4}$$

-
Are you asking how to prove that equality? –  Git Gud Aug 2 '13 at 16:50
Express $\cos^2(x)$ in terms of $\cos(2x), \sin(2x)$ and then use product-to-sum. –  Scaramouche Aug 2 '13 at 16:52
Yes. I need to know how to get RHS out of LHS. I tried to use the double angle trigonometric identity and it only got more complicated... –  71GA Aug 2 '13 at 16:53
How Alpha gets it is an interesting question. I don't know, but it is likely not the way a human should approach it. –  André Nicolas Aug 2 '13 at 17:02

\begin{align*} \cos^2(x)\cos(2x) &= \frac{1}{2}(1+\cos(2x))\cos(2x)\\ &= \frac{1}{2}\cos(2x) +\frac{1}{2}\cos^2(2x) \\ &= \frac{1}{2}\cos(2x) + \frac{1}{4} + \frac{1}{4}\cos(4x) \end{align*} by two applications of the double angle formula.

-

Hint

$$cos^2x=\frac{1+cos(2x)}{2}$$ $$cos^2(2x)=?$$

-