##### Tools

This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# Derivative as a function

Jump to: navigation, search

## 1 Motion and the derivative

Recall, if $x$ is time, $f(x)$ is the location at time $x$, then $f^{\prime}(a)$ is the instantaneous velocity of the motion at $a$. (Unlike speed, velocity has direction).

The motion can be horizontal or vertical.

However, we always make the time axis horizontal.

Example. The graph shows the positions of two runners as functions of time. Describe what happens.

Here's what happened: they started together, then were apart from each other, at all times $A$ was ahead, then finished together.

More details:

• $A$ maintains the same speed,
• $B$ starts slow and speeds up.

Estimate the speed from the graph. Speed of $B$ at $t=9$: $$g^{\prime}(9) = \frac{60}{10} = 6 \text{ m/s}$$ Speed of $B$ at $t=16$: $$g^{\prime}(16) = \frac{100}{3} = 33 \text{ m/s}$$ Naturally, $$g^{\prime}(0) = 0.$$

Important observation: Here we have three values of $g^{\prime}$. That a new function! It is called the derivative function.

Rough sketch here:

Review exercise. Compute $f^{\prime}(2)$ from the definition for $$f(x) = -x^{2} - x$$ Definition: $$f^{\prime}(2) = \lim_{h \to 0} \frac{f(2 + h) - f(2)}{h}$$ Algebra first. Substitution...

What do we substitute?

1. Replace $x$ with $2 + h$. \begin{aligned}f(x) &= -x^{2} - x \\ f(2 + h) &= -(2 + h)^{2} - (2 + h) \end{aligned}, $$f(2) = -2^{2} - 2.$$

2. Replace $x$ with 2.

Substitute now: \begin{aligned} f^{\prime}(2) &= \lim_{h \to 0} \frac{\left[ -(2 - h)^{2} - (2-h) \right] - \left[ -2^{2} - 2 \right]}{h} \\ &= \lim_{h \to 0} \frac{-4 - 4h - h^{2} - 2 - h + 4 + 2}{h} \\ &= \lim_{h \to 0} \frac{-5h - h^{2}}{h} \\ &= \lim_{h \to 0} (-5 -h ) \\ &= -5 - 0 \\ &= 5 \end{aligned}

Review substitution:

Given $f(x) = \sin x + x^{3}$, consider $$\begin{gathered} f(1) = \sin 1 + 1^{3}, \\ f(-1) = \sin(-1) + (-1)^{3}, \\ f(t) = \sin t + t^{3}, \\ f(-x) = \sin(-x) + (-x)^{3}, \\ f(x^{2}) = \sin(x^{2}) +(x^{2})^{3}. \end{gathered}$$

## 2 Derivative as a function

Until now, the derivative has been a number: $$f^{\prime}(1)=0, \quad f^{\prime}(3)=5.$$ Indeed, it's defined as a limit and, when it exists, it's a number.

And if the limit does not exist, the derivative does not exist: $$f^{\prime}(0) \text{ d.n.e}$$

Next, let's think of the derivative as a function.

Given the graph of $f$, we can find $f'(a)$, for each point $a$:

Graphical procedure:

1. Find $f^{\prime}(a)$ at each of these $a$'s a s the slope of the graph.
2. Plot these points, i.e., $(a,f^{\prime}(a))$, on the axes below the graph of $f$.
3. Based on these points guess the shape of $y = f^{\prime}(x)$.

Numerical procedure:

So, differentiation serves as a function of functions:

Next, with $f$ given by its formula, find $f^{\prime}$.

Algebraic procedure:

Use the definition, as before, but with $a$ is unspecified.

Example. Compute $f^{\prime}$ as a function for $f(x) = x^{2}$.

Definition: $$f^{\prime}(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h},$$ for each $a$.

Substitute $x^{2}$ $$\lim_{h \to 0} \frac{(a + h)^{2} - a^{2}}{h} .$$ We want $f^{\prime}(a)$ for all $a$ in one computation! $$\lim_{h \to 0} \frac{a^{2} + 2ah + h^{2} - a^{2}}{h}.$$ Divide by $h$. $$\lim_{h \to 0} \frac{2ah + h^{2}}{h}.$$ Crucial observation: $a$ is independent of $h$, so, as far as the limit is concerned, it's treated as a constant. $$\lim_{h \to 0} (2a + h)$$ Where does this go as $h$ goes to 0? $$2a + 0 = 2a.$$

Last point: I want $f^{\prime}$ to be a function of $x$, not $a$, just as the formula of $f$. We can plug in $a = \text{ anything }$ to get the derivative as a number. So, we just replace $a$ with $x$.

Answer $f^{\prime}(x) = 2x$.

The two functions, $f$ and $f'$, must have the same input, why?

Consider again: $x$ is time, $f(x)$ is the position as a function of time, then $f^{\prime}(a)$ is the velocity at time $x = a$. Then $f^{\prime}$, as a function, should be a function of time, $x$: \begin{aligned} \text{feet, } y &= f(x), \quad \text{position} \\ \text{feet/sec, } y &= f^{\prime}(x), \quad \text{velocity} \end{aligned}

