# How do you differentiate f(x)=x+lnx^2-x^2 using the sum rule?

Dec 20, 2015

$f ' \left(x\right) = 1 + \frac{2}{x} - 2 x$

#### Explanation:

Rewrite using logarithm rules.

$f \left(x\right) = x + 2 \ln x - {x}^{2}$

The sum rule simply means that you can take the derivative of each individual part and then add them together.

$\frac{d}{\mathrm{dx}} \left[x\right] = 1$

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

$\frac{d}{\mathrm{dx}} \left[{x}^{2}\right] = 2 x$

Thus,

$f ' \left(x\right) = 1 + \frac{2}{x} - 2 x$

Simplified:

$f ' \left(x\right) = - \frac{2 {x}^{2} - x - 2}{x}$