# Find the Fourier series for $\sin^8x+\cos^8x$

Find the Fourier series for $$f$$: $$f(x)=\sin^8x+\cos^8x$$

I tried to linearize $$f(x)$$ using the following formulas: $$\sin x=\frac{e^{ix}-e^{-ix}}{2i},\ \ \cos x=\frac{e^{ix}+e^{-ix}}{2}$$ And I got: $$f(x)=\frac{1}{256}\left((e^{ix}-e^{-ix})^8+(e^{ix}+e^{-ix})^8\right)$$ And now I'm stuck trying to calculate $$a_0, a_n, b_n$$: $$a_0=\frac{1}{2\pi}\int\limits_{-\pi}^\pi f(x)dx,\ \ a_n=\frac{1}{\pi}\int\limits_{-\pi}^\pi f(x)\cos nxdx,\ \ b_n=\frac{1}{\pi}\int\limits_{-\pi}^\pi f(x)\sin nxdx$$ So, I thought that there must be a better solution to this problem. Could someone tell me what I should do?

Once you write $$f$$ as a finite sum $$\sum e^{ijx} a_j$$ there is nothing more to be done since this sum is the (complex form of) Fourier series. The coefficents $$a_j$$ are already there when you expand you powers $$(e^{ix}+e^{-ix})^{8}$$ and $$(e^{ix}-e^{-ix})^{8}$$. To get the real form of the Fourier series just write $$e^{ijx} =\cos (jx)+i\sin (jx)$$ and $$e^{-ijx} =\cos (jx)-i\sin (jx)$$. There is no need to evaluate any integrals.

I think I got it: \begin{aligned} &f(x)=\frac{1}{256}(2e^{8ix}+56e^{6ix-2ix}+140e^{4ix-4ix}+56e^{2ix-6ix}+2e^{-8ix})=\\ &=\frac{1}{128}(2\cos 8x+56\cos 4x+70)\\ &=\frac{35}{64}+\frac{7}{16}\cos4x+\frac{1}{64}\cos 8x \end{aligned} Thank you, everyone!

HInt:

$$(\cos^4x)^2+(\sin^4x)^2$$ $$=(\cos^4x-\sin^4x)^2+2\cos^4x\sin^4x$$

$$=(\cos2x)^2+\frac{(2\sin x\cos x)^4}8$$

$$=\dfrac{1+\cos4x}2+\dfrac{\sin^42x}8$$

Now $$\sin^42x=\dfrac{(2\sin^22x)^2}4=\dfrac{(1-\cos4x)^2}4=\dfrac{1-2\cos4x+\cos^24x}4$$

Finally $$\cos^24x=\dfrac{1+\cos8x}2$$