Answer
$$ - \frac{1}{3}\ln \left| {\frac{{\cos \theta - 1}}{{\cos \theta + 2}}} \right| + C$$
Work Step by Step
$$\eqalign{
& \int {\frac{{\sin \theta d\theta }}{{{{\cos }^2}\theta + \cos \theta - 2}}} \cr
& {\text{Let }}x = \cos \theta ,\,\,\,dx = - \sin \theta d\theta \cr
& {\text{Use the substitution}} \cr
& - \int {\frac{{\sin \theta d\theta }}{{{{\cos }^2}\theta + \cos \theta - 2}}} = - \int {\frac{{dx}}{{{x^2} + x - 2}}} \cr
& \cr
& {\text{Decompose the integrand into partial fractions.}} \cr
& {\text{The form of the partial fraction decomposition is}} \cr
& - \frac{1}{{{x^2} + x - 2}} = - \frac{1}{{\left( {x + 2} \right)\left( {x - 1} \right)}} \cr
& - \frac{1}{{\left( {x + 2} \right)\left( {x - 1} \right)}} = - \frac{A}{{x + 2}} + \frac{B}{{x - 1}} \cr
& {\text{Multiplying by }}\left( {x + 2} \right)\left( {x - 1} \right){\text{, we have}} \cr
& 1 = A\left( {x - 1} \right) + B\left( {x + 2} \right) \cr
& \cr
& {\text{if we set }}x = - 2 \cr
& - 1 = - A\left( { - 2 - 1} \right) - B\left( 0 \right) \cr
& A = \frac{1}{3} \cr
& \cr
& {\text{if we set }}x = 1 \cr
& - 1 = - A\left( 0 \right) - B\left( {1 + 2} \right) \cr
& B = - \frac{1}{3} \cr
& \cr
& {\text{The decomposition of the integrand is}} \cr
& \frac{1}{{\left( {x + 2} \right)\left( {x - 1} \right)}} = \frac{{1/3}}{{x + 2}} - \frac{{1/3}}{{x - 1}} \cr
& \cr
& \int {\frac{{dx}}{{{x^2} + x - 2}}} = \frac{1}{3}\int {\frac{1}{{x + 2}}dx - \frac{1}{3}\int {\frac{1}{{x - 1}}} dx} \cr
& {\text{Integrating}} \cr
& \int {\frac{{dx}}{{{x^2} + x - 2}}} = \frac{1}{3}\ln \left| {x + 2} \right| - \frac{1}{3}\ln \left| {x - 1} \right| + C \cr
& \int {\frac{{dx}}{{{x^2} + x - 2}}} = - \frac{1}{3}\ln \left| {\frac{{x - 1}}{{x + 2}}} \right| + C \cr
& \cr
& {\text{We know that }}x = \cos \theta ,\,\,\, then \cr
& = - \frac{1}{3}\ln \left| {\frac{{\cos \theta - 1}}{{\cos \theta + 2}}} \right| + C \cr} $$