## 3 Derivative exists, so what?

Some limits don't exist. Some for $f^{\prime}$ So, when it does, what does it tell us? Suppose $$f^{\prime}(a) = \lim_{h \to 0} \frac{f(a + h) + f(a)}{h}$$ exists.

First, clearly $\lim\limits_{h \to 0} h = 0$.

Question
What does it mean for the limit of the numerator?
Answer
Its limit is 0.

Why?

Consider $$\lim_{h \to 0} \left[f(a + h) - f(a) \right] = 0$$ Rewrite (DR) $$\begin{gathered} \lim_{h \to 0} f(a + h) - \lim_{h \to 0} \underbrace{f(a)}_{\text{No } h \text{ here}} = 0 \\ \lim_{h \to 0} f(a + h) - f(a) = 0 \end{gathered}$$ So, $$\lim_{h \to 0} f(a + h) = f(a)$$ This is a familiar limit!

Indeed, the limit means that $f$ is continuous at $a$.

To summarize...

Theorem. If the derivative of $f$ exists at $a$, then $f$ is continuous at $a$.

Conversely, if $f$ is not continuous at $a$, then $f^{\prime}(a)$ does not exist, i.e., $f$ is not differentiable.

We know from algebra: if $f^{\prime}(a)$ exists then $f$ is continuous at $x=a$. Now geometrically, if it is not, the secant lines become more and more vertical, $$\text{slope } \to \infty$$ as it gets steeper. So our limit is $\infty$:

Fact: There are continuous functions that are not differentiable. Compare:

• Continuous : There is no break.
• Differentiable : There is a tangent line.

Cusp.

Let's try to use the geometric definition of the derivative -- via secant lines. Approach $a$ separately from the left and right, they turn and the end result is...

• Two lines, so not differentiable:

$$\lim_{h \to 0^{-}} \neq \lim_{h \to 0^{+}}$$

• Same line, so differentiable:

Example. Analyze algebraically, $$f(x) = |x|$$ at 0. \begin{aligned} f^{\prime}(0) &= \lim_{h \to 0} \frac{|0 + h| - |0|}{h} \\ &= \lim_{h \to 0} \frac{|h|}{h} \\ \end{aligned} Consider: $$\lim_{h \to 0^{-}} \frac{|h|}{h} = \frac{-h}{h} = -1, \qquad \lim_{h \to 0^{+}} \frac{|h|}{h} = \frac{h}{h} = 1$$ Not equal, so the limit does not exist.

Fact. There are functions the graph of which look smooth that they are not differentiable.

Example. $$f(x) = \sqrt[3]{x}$$ at $x=0$.

The limit is infinite: $$f^{\prime}(0) = \infty$$

Review example. Find $f^{\prime}(x)$ for $f(x) = x^{2} + 1$ for all $x$. \begin{aligned} f^{\prime} &= \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} \\ &= \lim_{h \to 0} \frac{\left[ (x + h)^{2} + 1\right] - \left[ x^{2} + 1\right]}{h} \end{aligned} The terms cancel \begin{aligned} =\lim_{h \to 0} &\frac{x^{2} + 2xh + h^{2} + 1 - x^{2} -1}{h} \\ &\quad = \lim_{h \to 0} (2x + h) \\ &\quad = \lim_{h \to 0} \frac{2xh + h^{2}}{h} \\ &\quad = 2x \end{aligned}

Some analysis, we compare the graphs of the derivative and the function:

Example. Now how about plotting $f^{\prime}$ based on the graph of $f$ only.

How? First look at the points with a horizontal tangent, i.e, for those $x$'s where $f^{\prime}(x) = 0$. These will typically separate intervals on which $f^{\prime} > 0$ or $f^{\prime} < 0$. To see which one, look at the slopes of $f$.

Notation: Consider $$f^{\prime}(a) = \lim_{h \to 0} \underbrace{\frac{f(a+h) - f(a)}{h}}_{\text{Rename them as: }\frac{\Delta y}{\Delta x}= \frac{\text{rise}}{\text{run}}}$$ Here, the fraction is called the "difference quotient": $$\frac{\text{change of } y}{\text{change of } x}$$ Remember, $\Delta$ stands for "difference" (and $d$ in $dx$, $dy$ as well).

This suggests...

New notation
$$\frac{dy}{dx}$$

for the derivative.

It's called the Leibniz Notation: $$\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$ Here $dx$ and $dy$ can be thought of as "infinitely small" increments of $x,y$ but we prefer to understand them via limits.

## 4 Higher derivatives

Examples Consider $$\left( x^{2} + 1 \right)^{\prime}=2x.$$ We did differentiation once. How about one more time? $$\left( 2x \right)^{\prime} = 2$$ Twice!

New notation:

• $\left(x^{2} + 1 \right)^{\prime\prime} = 2$ is the second derivative,
• $\left(x^{2} + 1 \right)^{\prime\prime\prime} = 2^{\prime} = 0$ is the third derivative.

Leibniz notation:

• First derivative : $$\frac{d}{dx} \left( x^{2} + 1 \right) = 2x$$
• Second derivative : $$\frac{d}{dx} 2x = 2$$