Biến đổi f(x) về dạng :
\(f\left(x\right)=\frac{1}{2\left(\sin x+\frac{1}{2}\right)}=\frac{1}{2}\frac{1}{\sin x+\sin\frac{\pi}{6}}=\frac{1}{4}\frac{1}{\sin\frac{6x+\pi}{12}.\cos\frac{6x-\pi}{12}}\left(1\right)\)
Sử dụng đồng nhất thức :
\(1=\frac{\cos\frac{\pi}{6}}{\cos\frac{\pi}{6}}=\frac{\cos\left[\frac{6x+\pi}{12}-\frac{6x-\pi}{12}\right]}{\frac{\sqrt{3}}{2}}+\frac{2}{\sqrt{3}}\frac{\cos\left(\frac{6x+\pi}{12}\right).\cos\left(\frac{6x-\pi}{12}\right)+\sin\left(\frac{6x+\pi}{12}\right).\sin\left(\frac{6x-\pi}{12}\right)}{\sin\left(\frac{6x+\pi}{12}\right).\cos\left(\frac{6x-\pi}{12}\right)}\)
Ta được :
\(f\left(x\right)=\frac{2}{\sqrt{3}}\left[\int\frac{\cos\left(\frac{6x+\pi}{12}\right)}{\sin\left(\frac{6x+\pi}{12}\right)}dx-\int\frac{\sin\left(\frac{6x-\pi}{12}\right)}{\cos\left(\frac{6x-\pi}{12}\right)}\right]=\frac{2}{\sqrt{3}}\left(\ln\left|\sin\right|\left(\frac{6x+\pi}{12}\right)-\ln\left|\cos\right|\left(\frac{6x-\pi}{12}\right)\right)\)
\(=\frac{2}{\sqrt{3}}\ln\left|\frac{\sin\left(\frac{6x+\pi}{12}\right)}{\cos\left(\frac{6x-\pi}{12}\right)}\right|+C\)