Answer: (i) \(\cos^6\theta = \frac{1}{32}(10+15\cos 2\theta+6\cos 4\theta+\cos 6\theta)\), so \(p=10\), \(q=15\), \(r=6\), \(s=1\).
(ii) \(\displaystyle \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \cos^6\!\left(\frac{x}{2}\right)\,dx = \frac{1}{16}\left(5\pi+\frac{44}{3}\right) = \frac{15\pi+44}{48}.\)
(i) Let \(z=\cos\theta+i\sin\theta\). Then \(z+z^{-1}=2\cos\theta\), so
\(\left(z+z^{-1}\right)^6=(2\cos\theta)^6=64\cos^6\theta.\)
Now expand using the binomial theorem:
\(\left(z+z^{-1}\right)^6=z^6+6z^4z^{-1}+15z^2z^{-2}+20+15z^{-2}+6z^{-4}+z^{-6}.\)
Grouping terms gives
\(\left(z+z^{-1}\right)^6=(z^6+z^{-6})+6(z^4+z^{-4})+15(z^2+z^{-2})+20.\)
Using \(z^n+z^{-n}=2\cos n\theta\), we obtain
\(64\cos^6\theta=2\cos 6\theta+12\cos 4\theta+30\cos 2\theta+20.\)
Dividing by \(64\),
\(\cos^6\theta=\frac{1}{32}(10+15\cos 2\theta+6\cos 4\theta+\cos 6\theta).\)
So \(p=10, q=15, r=6, s=1\).
(ii) Substitute \(\theta=\frac{x}{2}\) into the result from part (i):
\(\cos^6\!\left(\frac{x}{2}\right)=\frac{1}{32}\left(10+15\cos x+6\cos 2x+\cos 3x\right).\)
Hence
\(\displaystyle \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \cos^6\!\left(\frac{x}{2}\right)\,dx = \frac{1}{32}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \left(10+15\cos x+6\cos 2x+\cos 3x\right)\,dx.\)
Integrating term by term:
\(\displaystyle =\frac{1}{32}\left[10x+15\sin x+3\sin 2x+\frac{1}{3}\sin 3x\right]_{-\frac{\pi}{2}}^{\frac{\pi}{2}}.\)
Now evaluate at the limits. At \(x=\frac{\pi}{2}\),
\(10x+15\sin x+3\sin 2x+\frac{1}{3}\sin 3x = 5\pi+15+0-\frac{1}{3}.\)
At \(x=-\frac{\pi}{2}\),
\(10x+15\sin x+3\sin 2x+\frac{1}{3}\sin 3x = -5\pi-15+0+\frac{1}{3}.\)
Therefore
\(\displaystyle \frac{1}{32}\left[(5\pi+15-\frac{1}{3})-(-5\pi-15+\frac{1}{3})\right] = \frac{1}{16}\left(5\pi+\frac{44}{3}\right).\)
So the exact value is \(\displaystyle \frac{15\pi+44}{48}\).