TITLE: Definite integral $\int_0^{2\pi}\frac{ab}{\sqrt{b^2\cos^2(\theta)+a^2\sin^2(\theta))}}\cos^2(\theta) d\theta$
QUESTION [9 upvotes]: Could you help me finding the following definite integral, with $a$ and $b$ constants?  Thank you! $$\int_0^{2\pi}\frac{ab}{\sqrt{b^2\cos^2(\theta)+a^2\sin^2(\theta))}}\cos^2(\theta) d\theta$$

REPLY [2 votes]: Consider that:
$$I(a,b)=\int_{0}^{2\pi}\sqrt{a^2\sin^2\theta+b^2\cos^2\theta}\,d\theta = 4|b|\cdot E\left(\sqrt{1-\frac{a^2}{b^2}}\right)\tag{1}$$
where $E$ is the complete elliptic integral of the second kind, satisfying:
$$\frac{dE(k)}{dk}=\frac{E(k)-K(k)}{k},\tag{2}$$
then consider that the given integral equals:
$$ a\cdot\frac{\partial}{\partial b}I(a,b).\tag{3}$$