I use tangent half-angle substitution to calculate this indefinite integral: $$ \int \frac{1}{2+\sin x}\,dx = \frac{2}{\sqrt{3}}\tan^{-1}\frac{2\tan \frac{x}{2}+1}{\sqrt{3}}+\text{constant}. $$
Wolfram Alpha also give the same answer. However, $\frac{2}{\sqrt{3}}\tan^{-1}\frac{2\tan \frac{x}{2}+1}{\sqrt{3}}$ is discontinuous on $(n+1)\pi$ where $n$ is any integer. Why is an anti-derivative of a continuous function discontinuous?