Investigating this $\int_{0}^{a}\frac{(9-4\cos x)\cos x\cos(x/2)}{\sqrt{1+\sin(x/2)}}\mathrm dx$ Investigating this type of integral
$$\int_{0}^{a}\frac{(9-4\cos x)\cos x\cos(x/2)}{\sqrt{1+\sin(x/2)}}\mathrm dx=H(a)$$
I got the following results for:
$H(\pi)=2\sqrt{2}$, 
$H(\pi/2)=2\sqrt{3}$, 
$H(\pi/3)=2\sqrt{5}$ and 
$H(2\pi/3)=\sqrt{21}$
expanded to... but I can't see it given me a better way of working it out.
$$\int_{0}^{a}\frac{9\cos x\cos^2(x/4)-9\cos x\sin^2(x/4)-4\cos^2 x\cos^2(x/4)+4\cos^2 x\sin^2(x/4)}{\sqrt{1+\sin(x/2)}}dx$$
My question is: What is the general formula for $H(a)?$

Substitute $u=1+\sin(x/2)$ and then due to the fact that $\cos(x)=1-2(u-1)^2$ the integral breaks up into integrals of powers:
$$H(x)=2\int\frac{(9-4(1-2(u-1)^2))(1-2(u-1)^2)}{\sqrt{u}}du=-2\int({13\over\sqrt{u}} + 68 \sqrt{u} - 98 u^{3/2} + 64 u^{5/2} - 16 u^{7/2})du$$
which can easily be integrated for the result:
$$H(x)=-52 \sqrt{u} + 272 \frac{u^{3/2}}{3} - 392 \frac{u^{5/2}}{5} + 256 \frac{u^{7/2}}{7} - 
 64 \frac{u^{9/2}}{9}\Bigg|_{u=1+\sin(\frac{x}{2})}$$
and for the definite integral defined above 
$$H(a)=-52 \sqrt{1+\sin(\frac{x}{2})} + 272 \frac{(1+\sin(\frac{x}{2}))^{3/2}}{3} - 392 \frac{(1+\sin(\frac{x}{2}))^{5/2}}{5} + 256 \frac{(1+\sin(\frac{x}{2}))^{7/2}}{7} - 
 64 \frac{(1+\sin(\frac{x}{2}))^{9/2}}{9}+\frac{3236}{315}$$
