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