<s>[INST] How to take an integral using half angle trigonometric substitution. So i have this question which is asking to take the integral using a predefined trigonometric substitution which is $$u=\tan\frac{x}{2}$$
and the integral equation is $$\int\frac{\sin x\ dx}{(6\cos x-2)(3-2\sin x)}$$ How would i go on about this problem? Because to begin with i do not know how i would even use the given substitution method. Any help is appreciated thank you.
 [/INST] This substitution is used for integrals involving only trigonometric expressions. This method is very useful as it transforms the trigonometric integral into just rational integral. You should know how to write $\sin x, \cos x, \tan x$ in terms of $\tan \frac{x}{2}$
(try proving)
$\sin x=\dfrac{2\tan \frac{x}{2}}{1+\tan^2 \frac{x}{2}}$
$\cos x=\dfrac{1-\tan^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}$
$\tan x=\dfrac{2\tan \frac{x}{2}}{1-\tan^2 \frac{x}{2}}$
To find $dx$ in terms of $du$, differentiate both sides.
$u = \tan \dfrac{x}{2}$
$du = \sec^2 \dfrac{x}{2} \dfrac{1}{2} dx = (1+\tan^2 \dfrac{x}{2})\dfrac{1}{2} dx=(1+u^2)\dfrac{1}{2}dx \Rightarrow dx=\dfrac{2}{1+u^2}du$
For this example, The integral is converted to,
$$\int\dfrac{\sin x}{(6cosx-2)(3-2sinx)}dx=\int\dfrac{\dfrac{2u}{1+u^2}}{(6\dfrac{1-u^2}{1+u^2}-2 )(3-2\dfrac{2u}{1+u^2})}\dfrac{2}{1+u^2}du$$
$$=\int\dfrac{4u}{(1+u^2)(6-6u^2-2-2u^2)(3+3u^2-4u)}du$$
$$=\int\dfrac{-4u}{(1+u^2)(8u^2-4)(3u^2-4u+3)}du$$
$$=\int\dfrac{3u^2-4u+3-(3u^2+3)}{(1+u^2)(8u^2-4)(3u^2-4u+3)}du$$
$$=\int\dfrac{du}{(1+u^2)(8u^2-4)}-\int\dfrac{3\ du}{(8u^2-4)(3u^2-4u+3)}$$
and integrate using partial fractions and substitute again $u=\tan \dfrac{x}{2}$.
Look how nicely the trigonometric integral(which made no sense) is transformed to a rational integral(which can be solved at least by brute force).
Try more examples.
(
You will get to realize that some problems looks like can be solved using half angle substitutions but really can be solved without substitution. Example
$$\int\dfrac{\sin x}{(\cos x -2)(2\cos x +3)}dx$$ 
)
</s>