# How can the following be transformed in to a sum of complete elliptic integrals of the first and second kind

I have the following, that I known from a numerical implementation of the problem by a third party should be able to be transformed in to elliptic integrals of the first and second kind however I can't find a way of achieving this can any one help.

$$A\int_{0}^{\pi}{\frac{1}{\left(\sqrt{1\pm C\cos\theta}\right)^3}d\theta} + B\int_{0}^{\pi}{\frac{cos\theta}{\left(\sqrt{1\pm C\cos\theta}\right)^3}d\theta}$$

I need to transform it to the following:

$$\alpha \int_{0}^{\frac{\pi}{2}}{\frac{1}{\sqrt{1-\frac{2C}{1+C}\sin^2\theta}}d\theta} + \beta \int_{0}^{\frac{\pi}{2}}{\sqrt{1-\frac{2C}{1+C}\sin^2\theta}d\theta}$$

I known that $$\sqrt{1+C\cos\theta} = \sqrt{1-\frac{2C}{1+C}\sin^2\frac{\theta}{2}}$$, however I can't work out how to reduce the cube term or remove the $$\cos\theta$$ from the numerator in the second integral. I also verified that the expression I have for $$C$$ is equivalent to $$\frac{2C}{1+C}$$ from the numerical solution in the code I have. However $$A$$ and $$B$$ aren't related to $$\alpha$$ and $$\beta$$ so I expect both integrals are expressed as some sum of the two elliptic integrals, and this would resolve that disparity.