# What is the derivative of f(x)=xlnx-lnx^2?

Nov 12, 2015

$- \frac{2}{x} + \ln \left(x\right) + 1$

#### Explanation:

We will be using the following properties of differentiation:

(power rule)
(1) $\frac{d}{\mathrm{dx}} {x}^{n} = n {x}^{n - 1}$

(2) $\frac{d}{\mathrm{dx}} \ln \left(x\right) = \frac{1}{x}$

(3) $\frac{d}{\mathrm{dx}} f \left(k x\right) = k f ' \left(x\right) \text{ for } k \in \mathbb{R}$

(4) $\frac{d}{\mathrm{dx}} \left(f \left(x\right) + g \left(x\right)\right) = f ' \left(x\right) + g ' \left(x\right)$

(product rule)
(5) $\frac{d}{\mathrm{dx}} f \left(x\right) g \left(x\right) = f \left(x\right) g ' \left(x\right) + f ' \left(x\right) g \left(x\right)$

Additionally, we will use the property of logarithms that
(6) $\ln \left({x}^{n}\right) = n \ln \left(x\right)$

With these in mind:

$\frac{d}{\mathrm{dx}} \left(x \ln \left(x\right) - \ln \left({x}^{2}\right)\right) = x \ln \left(x\right) - 2 \ln \left(x\right)$ (by 6)
$\implies \frac{d}{\mathrm{dx}} \left(x \ln \left(x\right) - \ln \left({x}^{2}\right)\right) = \frac{d}{\mathrm{dx}} x \ln \left(x\right) - \frac{d}{\mathrm{dx}} 2 \ln \left(x\right)$ (by 4)

Solving for the first term:
$\frac{d}{\mathrm{dx}} x \ln \left(x\right) = x \left(\frac{d}{\mathrm{dx}} \ln \left(x\right)\right) + \left(\frac{d}{\mathrm{dx}} x\right) \ln \left(x\right)$ (by 5)

$\implies \frac{d}{\mathrm{dx}} x \ln \left(x\right) = x \left(\frac{1}{x}\right) + 1 \cdot \ln \left(x\right)$ (by 1 and 2)

$\implies \frac{d}{\mathrm{dx}} x \ln \left(x\right) = 1 + \ln \left(x\right)$

Solving for the second term:
d/dx 2ln(x) = 2(d/dx ln(x) (by 3)
$\implies \frac{d}{\mathrm{dx}} 2 \ln \left(x\right) = 2 \left(\frac{1}{x}\right) = \frac{2}{x}$ (by 2)

Thus, substituting,

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