I am trying to find the primitive function of $\displaystyle\int_{}^{}\frac{dx}{5+2\sin x-\cos x}$. I've got $$\int_{}^{}\frac{dx}{5+2\sin x-\cos x}=\frac{\textrm{arctan}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt{5}}\right)}{\sqrt{5}}$$ However the plot of this function isn't continuous - exactly these points $\pi+2k\pi$ make the problem. It means that this primitive function doesn't exist on whole $\mathbb{R}$, but just on some small interval. So what I have to do in this case? And how the whole primitive function looks like?
Thank you