(-2*ArcTanh[((a - b)*Tan[x/2])/ Sqrt[-a^2 + b^2]])/Sqrt[-a^2 + b^2]