(a) By expanding $(z+z^{-1})^4$, show that $$\cos^4\theta=\frac18(\cos4\theta+4\cos2\theta+3).$$ [4]
(b) By expanding $(z-z^{-1})^4$, derive a corresponding expression for $\sin^4\theta$. [4]
(c) Hence evaluate exactly $$\int_0^{\pi/8}(\cos^4\theta+\sin^4\theta)\,\mathrm d\theta.$$ [3]