A slight mistake... you missed something here:-
View attachment 19062
I managed to show that:-
[math] \frac{2}{1+t^2+a \left(1-t^2\right)} = \frac{1+\cos\left(x\right)}{1+a\cdot \cos\left(x\right)} [/math]
But I can't immediately see how to integrate the LHS of the above equation
EDIT: I should probably give you a hint about how to show the equivalence above. Rewrite tan^2(x/2) as (1-cos(x))/(1+cos(x))