Basic Derivative Rules¶
Now we know how to calculate $\frac{d}{dx} x^3$ or $\frac{d}{dx} x^4$, but how to calculate $\frac{d}{dx} (x^3 + x^4)$? How about $\frac{d}{dx}(3x^2-4x+5)$?
Derivative of sum¶
Suppose that the derivatives $\frac{d}{dx} f(x)$ and $\frac{d}{dx} g(x)$ exist. Then $$ \begin{align} \frac{d}{dx} (f(x)+g(x)) &= \lim_{h \to 0} \frac{(f(x+h)+g(x+h))-(f(x)+g(x))}{h} \\ &= \lim_{h \to 0} \frac{f(x+h)+g(x+h)-f(x)-g(x)}{h} \\ &= \lim_{h \to 0} \frac{f(x+h)-f(x)+g(x+h)-g(x)}{h} \\ &= \lim_{h \to 0} \left( \frac{f(x+h)-f(x)}{h} + \frac{g(x+h)-g(x)}{h} \right) \\ &= \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} + \lim_{h \to 0} \frac{g(x+h)-g(x)}{h} \\ &= \frac{d}{dx} f(x) + \frac{d}{dx} g(x). \end{align} $$
If the derivatives $\frac{d}{dx} f(x)$ and $\frac{d}{dx} g(x)$ exist, then $$ \frac{d}{dx} (f(x)+g(x)) = \frac{d}{dx} f(x) + \frac{d}{dx} g(x). $$
Derivative with constant in front¶
Let $c$ be a constant (that is, any number that does not depend on $x$). Suppose that $\frac{d}{dx} f(x)$ exists. Then $$ \begin{align} \frac{d}{dx} (cf(x)) &= \lim_{h \to 0} \frac{cf(x+h)-cf(x)}{h} \\ &= \lim_{h \to 0} \frac{c(f(x+h)-f(x))}{h} \\ &= \lim_{h \to 0} c\frac{f(x+h)-f(x)}{h} \\ &= \left( \lim_{h \to 0} c \right) \left( \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \right) \\ &= c\frac{d}{dx} f(x). \end{align} $$
If the derivative $\frac{d}{dx} f(x)$ exists and $c$ is a constant, then $$ \frac{d}{dx} (cf(x)) = c \cdot \frac{d}{dx} f(x). $$
This rule does not work if $c$ is something that contains $x$. For example, $$ \frac{d}{dx} (x \cdot x) = \frac{d}{dx} x^2 = 2x, $$ but $$ x \cdot \frac{d}{dx} x = x \cdot 1 = x. $$
Derivative of difference¶
Suppose that the derivatives $\frac{d}{dx} f(x)$ and $\frac{d}{dx} g(x)$ exist. Then by using the above results, we get $$ \begin{align} \frac{d}{dx} (f(x)-g(x)) &= \frac{d}{dx} \Bigl( f(x) + (-1)g(x)\Bigr) \\ &= \frac{d}{dx} f(x) + \frac{d}{dx} \Bigl( (-1)g(x)\Bigr) \\ &= \frac{d}{dx} f(x) + (-1) \frac{d}{dx} g(x) \\ &= \frac{d}{dx} f(x) - \frac{d}{dx} g(x). \end{align} $$
If the derivatives $\frac{d}{dx} f(x)$ and $\frac{d}{dx} g(x)$ exist, then $$ \frac{d}{dx} (f(x)-g(x)) = \frac{d}{dx} f(x) - \frac{d}{dx} g(x). $$