Elegant solution for $\int {\frac{\cos(y)}{\sin^2(y)+\sin(y)-6}}dy$ I have the following integral: $\int {\frac{\cos(y)}{\sin^2(y)+\sin(y)-6}}dy$
I already know the solution, but it needs three substitutions. Is there a simpler, more elegant way to go about this?
 A: I don't think that it can be written more elegantly than:
$$
\int \frac{d(\sin \, y)}{(\sin \, y + 3)(\sin \, y - 2)}
$$
A: HINT:
Make the substitution, $\sin x=u$
Now $u^2+u-6=(u+3)(u-2)$ and use $(u+3)-(u-2)=5$
A: $u=\sin y$ reduces the integrand to
$$\int \frac{du}{(u-2)(u+3)} = \int \frac{du}{5(u-2)}-\int\frac{du}{5(u+3)}
   = \frac{1}{5} \ln \left|\frac{\sin x-2}{\sin x+3} \right|+c
$$
A: $$\int { \frac { \cos { \left( x \right)  } dx }{ \sin ^{ 2 }{ \left( x \right)  } +\sin { \left( x \right)  } -6 }  } =\int { \frac { d\sin { \left( x \right)  }  }{ \left( \sin { \left( x \right) +3 }  \right) \left( \sin { \left( x \right) -2 }  
\right)  }  } $$
Let $t=\sin { \left( x \right)  } $ then
$$\frac { 1 }{ \left( t+3 \right) \left( t-2 \right)  } =\frac { A }{ t+3 } +\frac { B }{ t-2 } $$
$$1=A\left( t-2 \right) +B\left( t+3 \right) \\ 1=\left( A+B \right) t-2A+3B\\ \begin{cases} A+B=0 \\ -2A+3B=1 \end{cases}\Rightarrow \begin{cases} A=-B \\ 2B+3B=1 \end{cases}\Rightarrow B=\frac { 1 }{ 5 } ,A=-\frac { 1 }{ 5 } $$ so 
$\frac { 1 }{ \left( t+3 \right) \left( t-2 \right)  } =\frac { 1 }{ 5 } \left( \frac { 1 }{ t-2 } -\frac { 1 }{ t+3 }  \right) $
$$\\ \\ \\ \frac { 1 }{ 5 } \int { \left( \frac { 1 }{ t-2 } -\frac { 1 }{ t+3 }  \right) dt=\frac { 1 }{ 5 } \int { \frac { dt }{ t-2 }  } -\frac { 1 }{ 5 } \int { \frac { dt }{ t+3 } = }  } $$ $$=\frac { 1 }{ 5 } \int { \frac { d\left( t-2 \right)  }{ t-2 }  } -\frac { 1 }{ 5 } \int { \frac { d\left( t+3 \right)  }{ t+3 } =\frac { 1 }{ 5 } \left[ \ln { \left| t-2 \right|  } -\ln { \left| t+3 \right|  }  \right] =\frac { 1 }{ 5 } \ln { \left| \frac { t-2 }{ t+3 }  \right| +C }  }  $$
Hence $t=\sin { \left( x \right)  } $,$$\int { \frac { \cos { \left( x \right)  } dx }{ \sin ^{ 2 }{ \left( x \right)  } +\sin { \left( x \right)  } -6 }  } =\frac { 1 }{ 5 } \ln { \left| \frac { \sin { \left( x \right) -2 }  }{ \sin { \left( x \right) +3 }  }  \right|  } +C$$
A: $$\int {\frac{\cos(y)}{\sin^2(y)+\sin(y)-6}}dy=$$

(Substitute $u=\sin(y)$ and $du=\cos(y)dy$):

$$\int\frac{1}{u^2+u-6}du=$$
$$\int\frac{1}{\left(u+\frac{1}{2}\right)^2-\frac{25}{4}}du=$$

(Substitute $s=u+\frac{1}{2}$ and $ds=du$):

$$\int\frac{1}{s^2-\frac{25}{4}}ds=$$
$$\int-\frac{4}{25(1-\frac{4s^2}{25})}ds=$$
$$-\frac{4}{25}\int\frac{1}{1-\frac{4s^2}{25}}ds=$$

(Substitute $p=\frac{2s}{5}$ and $dp=\frac{2}{5}ds$):

$$-\frac{2}{5}\int\frac{1}{1-p^2}dp=$$
$$-\frac{2}{5}\tanh^{-1}\left(p\right)+C=$$
$$-\frac{2}{5}\tanh^{-1}\left(\frac{2s}{5}\right)+C=$$
$$-\frac{2}{5}\tanh^{-1}\left(\frac{2\left(u+\frac{1}{2}\right)}{5}\right)+C=$$
$$-\frac{2}{5}\tanh^{-1}\left(\frac{2\left(\sin(y)+\frac{1}{2}\right)}{5}\right)+C=$$
$$-\frac{2}{5}\tanh^{-1}\left(\frac{2\sin(y)+1}{5}\right)+C$$
