I would need to compute the following integral:
$$ \int_0^{2\pi} \sqrt{\cos^2(x)+a}\ dx$$
with $a$ real and positive.
Is there any closed analytical expression for this integral?
Thank you very much for your attention.
Best Regards.
I would need to compute the following integral:
$$ \int_0^{2\pi} \sqrt{\cos^2(x)+a}\ dx$$
with $a$ real and positive.
Is there any closed analytical expression for this integral?
Thank you very much for your attention.
Best Regards.
The complete elliptic integral of the second kind $E(k)$ is given by
$$E(k) = \int_0^{\pi/2}{\sqrt{1-k^2\sin^2(\theta)}\ d\theta}$$
meaning your integral can be written in terms of $E(k)$. We have for $a\ge 0$
$$\int_0^{2\pi} \sqrt{a+\cos^2(\theta)}\ d\theta = 4\int_0^{\pi/2}{\sqrt{a+1-\sin^2(\theta)}\ d\theta}$$
$$= 4\sqrt{a+1}\int_0^{\pi/2}{\sqrt{1-(1/\sqrt{a+1})^2\sin^2(\theta)}\ d\theta} = 4\sqrt{a+1}\cdot E(1/\sqrt{a+1})$$
While there aren't any closed-form expressions for elliptic integrals, you can derive infinite series which can then be truncated to get an approximation. A series expansion for $E(k)$ can be achieved as follows -
$$\int_0^{\pi/2}{\sqrt{1-k^2\sin^2(\theta)}\ d\theta}\ = \int_0^{\pi/2}{\sum_{n=0}^{\infty}{\binom{1/2}n\left(-k^2\sin^2(\theta)\right)^n}\ d\theta}$$
$$= \sum_{n=0}^{\infty}{\binom{1/2}n(-1)^nk^{2n}\int_0^{\pi/2}{\sin^{2n}(\theta)\ d\theta}}\ = \sum_{n=0}^{\infty}{\binom{1/2}n(-1)^nk^{2n}\left(\frac{\pi}{2}\cdot\frac{1}{2}\cdot\frac{3}{4}\dots\frac{2n-1}{2n}\right)}$$
$$= \frac{\pi}{2}\sum_{n=0}^{\infty}{\binom{1/2}n\left(\frac{(2n)!}{4^n(n!)^2}\right)(-1)^nk^{2n}}$$
This means your integral now equals
$$2\pi\sqrt{a+1}\sum_{n=0}^{\infty}{\binom{1/2}n\left(\frac{(2n)!}{4^n(n!)^2}\right)\frac{(-1)^n}{(a+1)^n}}$$
$$= 2\pi\sqrt{a+1}\left(1-\frac{1}{4(a+1)}-\frac{3}{64(a+1)^2}-\frac{5}{256(a+1)^3}-\frac{175}{16384(a+1)^4}-\dots\right)$$
You could use this series to compute the integral, with larger values of $a$ obviously improving its convergence rate. But this is just one way to compute $E(k)$. Elliptic integrals get their name because of their connection to elliptic curves. In this case, $E(k)$ can be written in terms of the arc length of an ellipse for which there are many well-known approximations. The relation is
$$E(k) = \frac{1}{4}S(1, \sqrt{1-k^2}),$$
where $S(a, b)$ is the perimeter of an ellipse with semi-major and minor axis $a$ and $b$ respectively. If you want a big list of approximations for $S(a, b)$, I recommend having a look through this paper. Just substitute $1$ for $a$ and $\sqrt{1-k^2}$ for $b$ with $k = 1/\sqrt{a+1}$, and use the previous relations to get an approximation for your integral.