Fractional Trigonometric Integrands

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

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

  3. $$∫\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?

Solutions Collecting From Web of "Fractional Trigonometric Integrands"

I did not treat this question like a homework question, since it is not tagged homework.

What are the relations between the numerator in [and] the denominator

Both are linear functions of $\sin x,\cos x$

what is the general pattern to solve these type of questions?

The universal standard substitution to evaluate an integral of a rational fraction in $\sin x,\cos x$, i.e. a rational fraction of the form

$$R(\sin x,\cos x)=\frac{P(\sin x,\cos x)}{Q(\sin x,\cos x)},$$

where $P,Q$ are polynomials in $\sin x,\cos x$ is a trigonometric substitution known as the Weierstrass substitution

$$\tan \frac{x}{2}=t,\qquad x=2\arctan t.\tag{*}$$

Differentiating both sides of $(^*)$ w.r.t. $t$, we get

$$\frac{dx}{dt}=\frac{2}{1+t^2},\qquad dx=\frac{2}{1+t^2}dt.$$

Since we know$^1$ from trigonometry that $$\cos x =\frac{1-\tan ^{2}\frac{x }{2}}{1+\tan ^{2}\frac{
x}{2}}=\frac{1-t^2}{1+t^2},\qquad \sin x =\frac{2\tan \frac{x }{2}}{1+\tan ^{2}
\frac{x }{2}}=\frac{2t}{1+t^2},$$

we see that in general, the integrand becomes a rational fraction in $t$, whose standard integration technique is the partial fractions decomposition:

$$\int R(\sin x,\cos x)\, dx=\int R\Big(\frac{2t}{1+t^2},\frac{1-t^2}{1+t^2} \Big)\frac{2}{1+t^2}\, dt.$$

For instance this substitution in the 2nd. integral yields
\int \frac{a\sin x+b\cos x}{c\sin x+d\cos x}dx &=&\int \dfrac{a\dfrac{2t}{
1+t^{2}}}\dfrac{2}{1+t^{2}}dt \\
&=&2\int \frac{bt^{2}-2at-b}{\left( dt^{2}-2ct-d\right) \left(
1+t^{2}\right) }dt.

$^1$ A possible proof is the following one, which uses the double-angle formulas and the identity $\cos ^{2}\frac{x}{2}+\sin ^{2}\frac{x}{2}=1$:

\cos x &=&\cos ^{2}\frac{x}{2}-\sin ^{2}\frac{x}{2}=\frac{\frac{\cos ^{2}
\frac{x}{2}-\sin ^{2}\frac{x}{2}}{\cos ^{2}\frac{x}{2}}}{\frac{\cos ^{2}
\frac{x}{2}+\sin ^{2}\frac{x}{2}}{\cos ^{2}\frac{x}{2}}}=\frac{1-\tan ^{2}
\frac{x}{2}}{1+\tan ^{2}\frac{x}{2}}, \\
&& \\
\sin x &=&2\sin \frac{x}{2}\cos \frac{x}{2}=\frac{\frac{2\sin \frac{x}{2}
\cos \frac{x}{2}}{\cos ^{2}\frac{x}{2}}}{\frac{\cos ^{2}\frac{x}{2}+\sin ^{2}%
\frac{x}{2}}{\cos ^{2}\frac{x}{2}}}=\frac{2\tan \frac{x}{2}}{1+\tan ^{2}

Write $$a\sin x+b\cos x+c=A \frac{(d\sin x+e cos x+f)}{dx}+B(d\sin x+e cos x+f)+C$$ where $A,B,C$ are arbitrary constant whose values can be determined by comparing the coefficients $\sin x,\cos x$ and constants

Now, for $$\int \frac{dx}{d\sin x+e\cos x+f}$$ use Weierstrass substitution.

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. $$
$$ 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. $$
$$\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.