<s>[INST] Evaluate the indefinite integral $\int \frac{\cos \theta}{ \sqrt{2 - 9 \sin^2 \!\theta}} \mathrm{d}\theta$ I want to evaluate $$\int \dfrac{\cos \theta \, \mathrm{d}\theta}{ \sqrt{2 - 9 \sin^2 \theta}}$$
but I can't seem to get the answer, my working is as below:

 [/INST] Hint
$$\int\dfrac{\cos{\theta}}{\sqrt{2-9\sin^2{\theta}}}d\theta=\int\dfrac{d\sin{\theta}}{\sqrt{2-9\sin^2{\theta}}}$$
and
$$\int\dfrac{1}{\sqrt{2-9t^2}}dt=\dfrac{1}{\sqrt{2}}\cdot\int\dfrac{1}{\sqrt{1-\left(\frac{3}{\sqrt{2}}t\right)^2}}dt=\dfrac{1}{3}\cdot\int\dfrac{1}{\sqrt{1-\left(\frac{3}{\sqrt{2}}t\right)^2}}d\left(\dfrac{3}{\sqrt{2}}t\right)$$
</s>