# Evaluation or approximation of a modified elliptic integral of the first kind

In my research, I have come across an integral of the following form:

$$$$\int_0^{\pi/2} \frac{\cos\left(a \arcsin\left[kx\right]\right)dx}{\sqrt{1-k^2\sin ^2x}}.$$$$

I would like to evaluate this integral or obtain an approximation for its value. Mathematica is not able to evaluate the integral and searching a table of integrals was not helpful either. The integral is similar to the complete elliptic integral of the first kind, but numeric evaluation shows its value can differ dramatically from that of the complete elliptic integral of the first kind.

Thank you!

Given the definite integral:

$$I(a,\,b) := \int_0^{\frac{\pi}{2}} \frac{\cos\left(a\,\arcsin\left(b\,x\right)\right)}{\sqrt{1 - \left(b\,\sin x\right)^2}}\,\text{d}x$$

through a substitution of the type $$t = \frac{4}{\pi}\,x - 1$$ we go back to this other integral:

$$I(a,\,b) = \int_{-1}^1 \underbrace{\frac{\cos\left(a\,\arcsin\left(b\,\frac{\pi}{4}\,(t + 1)\right)\right)}{\sqrt{1 - \left(b\,\sin \left(\frac{\pi}{4}\,(t + 1)\right)\right)^2}}\,\frac{\pi}{4}}_{:= f(a,\,b,\,t)}\text{d}t$$

to which it's possible to apply the Legendre-Gauss quadrature.

In particular, opting for the two-point formula:

$$I(a,\,b) \approx k_1\,f(a,\,b,\,t_1) + k_2\,f(a,\,b,\,t_2)$$

where is it:

$$\begin{cases} k_1\,t_1^0 + k_2\,t_2^0 = \frac{1 + (-1)^0}{1 + 0} \\ k_1\,t_1^1 + k_2\,t_2^1 = \frac{1 + (-1)^1}{1 + 1} \\ k_1\,t_1^2 + k_2\,t_2^2 = \frac{1 + (-1)^2}{1 + 2} \\ k_1\,t_1^3 + k_2\,t_2^3 = \frac{1 + (-1)^3}{1 + 3} \end{cases} \; \; \; \Leftrightarrow \; \; \; \begin{cases} k_{1,2} = 1 \\ t_{1,2} = \pm \frac{1}{\sqrt{3}} \end{cases}$$

it follows that:

$$I(a,\,b) \approx f\left(a,\,b,\,-\frac{1}{\sqrt{3}}\right) + f\left(a,\,b,\,\frac{1}{\sqrt{3}}\right),$$

approximation that involves at most an error equal to:

$$\epsilon(a,\,b) = \frac{1}{135}\underset{-1 \le t \le 1}{\max} \left|\frac{\partial^4 f(a,\,b,\,t)}{\partial t^4}\right|.$$

As an example:

$$I\left(3,\,\frac{1}{10}\right) \approx f\left(3,\,\frac{1}{10},\,-\frac{1}{\sqrt{3}}\right) + f\left(3,\,\frac{1}{10},\,\frac{1}{\sqrt{3}}\right) = 1.51672$$

with a maximum error equal to:

$$\epsilon\left(3,\,\frac{1}{10}\right) = \frac{1}{135}\underset{-1 \le t \le 1}{\max} \left|\frac{\partial^4 f\left(3,\,\frac{1}{10},\,t\right)}{\partial t^4}\right| = 1.08341\cdot 10^{-4}\,.$$

If you are not requiring too much accuracy, you could develop the integrand as a Taylor series around $$x=0$$ which gives $$\frac{\cos\left(a \arcsin\left[kx\right]\right)}{\sqrt{1-k^2\sin ^2x}}=1-\frac{\left(a^2-1\right) k^2}{2} x^2+\frac{k^2 \left(\left(a^4-10 a^2+9\right) k^2-4\right)}{24} x^4+O\left(x^6\right)$$ and integrate termwise.

For the case $$a=3$$ and $$k=\frac 1 {10}$$ used by TeM, this will give for the definite integral $$\frac{\pi }{2}-\frac{\pi ^3}{600}-\frac{\pi ^5}{96000}\approx 1.51593$$ while numerical integration would give $$1.51674$$.

Adding the next term in the expansion (nasty coefficient), you need to add $$\frac{7 \pi ^7}{23040000}$$ to the previous result which then becomes $$\approx 1.51685$$