Differentiate
$\left(\frac{\sin x-x \cos x}{x \sin x+\cos x}\right)$
To find: Differentiation of $\frac{(\sin x-x \cos x)}{(x \sin x+\cos x)}$
Formula used: $(i)\left(\frac{u}{v}\right)^{\prime}=\frac{u^{\prime} v-u v^{\prime}}{v^{2}}$ where $v \neq 0$ (Quotient rule)
(ii) $\frac{d \sin x}{d x}=\cos x$
(iii) $\frac{d \cos x}{d x}=-\sin x$
(iv) (uv)′ = u′v + uv′ (Leibnitz or product rule)
Let us take $u=(\sin x-x \cos x)$ and $v=(x \sin x+\cos x)$
$u^{\prime}=\frac{d u}{d x}=\frac{d[\sin x-x \cos x]}{d x}$
Applying Product rule for finding the term xcosx in u’
(gh)′ = g′h + gh′
Taking g = xand h = cosx
${[x \cos x]^{\prime}=(1)(\cos x)+x(-\sin x) }$
${[x \cos x]^{\prime}=\cos x-x \sin x }$
Applying the above obtained value for finding u’
$u^{\prime}=\cos x-(\cos x-x \sin x)$
$u^{\prime}=x \sin x$
$v^{\prime}=\frac{d v}{d x}=\frac{d(x \sin x+\cos x)}{d x}$
Applying Product rule for finding the term xsinx in v’
(gh)′ = g′h + gh′
Taking g = xand h = sinx
${[x \sin x]^{\prime}=(1)(\sin x)+x(\cos x) }$
${[x \sin x]^{\prime}=\sin x+x \cos x }$
Applying the above obtained value for finding v’
$v^{\prime}=\sin x+x \cos x-\sin x$
$v^{\prime}=x \cos x$
Putting the above obtained values in the formula:-
$\left(\frac{\mathrm{u}}{\mathrm{v}}\right)^{\prime}=\frac{\mathrm{u}^{\prime} \mathrm{v}-\mathrm{uv}^{\prime}}{\mathrm{v}^{2}}$ where $\mathrm{v} \neq 0$ (Quotient rule)
$\left[\frac{(\sin x-x \cos x)}{(x \sin x+\cos x)}\right]=\frac{(x \sin x)(x \sin x+\cos x)-(\sin x-x \cos x)(x \cos x)}{(x \sin x+\cos x)^{2}}$
$=\frac{\left(x^{2} \sin ^{2} x+x \sin x \cos x\right)-\left(x \sin x \cos x-x^{2} \cos ^{2} x\right)}{(x \sin x+\cos x)^{2}}$
$=\frac{\left.x^{2} \sin ^{2} x+x \sin x \cos x-x \sin x \cos x+x^{2} \cos ^{2} x\right)}{(x \sin x+\cos x)^{2}}$
$=\frac{x^{2}\left(\sin ^{2} x+\cos ^{2} x\right)}{(x \sin x+\cos x)^{2}}$
$=\frac{x^{2}}{(x \sin x+\cos x)^{2}}$
Ans) $=\frac{x^{2}}{(x \sin x+\cos x)^{2}}$