abstractmath.org 2.0
help with abstract math

Produced by Charles Wells     Revised 2015-09-24
Introduction to this website    website TOC    website index   blog


If I see a derivative, I run the other way. --Warren Buffett

# DERIVATIVES

This section of abstractmath.org is devoted solely to understanding the concept of derivative by showing you graphs of curves and their derivatives. I do not go into how you get the epsilon-definition which is necessary for producing the formulas you learn in calculus class for calculating the derivative.

The way to use this section is to stare at them to see how the function and its derivatives are related to each other. (More about this in About the graphs below.) You don’t have to know the formula for the derivative to understand these relations. Of course, you need the formula if you are going to use the derivative.

One of the values of putting things on the web instead of in a book is that I can include many more examples than would be practical to put in a book.

## Mathematica sources

The two files below contain the source code that generated the illustrations in this article.

If you own Mathematica, you can download these files and modify the code to get other examples. These files also contain manipulable graphs that allow you to change the parameters in some of the examples to see what happens to the shape of the curve and its derivatives.

If you don't own Mathematica, you can download Wolfram CDF Player (free) and install it on your (Windows, Mac or Linux) machine. In that case you can download the files below and view but not change the code and also operate the manipulable graphs.

The abmath file Mathematica/Derivatives contains other relevant files that you may want to investigate as well.

## Definition of derivative

A continuous function $f$ may have a derivative, which is another function $f'$. Thus taking the derivative maps functions to functions. Such mappings are examples of operators.

Definition: For each real number $a$ where $f$ is defined, the derivative $f'(a)$ is the slope of the tangent line at the point $(a,f(a))$ on the curve.

