# How to remove/understand the complex number present in the following expressions?

I was working on an essay and in the process of my calculation, I came across the following expression which equals time(I cut out a portion of the expression for the sake of simplification) $$\frac{\sqrt{\frac{a\, \cos(\gamma + \theta) - 1}{a - 1}}\, \mathrm{ellipticF}(\frac{\gamma}{2} + \frac{\theta}{2},\frac{2\, a}{a - 1})}{\sqrt{1 - a\, \cos\!\left(\gamma +\theta\right)}}$$ where ellipticF is the elliptic integral of the first kind. This, I thought, can be simplified to $$\sqrt{\dfrac{1}{1-a}}\mathrm{ellipticF}(\dfrac{\gamma}{2} + \dfrac{\theta}{2}, \dfrac{2 a}{a-1})$$ Yet the problem was that a is always greater than 1 as a is defined as $$a = \dfrac{\sqrt{x^2 + y^2}}{x}$$ where x and y are positive. If this is the case, I think the entire terms above will evaluate to a complex number. I am aware that elliptic integrals can have imaginary and real portions to it yet the only situation where the complex portion dissapears will be if(I think) $\dfrac{\gamma + \theta}{2}$ is imaginary and $\dfrac{2a}{a-1}$ is equivalent to zero which will never be the case in this situation. Hence, my question is, is there a way to interpret this result so that this discrepency dissapears? Or am I just making a caluculation error?

## The whole expression

$$\sqrt{\frac{2C_0}{C_1}}(\, \frac{\sqrt{\frac{C_3\, \cos(\gamma + \theta) - 1}{C_3 - 1}}\, \mathrm{ellipticF}(\frac{\gamma}{2} + \frac{\theta}{2},\frac{2\, C_3}{C_3 - 1})}{\sqrt{1 - C_3\, \cos\!\left(\gamma +\theta\right)}} - \frac{\sqrt{\frac{C_3\, \cos(\gamma) - 1}{C_3 - 1}}\, \mathrm{ellipticF}(\frac{\gamma}{2},\frac{2\, C_3}{C_3 - 1})}{\sqrt{1 - C_3\, \cos(\gamma)}})$$

where $C_0, C_1, C_2, C_3, \gamma$ are constants while $\theta$ varies. $C_3$ is defined as $C_3 = \dfrac{\sqrt{C_1^2 + C_2^2}}{C_1}$