The question given is to calculate $$\int \frac{\cos(x) + \sqrt 3}{1+ 4 \sin(x+\frac{\pi}{3}) + 4\sin^2(x+\frac{\pi}{3})}{\rm d}x$$
My attempt
I managed to figure out that the denominator is given out as a perfect square of $$\{1+2\sin(x + \frac{\pi}{3})\}$$ and broke the $\sin(x+\frac{\pi}{3})$ so it looks like
$$\int \frac{\cos(x) + \sqrt 3}{(1+ \sin(x) +\sqrt 3 \cos(x))^2}{\rm d}x$$
I can't figure out how to approach further. Please guide me through this question.
Let $t=x-\frac\pi6$ to get
\begin{align} & I= \int \frac{\cos x+ \sqrt 3}{1+ 4 \sin(x+\frac{\pi}{3}) + 4\sin^2(x+\frac{\pi}{3})}{d}x =\int \frac{\frac{\sqrt3}2(2+\cos t)-\frac12\sin t }{(1+ 2 \cos t)^2}{d}t \end{align} Note that $\left( \frac{\sin t}{1+2\cos t}\right)’ = \frac{2+\cos t}{(1+2\cos t)^2}$ and $\left( \frac1{1+2\cos t}\right)’ = \frac{2\sin t}{(1+2\cos t)^2}$. Then $$I = \frac{\sqrt3}2 \frac{\sin t}{1+2\cos t}- \frac14\frac{1}{1+2\cos t} = \frac{2\sqrt3\sin t-1}{4(2\cos t+1)}+C $$