$$\int\frac{\cos(x)}{6+2\sin(x)-\cos^2(x)}\space\text{d}x=$$
Utilice $\cos^2(x)=1-\sin^2(x)$ :
$$\int\frac{\cos(x)}{5+2\sin(x)+\sin^2(x)}\space\text{d}x=$$
Sustituir $u=\sin(x)$ y $\text{d}u=\cos(x)\space\text{d}x$ :
$$\int\frac{1}{u^2+2u+5}\space\text{d}u=$$ $$\int\frac{1}{(u+1)^2+4}\space\text{d}u=$$
Sustituir $s=u+1$ y $\text{d}s=\text{d}u$ :
$$\int\frac{1}{s^2+4}\space\text{d}s=$$ $$\int\frac{1}{4\left(\frac{s^2}{4}+1\right)}\space\text{d}s=$$ $$\frac{1}{4}\int\frac{1}{\frac{s^2}{4}+1}\space\text{d}s=$$
Sustituir $p=\frac{s}{2}$ y $\text{d}p=\frac{1}{2}\space\text{d}s$ :
$$\frac{1}{2}\int\frac{1}{p^2+1}\space\text{d}p=$$ $$\frac{\arctan\left(p\right)}{2}+\text{C}=$$ $$\frac{\arctan\left(\frac{s}{2}\right)}{2}+\text{C}=$$ $$\frac{\arctan\left(\frac{u+1}{2}\right)}{2}+\text{C}=$$ $$\frac{\arctan\left(\frac{\sin(x)+1}{2}\right)}{2}+\text{C}$$