# Sum and Difference rules

The derivatives of sum and difference rules is simply put the the derivative of a sum (or difference) is equal to the sum (or difference) of the derivatives.
If 'f' and 'g' are two differentiable function at x then,

$\color{red} {\frac{\text{d} }{\text{d}x}[f(x) + g(x)] = \frac{\text{d}}{\text{d}x}f(x) + \frac{\text{d}}{\text{d}x}g(x) }$

$\color{red}{\frac{\text{d} }{\text{d}x}[f(x) + g(x)] =f'(x) +g'(x)}$

$\color{green}{\frac{\text{d} }{\text{d}x}[f(x) - g(x)] = \frac{\text{d}}{\text{d}x}f(x) - \frac{\text{d}}{\text{d}x}g(x) }$

$\color{green}{\frac{\text{d} }{\text{d}x}[f(x) - g(x)] =f'(x) - g'(x)}$

Proof for the sum rule :

$\frac{\text{d} }{\text{d}x}[f(x) + g(x)] =\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x)+g(x + \triangle x)]-[f(x) + g(x)] }{\triangle x}$

=$=\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x) -f(x)]+[g(x + \triangle x)- g(x)] }{\triangle x}$

= $=\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x) -f(x)] }{\triangle x}+ \lim_{\triangle x \rightarrow 0}\frac{[g(x +\triangle x) -g(x)] }{\triangle x}$

$\frac{\text{d} }{\text{d}x}[f(x) + g(x)] = \frac{\text{d}}{\text{d}x}f(x) + \frac{\text{d}}{\text{d}x}g(x)$

Proof for the difference rule :

$\frac{\text{d} }{\text{d}x}[f(x) - g(x)] =\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x)-g(x + \triangle x)]-[f(x) - g(x)]}{\triangle x}$

=$=\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x) -f(x)]-[g(x + \triangle x)- g(x)] }{\triangle x}$

= $=\lim_{\triangle x \rightarrow 0}\frac{[f(x +\triangle x) -f(x)] }{\triangle x}- \lim_{\triangle x \rightarrow 0}\frac{[g(x +\triangle x) -g(x)] }{\triangle x}$

$\frac{\text{d} }{\text{d}x}[f(x) - g(x)] = \frac{\text{d}}{\text{d}x}f(x) - \frac{\text{d}}{\text{d}x}g(x)$

## Examples on sum and difference rules

Find the derivative of the following using the sum and difference rules.
1) f(x)= $x^{3} -4x^{2}$ + 8
Solution : f(x)=y = $x^{3} -4x^{2}$ + 8
$\frac{\text{d}y}{\text{d}x} = \frac{\text{d}}{\text{d}x}[x^{3} - 4x^{2}+8]$

$= \frac{\text{d}}{\text{d}x}(x^{3}) - \frac{\text{d}}{\text{d}x}(4x^{2}) + \frac{\text{d}}{\text{d}x}(8)$

Applying power rule and constant rule of derivative
=$3x^{2}$ -(4)(2)x + 0

f'(x) = $\frac{\text{d}y}{\text{d}x}= 3x^{2} - 8x$

2) f(x) = y = $-\frac{x^{4}}{3} + 8x$

Solution : y = $-\frac{x^{4}}{3} + 8x$

$\frac{\text{d}y}{\text{d}x}= -\frac{x^{4}}{3} + 8x$

$=\frac{\text{d}}{\text{d}x}(-\frac{x^{4}}{3}) +\frac{\text{d}}{\text{d}x}(8x)$

$\frac{\text{d}y}{\text{d}x}= -\frac{4x^{3}}{3} + 8$

3) f(x) = y = $\frac{3x^{2}-1}{x}$

Solution : y = $\frac{3x^{2}-1}{x}$

$\frac{\text{d}y}{\text{d}x}= \frac{\text{d}}{\text{d}x}[\frac{3x^{2}-1}{x}]$

= $\frac{\text{d}}{\text{d}x}(\frac{3x^{2}}{x}) -\frac{\text{d}}{\text{d}x}(\frac{1}{x})$

= $\frac{\text{d}}{\text{d}x}(3x) -\frac{\text{d}}{\text{d}x}(x^{-1})$

= $3 -(-1)(x^{-2})$

$\frac{\text{d}y}{\text{d}x} = 3 + x^{-2}$

$\frac{\text{d}y}{\text{d}x} = 3 + \frac{1}{x^{2}}$