I'm trying to evaluate the integral by exponent. Could you help me with following steps?
Integral: $$\int \frac{1}{4+\sin(x)} dx$$
$$\sin x=\frac{e^{ix}-e^{-ix}}{2i}$$
$$\int \frac{1}{4+sin(x)} dx = \int \frac{1}{4+\frac{e^{ix}-e^{-ix}}{2i}} dx = \int \frac{2i}{8i+e^{ix}-e^{-ix}} dx$$
Is it possible? Or any ways exist?
Thanks in advance.
Let be $t = \tan(\frac{x}{2})$ so that $$\sin x=\frac{2t}{1+t^2},\quad\cos x=\frac{1-t^2}{1+t^2},\quad\operatorname{d}\!x=\frac{2 \operatorname{d}\!t}{1 + t^2}$$ and the integral becomes $$ \int \frac{\operatorname{d}\!t}{2t^2+t+2}=\frac{1}{2}\int \frac{\operatorname{d}\!t}{\left(t+\frac{1}{4}\right)^2+\frac{15}{16}}=8\int \frac{\operatorname{d}\!t}{\left(\frac{4t+1}{\sqrt{15}}\right)^2+1} $$ Then putting $u=\frac{4t+1}{\sqrt{15}},\,\operatorname{d}\!u=\frac{4}{\sqrt{15}}\operatorname{d}\!t$ we obtain $$ \frac{2}{\sqrt{15}}\int \frac{\operatorname{d}\!t}{u^2+1}=\frac{2}{\sqrt{15}}\arctan u+\text{constant}. $$ Finally we have $u=\frac{4t+1}{\sqrt{15}}=\frac{4\tan(\frac{x}{2})+1}{\sqrt{15}}$ and the integral is $$ \int\frac{\operatorname{d}\!x}{4+\sin x}=\frac{2}{\sqrt{15}}\arctan\left(\frac{4\tan(\frac{x}{2})+1}{\sqrt{15}}\right)+\text{constant} $$