Help solving the integral: $\int_{-\varphi_\beta}^{2\pi-\varphi_\beta}\sqrt{2-b\cos x}\,dx \\ $

147 Views Asked by At

I am trying to calculate a definite integral of:

$$\int_{-\varphi_\beta}^{2\pi-\varphi_\beta}\sqrt{2-b\cos x}\,dx,\quad 0\leq b\leq 1.$$

To be more precise I am trying to find a double definite integral of: $$\int_0^{2\pi}\int_0^{2\pi}\sqrt{2-2\sqrt{p_\alpha(1-p_\alpha)}\cos (\varphi_\alpha-\varphi_\beta)}\,d\varphi_\alpha\,d\varphi_\beta,\quad 0\leq p\leq 1.$$

But I guess one needs to begin with the first form anyway :(

Thank you all for your helpful comments.

And I apologize everyone for the mistake that I made in my original question. Since my ultimate goal is to calculate the double definite integral above, the limits of the first integral are not from $ 0 $ to $ 2\pi $ but from $ -\varphi_\beta $ to $ 2\pi-\varphi_\beta $. So the first integral in question has a form $ \int_{-\varphi_\beta}^{2\pi-\varphi_\beta}\sqrt{2-b\cos x}\,dx,\quad 0\leq b\leq 1. $ I may not take an advantage of the symmetry then.

3

There are 3 best solutions below

1
On

Wolfram Dev Platform yields, from the command Integrate[Sqrt[2-b Cos[x]],{x,0,2 Pi}], the result $$\operatorname{ConditionalExpression}\left[2\left(\sqrt{2-b}\,\operatorname{EllipticE}\left[\frac{2b}{b-2}\right]+\sqrt{2+b}\,\operatorname{EllipticE}\left[\frac{2b}{2+b}\right]\right),-2<\operatorname{Re}[b]<2\right]. $$ The EllipticE function is defined by $$\operatorname{EllipticE}[x]=\int_0^{\pi/2}\sqrt{1-x \sin^2(\theta)}\,d\theta.$$ While this doesn't help you much, it does show that you're not likely to get a closed-form expression in terms of elementary antiderivatives.

Also, as an aside: MATLAB is terrific for numerics, but don't expect its symbolic toolbox ever to match Mathematica/Wolfram Language.

2
On

You may consider that $$ \int_{0}^{2\pi}\sqrt{2-b\cos x}\,dx = 2\int_{0}^{\pi}\sqrt{2-b\cos x}\,dx = 4\sqrt{2+b}\int_{0}^{\pi/2}\sqrt{1-\frac{2b}{2+b}\cos^2 x}\,dx.\tag{1}$$ Since $$ \sqrt{1-z}=\sum_{n\geq 0}\frac{\binom{2n}{n}}{(1-2n)4^n} z^n \tag{2} $$ for any $z\in(-1,1)$, and $$ \int_{0}^{\pi/2}\cos^{2n}(x)\,dx=\frac{\pi}{2}\cdot\frac{\binom{2n}{n}}{4^n} \tag{3} $$ for any $n\in\mathbb{N}$, the original integral can be written as $$ 2\pi\sqrt{2+b}\,\sum_{n\geq 0}\frac{\binom{2n}{n}^2}{(1-2n)16^n}\left(\frac{2b}{2+b}\right)^n = 4\sqrt{2+b}\,E\left(\frac{2b}{2+b}\right)\approx 2\pi \sqrt{2}-\frac{\pi b^2}{16 \sqrt{2}}\tag{4} $$ where $E$ is the complete elliptic integral of the second kind (related to the perimeter of the ellipse) and the argument of $E$ is the elliptic modulus as in Mathematica's notation. In the section of my notes about elliptic integrals you may find some interesting algebraic approximations, not including Ramanujan's one. $E(x)$ can be computed through numerical algorithms with quadratic convergence (like Newton's method) and it has a very nice Fourier-Legendre expansion: $$E(x)=\sum_{n\geq 0}\frac{4 P_n(2x-1)}{(1-2n)(2n+1)(2n+3)}\tag{5} $$ but it is not considered an elementary function, at least usually.

5
On

Starting from the answers, you can have quite good approximations using Padé approximants.

For the same degree in numerator and denominator, here are some $$\frac{2 \sqrt{2} \pi -\frac{19 \pi }{64 \sqrt{2}} b^2 } {1-\frac{15 }{256} b^2 } $$ $$\frac{2 \sqrt{2} \pi -\frac{633 \pi }{832 \sqrt{2}} b^2+\frac{4799 \pi }{212992 \sqrt{2}}b^4 } {1-\frac{581 }{3328}b^2+\frac{3255 }{851968}b^4 }$$

These are equivalent to Taylor expansions $O(b^6)$ and $O(b^{10})$

Update

If we consider $$I=\int_{-a}^{2\pi-a}\sqrt{2-b\cos x}\,dx $$ a CAS provides $$I=2 \sqrt{2-b} \left(E\left(\frac{a}{2}|\frac{2 b}{b-2}\right)+E\left(\frac{2 \pi -a}{2} |\frac{2 b}{b-2}\right)\right)$$ but $$\frac{\partial I}{\partial a}=0$$ taking us back to the original question where $a=0$.