<s>[INST] How to integrate $\int \frac{\cos(x) + \sqrt 3}{1+ 4 \sin(x+\frac{\pi}{3}) + 4\sin^2(x+\frac{\pi}{3})}{\rm d}x$ 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.
 [/INST] Hint
Let $y=\dfrac{a\cos x+b\sin x +c}{1+\sin x+\sqrt3\cos x}$
Find $\dfrac{dy}{dx}$
Compare
$-(a\cos x+b\sin x+c)(\cos x-\sqrt3\sin x)+(1+\sin x+\sqrt3\cos x)(-a\sin x+b\cos x)$
with $\cos x+\sqrt3$
to find $a,b,c$
For example, by comparing the coefficient of $\cos x\sin x$ we get $b=\sqrt3a$
By $\sin x,a=-\sqrt3c$
So we reach at the expression below with $c$ as constant multiple
$$(-\sqrt3\cos x+3\sin x+1)(\cos x-\sqrt3\sin x)+(1+\sin x+\sqrt3\cos x)(\sqrt3\cos x+3\sin x)$$
Can you take it from here?
</s>