Evaluate $\int_{0}^{2\pi} b|\sin(\theta)| \sqrt{a^2\sin^2(\theta) + b^2\cos^2(\theta)} \ d\theta$ Evaluate
$$\int_{0}^{2\pi} b|\sin(\theta)| \sqrt{a^2\sin^2(\theta) + b^2\cos^2(\theta)} \ d\theta$$
I transformed it into:
$$\int_{0}^{2\pi} b|\sin(\theta)| \sqrt{a^2(1-\cos^2(\theta)) + b^2\cos^2(\theta)} \ d\theta\\ \rightarrow \frac{b}{\sqrt{b^2-a^2}}\int_{0}^{2\pi} |\sin(\theta)| \sqrt{\frac{a^2}{b^2-a^2} + \cos^2(\theta)} \ d\theta$$
Using $u = \cos(\theta)$ I can make the substitution:
$$\frac{-b}{\sqrt{b^2-a^2}}\int_{1}^{0}  \sqrt{\frac{a^2}{b^2-a^2} + u^2} \ du$$
Now I want to use the formula for $\int \sqrt{x^2 + a^2} dx$ but that will give me an expression of $\ln(x)$ I somehow need to end up with :
$$b^2 +\frac{a^2b}{\sqrt{a^2-b^2}}\arcsin(\frac{\sqrt{a^2-b^2}}{a})$$
Does anyone see a route to get this?

Let $$F(a,b)=\int_0^{2\pi}|\sin(x)|\sqrt{a^2\sin^2(x)+b^2\cos^2(x)}\,dx.$$
Symmetry of the integrand gives
$$F(a,b)=4\int_0^{\pi/2}|\sin(x)|\sqrt{a^2\sin^2(x)+b^2\cos^2(x)}\,dx.$$
For $x\in[0,\pi/2]$, $|\sin x|=\sin x$, so the integral is
$$F(a,b)=4\int_0^{\pi/2}\sin(x)\sqrt{a^2\sin^2(x)+b^2\cos^2(x)}\,dx.$$
Then the trick is to assume $a^2>b^2$, then we have
$$F(a,b)=4\int_0^{\pi/2}\sin(x)\sqrt{a^2-(a^2-b^2)\cos^2(x)}\,dx,$$
which is
$$F(a,b)=\frac{4}{\sqrt{a^2-b^2}}\int_0^{\pi/2}\sin(x)\sqrt{q^2-\cos^2(x)}\,dx,$$
where $$q=\frac{a}{\sqrt{a^2-b^2}}.$$
Take $u=\cos x$,
$$F(a,b)=\frac{4q}{a}\int_0^1\sqrt{q^2-u^2}\,du.$$
Can you take it from here?
