explain solution RD Sharma class 12 chapter Differentiation exercise 10.4 question 24 maths

$\left(x^{2}+1\right) \frac{d y}{d x}+x y+1=0$

Hint:

Use product rule and chain rule

Given:

$y \sqrt{x^{2}+1}=\log \left(\sqrt{x^{2}+1}-x\right)$

Solution:

$y \sqrt{x^{2}+1}=\log \left(\sqrt{x^{2}+1}-x\right)$

Differentiate  w.r.t x

$\frac{d}{d x}\left(y \sqrt{x^{2}+1}\right)=\frac{d}{d x}\left(\log \left(\sqrt{x^{2}+1}-x\right)\right)$

$y \frac{d}{d x}\left(\sqrt{x^{2}+1}\right)+\left(\sqrt{x^{2}+1}\right) \frac{d y}{d x}=\frac{d\left(\log \left(\sqrt{x^{2}+1}-x\right)\right)}{d\left(\sqrt{x^{2}+1}-x\right)} \times \frac{d\left(\sqrt{x^{2}+1}-x\right)}{d x}$

[Use product rule and chain rule]

$\Rightarrow y \cdot\left[\frac{d\left(\sqrt{x^{2}+1}\right)}{d\left(x^{2}+1\right)} \times \frac{d\left(x^{2}+1\right)}{d x}\right]+\sqrt{x^{2}+1} \frac{d y}{d x}=\frac{1}{\left(\sqrt{x^{2}+1}-x\right)} \times\left(\frac{\left(\sqrt{x^{2}+1}\right)}{d x}-\frac{d x}{d x}\right)$

$y \cdot \frac{1}{2 \sqrt{x^{2}+1}} \cdot 2 x+\sqrt{x^{2}+1} \frac{d y}{d x}=\frac{1}{\left(\sqrt{x^{2}+1}-x\right)} \times\left[\frac{d \sqrt{x^{2}+1}}{d\left(x^{2}+1\right)} \times \frac{d\left(x^{2}+1\right)}{d x}-1\right]$

$\frac{x y}{\sqrt{x^{2}+1}}+\sqrt{x^{2}+1} \frac{d y}{d x}=\frac{1}{\left(\sqrt{x^{2}+1}-x\right)} \cdot\left[\frac{1}{2 \sqrt{x^{2}+1}} \times 2 x-1\right]$

$\frac{x y}{\sqrt{x^{2}+1}}+\sqrt{x^{2}+1} \cdot \frac{d y}{d x}=\frac{1}{\left(\sqrt{x^{2}+1}-x\right)} \cdot\left[\frac{x-\sqrt{x^{2}+1}}{\sqrt{x^{2}+1}}\right]$

$\frac{x y}{\sqrt{x^{2}+1}}+\sqrt{x^{2}+1} \cdot \frac{d y}{d x}=-\frac{1}{\sqrt{x^{2}+1}}$

$\sqrt{x^{2}+1} \cdot \frac{d y}{d x}=\frac{-1}{\sqrt{x^{2}+1}}-\frac{x y}{\sqrt{x^{2}+1}}$

$\sqrt{x^{2}+1} \cdot \frac{d y}{d x}=\frac{-1-x y}{\sqrt{x^{2}+1}}$

$\left(x^{2}+1\right) \frac{d y}{d x}=-(1+x y)$

$\left(x^{2}+1\right) \frac{d y}{d x}+1+x y=0$

Thus, proved