Differentiate $\log \left(1+x^{2}\right)$ with respect to $\tan ^{-1} x$.
Let $u=\log \left(1+x^{2}\right)$ and $v=\tan ^{-1} x$
We need to differentiate $u$ with respect to $v$ that is find $\frac{\text { du }}{\text { dv }}$.
On differentiating $u$ with respect to $x$, we get
$\frac{\mathrm{du}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}\left[\log \left(1+\mathrm{x}^{2}\right)\right]$
We know $\frac{\mathrm{d}}{\mathrm{dx}}(\log \mathrm{x})=\frac{1}{\mathrm{x}}$
$\Rightarrow \frac{d u}{d x}=\frac{1}{1+x^{2}} \frac{d}{d x}\left(1+x^{2}\right)$ [using chain rule]
$\Rightarrow \frac{\mathrm{du}}{\mathrm{dx}}=\frac{1}{1+\mathrm{x}^{2}}\left[\frac{\mathrm{d}}{\mathrm{dx}}(1)+\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{2}\right)\right]$
However, $\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{\mathrm{n}}\right)=\mathrm{nx}^{\mathrm{n}-1}$ and derivative of a constant is 0 .
$\Rightarrow \frac{d u}{d x}=\frac{1}{1+x^{2}}\left[0+2 x^{2-1}\right]$
$\Rightarrow \frac{d u}{d x}=\frac{1}{1+x^{2}}[2 x]$
$\therefore \frac{d u}{d x}=\frac{2 x}{1+x^{2}}$
Now, on differentiating $\vee$ with respect to $x$, we get
$\frac{d v}{d x}=\frac{d}{d x}\left(\tan ^{-1} x\right)$
We know $\frac{\mathrm{d}}{\mathrm{dx}}\left(\tan ^{-1} \mathrm{x}\right)=\frac{1}{1+\mathrm{x}^{2}}$
$\therefore \frac{\mathrm{dv}}{\mathrm{dx}}=\frac{1}{1+\mathrm{x}^{2}}$
We have $\frac{\mathrm{du}}{\mathrm{dv}}=\frac{\frac{\mathrm{du}}{\mathrm{dv}}}{\frac{\mathrm{dx}}{\mathrm{dx}}}$
$\Rightarrow \frac{\mathrm{du}}{\mathrm{dv}}=\frac{\frac{2 \mathrm{x}}{1+\mathrm{x}^{2}}}{\frac{1}{1+\mathrm{x}^{2}}}$
$\Rightarrow \frac{\mathrm{du}}{\mathrm{dv}}=\frac{2 \mathrm{x}}{1+\mathrm{x}^{2}} \times\left(1+\mathrm{x}^{2}\right)$
$\therefore \frac{\mathrm{du}}{\mathrm{dv}}=2 \mathrm{x}$
Thus, $\frac{d u}{d v}=2 x$