How to calculate $\int \frac{\sin x}{\tan x+\cos x} \, dx$ How to calculate $$\int \frac{\sin x}{\tan x+\cos x} \, dx\text{ ?}$$ I got to $$\int \frac{-u}{u^2-u-1} \, du$$ while $u=\sin x$ but can I continue from here? 

By replacing $\sin x$ with $u$ we have:
$$I=\int\frac{\sin x}{\tan x+\cos x}\,dx = \int \frac{\sin x\cos x}{1+\sin x-\sin^2 x}\,dx = \int \frac{u}{1+u-u^2}\,du\tag{1}$$
but the roots of $1+u-u^2$ occur at $u=\frac{1\pm\sqrt{5}}{2}$, so that:
$$ \frac{u}{1+u-u^2} = \frac{-\frac{5+\sqrt{5}}{10}}{u-\left(\frac{1+\sqrt{5}}{2}\right)}+\frac{-\frac{5-\sqrt{5}}{10}}{u-\left(\frac{1-\sqrt{5}}{2}\right)}\tag{2}$$
and:
$$ I = -\frac{1}{10}\left((5+\sqrt{5})\log(1+\sqrt{5}-2u)+(5-\sqrt{5})\log(-1+\sqrt{5}-2u)\right).\tag{3}$$
