Indefinite Integration

Evaluate $\displaystyle\int \dfrac{\sin x}{\sin 3x} \; dx$


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

Now, $\sin x = \dfrac{\sin x / \cos x}{1 / \cos x} = \dfrac{\tan x}{\sec x}$ and $\cos x = \dfrac{1}{\sec x}$

$\begin{aligned} \therefore \; 3 \sin x \cos^2 x - \sin^3 x & = 3 \times \dfrac{\tan x}{\sec x} \times \dfrac{1}{\sec^2 x} - \dfrac{\tan^3 x}{\sec^3 x} \\\\ & = \dfrac{\tan x \left(3 - \tan^2 x\right)}{\sec^3 x} \end{aligned}$

$\begin{aligned} \therefore \; I & = \int \dfrac{\tan x / \sec x}{\tan x \left(3 - \tan^2 x\right) / \sec^3 x} \; dx \\\\ & = \int \dfrac{\sec^2 x}{3 - \tan^2 x} \; dx \end{aligned}$

Let $\tan x = p$

Then, $\sec^2 x \; dx = dp$

$\begin{aligned} \therefore \; I & = \int \dfrac{dp}{3 - p^2} \\\\ & = \int \dfrac{dp}{\left(\sqrt{3}\right)^2 - \left(p\right)^2} \\\\ & = \dfrac{1}{2 \sqrt{3}} \log \left|\dfrac{\sqrt{3} + p}{\sqrt{3} - p}\right| + c \;\;\; \left[\text{Note: } \int \dfrac{dx}{a^2 - x^2} = \dfrac{1}{2a} \log \left|\dfrac{x + a}{x - a}\right| \right] \\\\ & = \dfrac{1}{2 \sqrt{3}} \log \left|\dfrac{\sqrt{3} + \tan x}{\sqrt{3} - \tan x}\right| + c \end{aligned}$