# 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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 10, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}