Question:
Differentiate the following functions with respect to $\mathrm{x}$ :
$\tan ^{2} x$
Solution:
Let $y=\tan ^{2} x$
On differentiating $y$ with respect to $x$, we get
$\frac{d y}{d x}=\frac{d}{d x}\left(\tan ^{2} x\right)$
We know $\frac{d}{d x}\left(x^{n}\right)=n x^{n-1}$
$\Rightarrow \frac{d y}{d x}=2 \tan ^{2-1} x \frac{d}{d x}(\tan x)$ [using chain rule]
$\Rightarrow \frac{d y}{d x}=2 \tan x \frac{d}{d x}(\tan x)$
However, $\frac{d}{d x}(\tan x)=\sec ^{2} x$
$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=2 \tan \mathrm{x}\left(\sec ^{2} \mathrm{x}\right)$
$\therefore \frac{d y}{d x}=2 \tan x \sec ^{2} x$
Thus, $\frac{d}{d x}\left(\tan ^{2} x\right)=2 \tan x \sec ^{2} x$