If $y=\frac{x}{x+2}$, prove that $x \frac{d y}{d x}=(1-y) y$
Given $y=\frac{x}{x+2}$
On differentiating y with respect to $x$, we get
$\frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}\left(\frac{\mathrm{x}}{\mathrm{x}+2}\right)$
Recall that $\left(\frac{\mathrm{u}}{\mathrm{v}}\right)^{\prime}=\frac{\mathrm{vu}^{\prime}-\mathrm{uv}^{\prime}}{\mathrm{v}^{2}}$ (quotient rule)
$\Rightarrow \frac{d y}{d x}=\frac{(x+2) \frac{d}{d x}(x)-(x) \frac{d}{d x}(x+2)}{(x+2)^{2}}$
$\Rightarrow \frac{d y}{d x}=\frac{(x+2) \frac{d}{d x}(x)-(x)\left[\frac{d}{d x}(x)+\frac{d}{d x}(2)\right]}{(x+2)^{2}}$
However, $\frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{x})=1$ and derivative of a constant is 0 .
$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{(\mathrm{x}+2) \times 1-(\mathrm{x})[1+0]}{(\mathrm{x}+2)^{2}}$
$\Rightarrow \frac{d y}{d x}=\frac{x+2-x}{(x+2)^{2}}$
$\Rightarrow \frac{d y}{d x}=\frac{2}{(x+2)^{2}}$
On multiplying both sides with $x$, we get
$x \frac{d y}{d x}=\frac{2 x}{(x+2)^{2}}$
$\Rightarrow x \frac{d y}{d x}=\frac{2}{x+2} \times \frac{x}{x+2}$
$\Rightarrow x \frac{d y}{d x}=\frac{x+2-x}{x+2} \times \frac{x}{x+2}$
$\Rightarrow x \frac{d y}{d x}=\left(1-\frac{x}{x+2}\right) \times \frac{x}{x+2}$
But, $y=\frac{x}{x+2}$
$\Rightarrow \mathrm{x} \frac{\mathrm{dy}}{\mathrm{dx}}=(1-\mathrm{y}) \times \mathrm{y}$
$\therefore \mathrm{x} \frac{\mathrm{dy}}{\mathrm{dx}}=(1-\mathrm{y}) \mathrm{y}$
Thus, $x \frac{d y}{d x}=(1-y) y$