Indefinite Integration

Evaluate $\displaystyle \int \dfrac{2 \sin 2 x - \cos x}{6 - \cos^2 x - 4 \sin x} \; dx$


$\begin{aligned} \text{Let } I & = \int \dfrac{2 \sin 2 x - \cos x}{6 - \cos^2 x - 4 \sin x} \; dx \\\\ & = \int \dfrac{4 \sin x \cos x - \cos x}{6 - \left(1 - \sin^2 x\right) - 4 \sin x} \; dx \;\;\; \left[\text{Note: } \sin 2 x = 2 \sin x \cos x\right] \\\\ & = \int \dfrac{\cos x \left(4 \sin x - 1\right)}{\sin^2 x - 4 \sin x + 5} \; dx \;\;\; \cdots (1) \end{aligned}$

In equation (1), let $\sin x = t$ $\;\;\; \cdots$ (2a)

Differentiating equation (2a) gives

$\cos x \; dx = dt$ $\;\;\; \cdots$ (2b)

In view of equations (2a) and (2b), equation (1) becomes

$I = \displaystyle \int \dfrac{\left(4 t - 1\right) \; dt}{t^2 - 4 t + 5}$ $\;\;\; \cdots$ (3)

In equation (3), let

$4 t - 1 = P \dfrac{d}{dt} \left(t^2 - 4 t + 5\right) + Q$

i.e. $4 t - 1 = P \left(2 t - 4\right) + Q$ $\;\;\; \cdots$ (4a)

i.e. $4 t - 1 = 2 P t - 4 P + Q$

Comparing the coefficients of t and the constant term on both sides gives

$2 P = 4$ $\implies$ $P = 2$

and $- 1 = -4 P + Q$ $\implies$ $Q = 4 P - 1 = 7$

Substituting the values of P and Q in equation (4a) gives

$4 t - 1 = 2 \left(2 t - 4\right) + 7$ $\;\;\; \cdots$ (4b)

In view of equation (4b), equation (3) becomes

$\begin{aligned} I & = \int \dfrac{2 \left(2 t - 4\right) + 7}{t^2 - 4 t + 5} \; dt \\\\ & = \int \dfrac{4 t - 8}{t^2 - 4 t + 5} \; dt + 7 \int \dfrac{dt}{t^2 - 4 t + 5} \\\\ & = I_1 + 7 I_2 \;\;\; \cdots (5) \end{aligned}$

Consider $I_1 = \displaystyle \int \dfrac{4 t - 8}{t^2 - 4 t + 5} \; dt$ $\;\;\; \cdots$ (5a)

In equation (5a), let $t^2 - 4 t + 5 = z$ $\;\;\; \cdots$ (6a)

Differentiating equation (6a) gives

$\left(2 t - 4\right) dt = dz$

$\therefore$ $\left(4 t - 8\right) dt = 2 dz$ $\;\;\; \cdots$ (6b)

In view of equations (6a) and (6b), equation (5a) becomes

$\begin{aligned} I_1 & = \int \dfrac{2 \; dz}{2} \\\\ & = 2 \; \log \left|z\right| + c_1 \\\\ & = 2 \; \log \left|t^2 - 4 t + 5\right| + c_1 \;\;\; \cdots (7a) \end{aligned}$

Consider

$\begin{aligned} I_2 & = \int \dfrac{dt}{t^2 - 4 t + 5} \;\;\; \cdots (5b) \\\\ & = \int \dfrac{dt}{\left(t^2 - 4 t + 4\right) + 5 - 4} \\\\ & = \int \dfrac{dt}{\left(t - 2\right)^2 + \left(1\right)^2} \\\\ & = \tan^{-1} \left(t - 2\right) + c_2 \;\;\; \cdots (7b) \;\;\; \left[\text{Note: } \int \dfrac{dx}{x^2 + a^2} = \dfrac{1}{a} \tan^{-1} \left(\dfrac{x}{a}\right) + c\right] \end{aligned}$

$\therefore$ $\;$ In view of equations (7a) and (7b) equation (5) becomes,

$\begin{aligned} I & = 2 \log \left|t^2 - 4 t + 5\right| + c_1 + 7 \tan^{-1} \left(t - 2\right) + c_2 \\\\ & = 2 \log \left|\sin^2 x - 4 \sin x + 5\right| + 7 \tan^{-1} \left(\sin x - 2\right) + c \;\;\; \left[\text{from equation (2a)}\right] \end{aligned}$

where $c = c_1 + c_2$