<s>[INST] Fractional Trigonometric Integrands 
*

*$$∫\frac{a\sin x+b\cos x+c}{d\sin x+e\cos x+f}dx$$

*$$∫\frac{a\sin x+b\cos x}{c\sin x+d\cos x}dx$$

*$$∫\frac{dx}{a\sin x+\cos x}$$
What are the relations between the numerator in the denominator, and what is the general pattern to solve these type of questions?
 [/INST] You can use the following way to calculate all of them once. Let
$$ A=\int \frac{\sin xdx}{d\sin x+e\cos x+f}, B=\int \frac{\cos xdx}{d\sin x+e\cos x+f}, C=\int \frac{dx}{d\sin x+e\cos x+f}. $$
It is easy to check
$$ dA+eB+fC=1, dB-eB=\ln|d\sin x+e\cos x+f|+Const. $$
So
$$ A=\frac{d(1-fC)}{d^2+e^2}-\frac{e\ln|d\sin x+e\cos x|}{d^2+e^2}+Const, B=\frac{e(1-fC)}{d^2+e^2}+\frac{f\ln|d\sin x+e\cos x|}{d^2+e^2}+Const.$$
Thus we only need to get $C$. Let
$$\tan \frac{x}{2}=t,x=2\arctan t. $$
Then
$$\sin x=\frac{2t}{1+t^2},\cos x=\frac{1-t^2}{1+t^2},dx=\frac{2}{1+t^2}dt.$$
Then we have
$$ C=\int \frac{dx}{d\sin x+e\cos x+f}=2\int\frac{dt}{(f-e)t^2+2dt+(f+e)}$$
which is not hard to get.
</s>