Question:
Evaluate the following integrals:
$\int \frac{1-\cot x}{1+\cot x} d x$
Solution:
Convert $\cot x$ in form of $\sin x$ and $\cos x$.
$\Rightarrow \cot x=\frac{\cos x}{\sin x}$
$\therefore$ The equation now becomes
$\Rightarrow \int \frac{1-\frac{\cos x}{\sin x}}{1+\frac{\cos x}{\sin x}} d x$
$\Rightarrow \int \frac{\frac{\cos x-\sin x}{\sin x}}{\frac{\cos x+\sin x}{\sin x}} d x$
$\Rightarrow \int \frac{\cos x-\sin x}{\cos x+\sin x} d x$
Assume $\cos x+\sin x=t$
$\therefore \mathrm{d}(\cos x+\sin x)=\mathrm{dt}$
$=\cos x-\sin x$
$\therefore \mathrm{dt}=\cos x-\sin x$
$\Rightarrow \int \frac{\mathrm{dt}}{\mathrm{t}}$
$=\ln |t|+c$
But $t=\cos x+\sin x$
$\therefore \ln |\cos x+\sin x|+c$