# Differentiate the following functions with respect to x :

Question:

Differentiate the following functions with respect to $\mathrm{x}$ :

$\frac{e^{x} \log x}{x^{2}}$

Solution:

Let $y=\frac{e^{x} \log x}{x^{2}}$

On differentiating y with respect to $x$, we get

$\frac{d y}{d x}=\frac{d}{d x}\left(\frac{e^{x} \log x}{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{\left(x^{2}\right) \frac{d}{d x}\left(e^{x} \log x\right)-\left(e^{x} \log x\right) \frac{d}{d x}\left(x^{2}\right)}{\left(x^{2}\right)^{2}}$

We have (uv)' $=v u^{\prime}+u v^{\prime}$ (product rule)

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\left(\mathrm{x}^{2}\right)\left[\log \mathrm{x} \frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{e}^{\mathrm{x}}\right)+\mathrm{e}^{\mathrm{x}} \frac{\mathrm{d}}{\mathrm{dx}}(\log \mathrm{x})\right]-\left(\mathrm{e}^{\mathrm{x}} \log \mathrm{x}\right) \frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{2}\right)}{\mathrm{x}^{4}}$

We know $\frac{d}{d x}\left(e^{x}\right)=e^{x}, \frac{d}{d x}(\log x)=\frac{1}{x}$ and $\frac{d}{d x}\left(x^{2}\right)=2 x$

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

$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}\right)\left[e^{x} \log x+\frac{e^{x}}{x}\right]-2 x e^{x} \log x}{x^{4}}$

$\Rightarrow \frac{d y}{d x}=\frac{x^{2} e^{x} \log x+x e^{x}-2 x e^{x} \log x}{x^{4}}$

$\Rightarrow \frac{d y}{d x}=\frac{x^{2} e^{x} \log x}{x^{4}}+\frac{x e^{x}}{x^{4}}-\frac{2 x e^{x} \log x}{x^{4}}$

$\Rightarrow \frac{d y}{d x}=\frac{e^{x} \log x}{x^{2}}+\frac{e^{x}}{x^{3}}-\frac{2 e^{x} \log x}{x^{3}}$

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

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

Thus, $\frac{d}{d x}\left(\frac{e^{x} \log x}{x^{2}}\right)=e^{x} x^{-2}\left(\log x+\frac{1}{x}-\frac{2}{x} \log x\right)$