I am solving some spherical symmetry surface charge stuff. A problem gave me a surface charge of $$\sigma(\theta)=k\cos(3\theta).$$ I was having trouble using this to find the constants of my PDE, so I looked at the solutions... apparently $$ \cos(3\theta)=4\cos^3(\theta) - 3\cos(\theta)?? $$ Well I did not know that. Why is this true?
For an epilogue, the solution continues: $$ 4\cos^3(\theta) - 3\cos(\theta)=\alpha P_3(\cos(\theta)) + \beta P_1(\cos(\theta)). $$ ..algebra.. $$ \sigma(\theta)=\frac{k}{5}[8P_3(\cos \theta) -3P_1(\cos\theta)]. $$ I am both amazed and terrified at what took place on this page. Never have I seen the $\cos\theta$ go into the legendre polynomial like that. Anyways, I will accept that, but
One way to show it is by using Euler's formula: $e^{i\theta}=\cos(\theta)+i\sin(\theta)$. Then $$\cos(3\theta)+i\sin(3\theta)=e^{i3\theta}=(\cos(\theta)+i\sin(\theta))^3.$$ By expanding the cube on the right, and by taking the real part of both sides we get $$\cos(3\theta)=\cos(\theta)^3-3\cos(\theta)\sin^2(\theta)=\cos(\theta)^3-3\cos(\theta)(1-\cos^2(\theta))\\=4\cos^3(\theta) - 3\cos(\theta).$$