I am trying to evaluate the following integral. Any help will be highly appreciated.
$$\int_{\pi/2}^{3\pi/2}\frac{1}{\pi\sqrt{1+d\cos(\gamma)}}d\gamma=?$$ where $d$ is any constant.
My solution
If I consider a Triangle with hypotenuse $d$ with base = $a$ and perpendicular = $b$. I get $a=d\cos(\gamma), b=d\sin(\gamma)$, and $b^2 = d^2-a^2$
$$I = \int_0^d\frac{1}{b\sqrt{1+a}}da = \int_0^d\frac{1}{(d^2-a^2)\sqrt{1+a}}da$$
Now using partial fraction technique, I get
$$1 = A(d+a)(a+1) + B(d-1)(a+1) + C(d-1)(a+d)$$ where $A = \frac{1}{2d(d+1)}, B=\frac{1}{2d(1-d)}, C=\frac{1}{d^2-1}$,
so $$I = \int^d_0 \frac{1}{2d(1+d)(d-a)} + \frac{1}{2d(1-d)(d-a)} + \frac{1}{(d^2-1)(1+a)} da$$
$$I = \lim_{a\to d}\frac{-\ln(d-a)}{2d(1+d)} + \frac{\ln(2d)}{2d(1-d)} - \frac{\ln(1+d)}{1-d^2} -\frac{1}{1-d^2}$$
Note that $\lim_{a\to d}\frac{-\ln(d-a)}{2d(1+d)} = -\infty$. which should not be right.
How can I solve this?
Hint
Note that
$$ \int\frac{\mathrm{d}x}{{\pi}\sqrt{1+d\cos\left(x\right)}}\,=\int\frac{\mathrm{d}x}{{\pi}\sqrt{d+1}\sqrt{1-\frac{2d\sin^2\left(\frac{x}{2}\right)}{d+1}}}.$$
Make now $u=\dfrac{x}{2}$ and then use the incomplete elliptic integral of the first kind.