# Sum Rule

The derivative of a function f \left( x \right) = u \left( x \right) + v \left( x \right) is $$f' \left( x \right) = u' \left( x \right) + v' \left( x \right)$$

## Example

Let f \left( x \right) = x^2 + 3\ln \left( x \right).

It is made of 2 functions: u \left( x \right) = x^2 and v \left( x \right) = 3 \ln \left( x \right).

Let \begin{align*} f \left( x \right) = x^2 - 3\ln \left( x \right) \end{align*} It is made of 2 functions: u \left( x \right) = x^2 and v \left( x \right) = 3 \ln \left( x \right) for which we know the derivatives:

The function u \left( x \right) = x^2 is a power x^{n} with n=2. Apply the power rule: \begin{align*} u' \left( x \right) &= 2x^{2-1} \\ &= 2x \end{align*}

The function v \left( x \right) = 3 \ln \left( x \right) is a constant, c=3, times \ln \left( x \right). The derivative of the logathmic function is \frac{1}{x}. Apply the constant rule: \begin{align*} v' \left( x \right) &= 3 \times \frac{1}{x} \\ &= \frac{3}{x} \end{align*}

So the derivative of f \left( x \right) is \begin{align*} f' \left( x \right) &= u' \left( x \right) + v' \left( x \right) \\ &= 2x + \frac{3}{x} \end{align*}

It works the same way with a substraction.

Let f \left( x \right) = x^2 - 3\ln \left( x \right)

It is made of 2 functions: u \left( x \right) = x^2 and v \left( x \right) = 3 \ln \left( x \right) for which we know the derivatives: