# The Unapologetic Mathematician

## Algebraic Laws of Differentiation

Just like we had the laws of limits we have a collection of rules to help us calculate derivatives. Let’s start with the most basic functions.

As we said while defining the derivative, any linear function $f(x)=ax+b$ has the derivative $f'(x)=a$ at each point. We’ll separate this out into two rules:

• $\displaystyle\frac{d}{dx}c=0$
• $\displaystyle\frac{d}{dx}x=1$

That is, the derivative of any constant function is the constant function ${0}$, and the derivative of the identity function is the constant function $1$.

The next two rules should be perfectly straightforward to establish, so we’ll skip their proofs:

• $\displaystyle\frac{d}{dx}\left(f(x)+g(x)\right)=f'(x)+g'(x)$
• $\displaystyle\frac{d}{dx}\left(cf(x)\right)=cf'(x)$

That is, the derivative of the sum of two functions is the sum of their derivatives, and the derivative of a constant multiple of a function is the same constant multiple of its derivative. In particular, we can use these rules along with the basic pieces above to recalculate the derivative $\frac{d}{dx}(ax+b)=\frac{d}{dx}(ax)+\frac{d}{dx}b=a\frac{d}{dx}(x)+b\frac{d}{dx}(1)=1a+0b=a$.

Multiplication is a bit tougher. We might hope to simply split derivatives along products like we do for limits, and even the inventors of the calculus originally thought this would work. But look what happens for $f(x)=x^2$. If we split the derivative of this function along its product we get $\frac{dx}{dx}\frac{dx}{dx}=1$. But we know that this function doesn’t always go up at this constant rate. In fact, for negative values of $x$, the function actually goes down. So this rule doesn’t work.

Let’s go back to the definition of the derivative as the limit of a difference quotient:
$\displaystyle\lim\limits_{\Delta x\rightarrow0}\frac{\left[fg\right](x+\Delta x)-\left[fg\right](x)}{\Delta x}=\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x)g(x)}{\Delta x}$
Now the trick we’ll use to evaluate this limit is to add and subtract $f(x+\Delta x)g(x)$ to the numerator here. That is, in effect we’re adding zero and leaving it alone, but the formula will be easier to work with. In particular, we can start splitting it up using the laws of limits.
$\displaystyle\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x+\Delta x)g(x)+f(x+\Delta x)g(x)-f(x)g(x)}{\Delta x}=$
$\displaystyle\left(\lim\limits_{\Delta x\rightarrow0}f(x+\Delta x)\right)\left(\lim\limits_{\Delta x\rightarrow0}\frac{g(x+\Delta x)-g(x)}{\Delta x}\right)+\left(\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)-f(x)}{\Delta x}\right)\left(\lim\limits_{\Delta x\rightarrow0}g(x)\right)$
Of these four limits, the fourth is the limit of a continuous function because $g(x)$ doesn’t depend on $\Delta x$. The second and third are just the definitions of $f'(x)$ and $g'(x)$. The first limit goes to $f(x)$ because, as we showed, all differentiable functions are continuous. And so we have the rule

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

In general, we can take the derivative of the product of a bunch of functions by taking the derivative of each one and multiplying by the other functions, then adding up all the results. As a special case we get the “power rule”:

• $\displaystyle\frac{d}{dx}x^n=nx^{n-1}$

If $f(x)$ is differentiable at $x_0$, but doesn’t take the value ${0}$ there, then its reciprocal will also be differentiable. We want to calculate its derivative. We could try evaluating the limit of the difference quotient again, but instead we will proceed as follows. Define the reciprocal to be $g(x)=\frac{1}{f(x)}$. Then we have the equation $f(x)g(x)=1$. Taking the derivative of both sides at $x_0$ and using the product rule we find $f'(x_0)g(x_0)+f(x_0)g'(x_0)=0$. We can now solve this to find $g'(x_0)=-\frac{f'(x_0)g(x_0)}{f(x_0)}$, or:

• $\displaystyle\frac{d}{dx}\frac{1}{f(x)}=\frac{-f'(x)}{f(x)^2}$

Combining this with the product rule we find the “quotient rule”:

• $\displaystyle\frac{d}{dx}\frac{f(x)}{g(x)}=\frac{f'(x)g(x)-f(x)g'(x)}{g(x)^2}$

Now we have all the tools in hand to take the derivative of any “rational” function. That is, a function of the form $f(x)=\frac{P(x)}{Q(x)}$, where $P$ and $Q$ are polynomials. We can take the derivative of any polynomial by using the power rule, constant multiple rule, and addition rule. Then we can take the derivative of $f$ with the quotient rule.

A little anecdote about the quotient rule: often it’s written in the form $d(\frac{u}{v})=\frac{vdu-udv}{v^2}$. My first calculus teacher wrote this formula on the board, then noted that one must remember which order the top comes in or you’ll get the wrong sign. “V-D-U-D”. At this point he fake-tiptoed his way to the door, closed it gently, and in a loud stage whisper said, “Venereal Disease is an Ugly Disease”. To this day I can’t teach the quotient rule, and can barely use it myself, without remembering that line.

December 26, 2007 Posted by | Analysis, Calculus | 9 Comments