Of course, the curve $y=f(x)$ may not have a tangent line at $(a,f(a))$ (for example, the absolute value function does not have a tangent at $(0,0)$. In that case the value $f'(a)$ is undefined.

This is a conceptual definition of “derivative”. The “conceptual definition” isn’t a mathematical definition until you define the tangent line! If you work out all the definitions concerned, you get an epsilon-delta definition of derivative that allows you to prove statements about them. This is illustrated in more detail in Concept and Computation and in The Power of Being Naive.

The derivatives are shown in each graph by color.

• function: blue
• first derivative: red
• second: green
• third: gold
• fourth: purple
• fifth: light blue

### Studying the graphs

It is worthwhile to study these curves, keeping in mind relationships like the following:

• The $y$ value at any point on the red curve (first derivative) is the slope of the blue curve (the function).
• The red curve crosses the $x$-axis wherever the blue curve has a local maximum or minimum. (The first graph where you can see this is the squaring function.)
• The $y$ value at any point on the the green curve (second derivative) shows the slope of the red curve and also whether the blue curve is concave up or down. It follows that if the $y$ value of the green curve is $0$ then the blue curve has a critical point there. (The first graph where you can see this is the first cubic function.)
• And so on.

The point is for you to gain a solid intuitive understanding of the relationship of the derivative to the function just from the graphs and knowing the conceptual definition of derivative.

## Baby example: A Constant Function

Don't underestimate baby examples. Looking at a picture of one solidifies your understanding of what I have just written using words.

#### $x\mapsto 1$

The tangent line to the straight line $y = 1$ is itself.

The derivative is the constant function $x \mapsto 0$ because the straight line $y = 1$ has slope $0$. You need to know only the definition of derivative to know that. You don' t need to know any "formula".

This is the graph of the constant function $x\mapsto 1$ and its derivative.

## Baby examples: Straight Lines

### The identity function $x\mapsto x$

The identity function $x\mapsto x$ has slope $1$ at every point. So the first derivative will be the constant function $x\mapsto 1$ and the second derivative will be $x\mapsto 0$.

### Some more straight lines

#### $x\mapsto x-\frac{1}{4}$

It has the same slope as the identity function so it has the same first and second derivatives.

## Absolute Value

This is the function $x\mapsto\begin{cases} 0& \text{ if } x=0\\ -1 & \text{ if } x\lt0\\ 1 & \text{ if } x\gt0\end {cases}$

There is no tangent line at $(0, 0)$ because the graph has a corner there.

### $x\mapsto x^2$

This function has one local minimum and that is just where the first derivative is $0$ and where the second derivative is positive. When you study these graphs, try out this kind of reasoning on each one.

$\begin{array}{ll} \text{function} & x\mapsto x^2 \\ \text{1st deriv} & x\mapsto 2 x \\ \text{2nd deriv} & x\mapsto 2 \\ \text{3rd deriv} & x\mapsto 0 \\ \end{array}$

TO DO: Color the words "function", "1st derivative", "2nd derivative" and so on to match the colors of the corresponding curves.

## Cubic functions

### $x\mapsto x^3$

This function has no local maxima or minima. It has one inflection point. It has exactly one zero, at $x=0$. You can't really tell that it only has one by looking at the graph, but you can tell there is only one because $x^3$ is positive for $x\gt0$ and negative for $x\lt0$. You can't always trust graphs.

$\begin{array}{ll} \text{function} & x\mapsto x^3 \\ \text{1st deriv} & x\mapsto 3 x^2 \\ \text{2nd deriv} & x\mapsto 6 x \\ \text{3rd deriv} & x\mapsto 6 \\ \end{array}$

### $x\mapsto x^3-x$

This function has two local maxima and minima, an inflection point, and three distinct real roots.

$\begin{array}{ll} \text{function} & x\mapsto x^3-x \\ \text{1st deriv} & x\mapsto 3 x^2-1 \\ \text{2nd deriv} & x\mapsto 6 x \\ \text{3rd deriv} & x\mapsto 6 \\ \end{array}$

### $x\mapsto x^3-x^2$

This function has two real roots, one of multiplicity two.

$\begin{array}{ll} \text{function} & x\mapsto x^3-x^2 \\ \text{1st deriv} & x\mapsto 3 x^2-2x \\ \text{2nd deriv} & x\mapsto 6 x-2 \\ \text{3rd deriv} & x\mapsto 6 \\ \end{array}$

### $x\mapsto x^3+x^2+x$

This function factors as $x(x^2+x+1)$. It has no local maxima or minima and three distinct roots, two of them complex.

$\begin{array}{ll} \text{function} & x\mapsto x^3+x^2+x \\ \text{1st deriv} & x\mapsto 3 x^2+2x+1 \\ \text{2nd deriv} & x\mapsto 6 x+2 \\ \text{3rd deriv} & x\mapsto 6 \\ \end{array}$

## Quartics

### $x\mapsto\frac{1}{4}x^4$

I scaled it by $\frac{1}{4}$ because it is hard to see the third derivative for $x\mapsto x^4$. This function has one quadruple zero at $(0,0)$ and it is extremely flat there. Note that the value at $0.3$ is just $0.002025$. Each of the three derivatives shown has just one zero, at $0$, which makes it hard for the function to get off the ground near $0$, so to speak.

$\begin{array}{ll} \text{function} & x\mapsto \frac{1}{4}x^4 \\ \text{1st deriv} & x\mapsto x^3 \\ \text{2nd deriv} & x\mapsto 3 x^2 \\ \text{3rd deriv} & x\mapsto 6 x \\ \end{array}$

### $x\mapsto \frac{1}{4}(x^4-x^2+x)$

$\begin{array}{ll} \text{function} & x\mapsto \frac{1}{4}(x^4-x^2+x) \\ \text{1st deriv} & x\mapsto \frac{1}{4} 4 x^3-2 x+1 \\ \text{2nd deriv} & x\mapsto \frac{1}{4} 12x^2-2 \\ \text{3rd deriv} & x\mapsto 6 x \\ \end{array}$

This function has two real roots and two complex roots. It has a local minimum but no local maximum. That is sort of clear from the graph but the fact that the first derivative has only one zero proves that the function has only one local extremum. The function has two inflection points where you see two zeros of the second derivative.

### $x\mapsto \frac{1}{4}x(x+1)(x-1)(x-1.5)$

$\begin{array}{ll} \text{function} & x\mapsto \frac{1}{4}x(x+1)(x-1)(x-1.5) \\ \text{1st deriv} & x\mapsto \frac{1}{4}\left((x - 1.5) (x - 1) x+ (x - 1.5) (x + 1) x+ (x - 1) (x + 1) x + (x - 1.5) (x - 1) (x + 1)\right) \\ \text{2nd deriv} & x\mapsto \frac{1}{2}\left( (x-1.5)(x-1)+ x(x-1)+ (x+1)(x-1)+ (x-1.5)x+ (x-1.5)(x+1)+ x(x+1) \right)\\ \text{3rd deriv} & x\mapsto \frac{3}{2}\left((x-1.5)+(x-1)+x+(x+1)\right) \\ \text{4th deriv} &x\mapsto6 \end{array}$

These derivatives make a very nice pattern that is worth enjoying for 15 minutes or so. All the formulas, for the function and its derivatives, can be simplified by multiplying all the factors together, but then the patterns would be invisible. Note that all the derivatives have all distinct real roots, but you can't easily tell what they are from the formulas, in contrast to the formula for the function, which exhibits the roots directly.

## Quintics

### A beautiful quintic

I fiddled with this polynomial until I got the function and all four derivatives to be separated from each other. All the roots of the function and all its derivatives are real and all are shown. Isn't it gorgeous?

$\begin{array}{ll} \text{function} & x\mapsto 0.01 x^5-0.015 x^4-0.19 x^3+0.2 x^2+0.5 x-0.5 \\ \text{1st deriv} & x\mapsto 0.05 x^4-0.06 x^3-0.57 x^2+0.4 x+0.5 \\ \text{2nd deriv} & x\mapsto 0.2 x^3-0.18 x^2-1.14 x+0.4\\ \text{3rd deriv} & x\mapsto 0.6 x^2-0.36 x-1.14 \\ \text{4th deriv} & x\mapsto 1.2 x-0.36 \\ \end{array}$

Note: This document is written by a mathematician, so a number like $0.015$ means exactly $0.015$, in other words $\frac{15}{1000}$, which is $\frac{3}{200}$. If you have a scientific background, you might want to treat $0.015$ as an approximation or as an estimate, but that is not what is meant here.

## Sine

### The sine function

The Sine function is its own fourth derivative.

$\begin{array}{ll} \text{function} & x\mapsto \sin x \\ \text{1st deriv} & x\mapsto \cos x \\ \text{2nd deriv} & x\mapsto -\sin x \\ \text{3rd deriv} & x\mapsto -\cos s \\ \end{array}$

### Sine + Cosine

$\begin{array}{ll} \text{function} & x\mapsto \sin x+ \cos x \\ \text{1st deriv} & x\mapsto \cos x -\sin x\\ \text{2nd deriv} & x\mapsto -\sin x - cos x \\ \text{3rd deriv} & x\mapsto \sin x -\cos x \\ \end{array}$

### Sine times Cosine

$\begin{array}{ll} \text{function} & x\mapsto \sin x \cos x \\ \text{1st deriv} & x\mapsto \cos^2 x -\sin^2 x\\ \text{2nd deriv} & x\mapsto -4\sin x \cos x \\ \text{3rd deriv} & x\mapsto -4\sin^2 x -\cos^2 x \\ \end{array}$

## Tangent

TO DO: Something funny happens with the fourth derivative. Find out what the #%*@ is going on.

$\begin{array}{ll} \text{function} & x\mapsto \tan x \\ \text{1st deriv} & x\mapsto \sec ^2x \\ \text{2nd deriv} & x\mapsto 2 \sec ^2x \tan x \\ \text{3rd deriv} & x\mapsto 2 \sec ^4x+4 \tan ^2x \sec ^2x \\ \end{array}$

Since $\tan x$ and $\sec x$ both have $\cos x$ in their denominators, and since $\cos\frac{\pi}{2}=0$, the function and all its derivatives, which contain $\tan$ or $\sec$ or both, have asymptotes at odd multiples of $\frac{\pi}{2}$. The graph shows four of the asymptotes (purple vertical lines).

## Secant

The vertical lines are asymptotes.

### $\sec x=\frac{1}{\cos x}$

$\begin{array}{ll} \text{function} & x\mapsto \sec x \\ \text{1st deriv} & x\mapsto \tan x \sec x \\ \text{2nd deriv} & x\mapsto \sec ^3x +\tan^2 x\sec x \\ \text{3rd deriv} & x\mapsto 5 \tan x\sec ^3x+ \tan ^3x \sec x \\ \text{4th deriv} & x\mapsto 5\sec ^5x+ 18\tan ^3 x \sec^3x +\tan^4x\sec x\\ \end{array}$

## ArcTan x

$\begin{array}{ll} \text{function} & x\mapsto \arctan x \\ \text{1st deriv} & x\mapsto \frac{1}{x^2+1} \\ \text{2nd deriv} & -x\mapsto \frac{2 x}{\left(x^2+1\right)^2} \\ \text{3rd deriv} & x\mapsto \frac{8 x^2}{\left(x^2+1\right)^3}-\frac{2}{\left(x^2+1\right)^2} \\ \text{4th deriv} & x\mapsto \frac{24 x}{\left(x^2+1\right)^3}-\frac{48 x^3}{\left(x^2+1\right)^4} \\ \end{array}$

## Exponential functions

### $x\mapsto e^x$

This is "the" exponential function. It has the property that it is its own derivative. So in the picture below you see only one curve. The function and its derivative are all on top of each other.

$\begin{array}{ll} \text{function} & x\mapsto e^x \\ \text{1st deriv} & x\mapsto e^x \\ \text{2nd deriv} & x\mapsto e^x \\ \text{3rd deriv} & x\mapsto e^x \\ \text{4th deriv} & x\mapsto e^x \\ \end{array}$

### $x\mapsto e^{0.8x}$

This function spreads its derivatives out like a peacock's tail so you can see all of them.

$\begin{array}{ll} \text{function} & x\mapsto e^{0.8x} \\ \text{1st deriv} & x\mapsto 0.8e^{0.8x} \\ \text{2nd deriv} & x\mapsto 0.64e^{0.8x} \\ \text{3rd deriv} & x\mapsto 0.512e^{0.8x} \\ \text{4th deriv} & x\mapsto 0.4096e^{0.8x} \\ \text{5th deriv} & x\mapsto 0.32768e^{0.8x} \\ \end{array}$

### $x\mapsto e^x+e^{-x}$

$\begin{array}{ll} \text{function} & x\mapsto e^x+e^{-x} \\ \text{1st deriv} & x\mapsto e^x-e^{-x} \\ \text{2nd deriv} & x\mapsto e^x+e^{-x} \\ \end{array}$

Study the picture to see if you can find evidence that the blue curve is plausibly the derivative of the red curve.