Derivatives Intro

Oftentimes one of the most important things we can ask about a function, after where is it tending towards (ie, a limit to infinity, or a limit to another endpoint of its domain) is to ask how quickly is it getting there - what is the rate of change of the function at a point? This is an intuitively easy to understand concept, if we are able to look at a graph: to estimate the rate of change at any point we can zoom in on that point, and if we zoom in far enough the graph looks like a line segment.

The rate of change of a line, or a linear function is easy - its just teh slope (the change in $y$ divided by the change in $x$). Thus, we can get a good intuitive definition for the rate of change of a general function, from this zooming in procedure:

The rate of change of a function $f(x)$ at a point $a$ is the slope of the line that $f$ looks like after zooming in. More precisely, we say that there is a line which best approximates the graph of $f(x)$ at the point $x=a$, and its slope gives the rate of change of the function at that point.

What does this quantity teach us? Well, if we have a graph that after zooming in looks like a line with slope $m=3$ near some point $x=a$, then we know that near $a$, the function $f$ is causing $y$ to grow at a rate three times faster than $x$. This sort of information is very useful across the sciences, as it helps us understand quantitatively how the function $f$ is behaving.

Example where slope doesn’t exist:

On graphs like these, we say the derivative itself does not exist, or the function is not differentiable at this point. At which points is the absolute value differentiable?

The Derivative as a Function

If the derivative at a point reports the rate of change of a function at that point, we can package all of these rates together into the derivative function which takes in a value $x$ and returns the rate of change of the original function at $x$.

We denote the *derivative of a function $f$ using the notation $\frac{df}{dx}$ or $f^\prime(x)$, whichever is more convenient for the particular application at hand. So, the slope of the graph of $f(x)$ at the point $x=2$ is given by the value $\frac{df}{dx}(2)$ or $f^\prime(2)$.

Examples of functions paired with their derivatives:

The second derivative of a function is the derivative of the derivative - that is, it gives the slope of the graph of $f^\prime$. This means we can estimate the values of $f^{\prime\prime}$ by looking at the graph of $f^\prime$ and zooming in, just as we did for $f^\prime$ itself originally.

Computing Things:

Ok, now that we have a good conceptual understanding of what the derivative is measuring, we need to begin our journey of discovering how to actually compute with it! We will spend a good portion of this semester learning techniques to efficently differentiate functions: but now we ask ourselves a more basic question - how can we even precisely define this concept? We do not want the entire theory of calculus to depend on some poorly-defined notion of zooming in on a graph!

Slope of Secant Lines

This is also one of the places where we meet one of the main strategies of calculus. If something is hard to compute - don’t try to compute it directly but rather find an approximation that’s easy to compute, and then take the limit as the error of that approximation goes to zero!

For us, the easy-to-compute-problem is the slope of a secant line, or the average slope of a graph over an interval. Since slope is rise over run, if we want to compute the average slope between $x=a$ and $x=b$ of a function $y=f(x)$, the rise is $\Delta y = f(b)-f(a)$ and the run is $\Delta x = b-a$ so the average slope is

$$\frac{\Delta y}{\Delta x}=\frac{f(b)-f(a)}{b-a}$$

This is the slope of the line passing through the points $(a,f(a))$ and $(b,f(b))$ and called a secant line to the graph $f(x)$.

It’s helpful to do some examples:

  • Find the average slope of $y=x(x-2)$ on $[1,2]$.

  • Find the average slope of $y=2^x$ on $[2,4]$

  • The slope of the secant line to $f(x)=2x-1$ from $x=1$ to $x=3$.

Slope of Tangent Lines

To compute the slope of the tangent line itself, we wish to make better and better approximating secant lines, until the approximation becomes perfect in the limit. How do we make sure the secant line becomes a better approximation of the tangent in the limit? We can shrink the interval over which we evaluate the average slope: say we want the tangent line at $x=a$: we can look at the average slope over the interval from $x=a$ to $x=a+h$ for some small number $h$ to give an approximation.

This approximation gets better as $h$ gets smaller, and becomes literally equal to the tangent slope when $h\to 0$. That is, we may define the derivative as

$$f^\prime(a)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$

When this limit does not exist, we say the derivative itself does not exist. The type of limit that shows up here is one that is quite familiar to us from our previous work: when the derivative exists the expression $(f(x+h)-f(x))/h$ has a removable discontinuity at $h=0$, and so to compute the true value of the derivative there we do not plug in $h=0$, but rather do some algebraic simplifications until the limit becomes tractable. Here’s some familiar examples:

  • If $f(x)=x^2$ then $f^\prime(x)=\lim_{h\to 0}\frac{(x+h)^2-x^2}{h}$

  • If $f(x)=\frac{1}{x}$ then $f^\prime(2)=\lim_{h\to 0}\frac{\frac{1}{2+h}-\frac{1}{2}}{h}$

Equation of the Tangent Line

How do we find the equation of the tangent line? If we know the slope of the tangent line, and a point on the tangent line, we can use the point-slope form for the equation of a line from algebra:

If $p=(a,b)$ is a point on a line with slope $m$ then the equation of this line is given by $$y-b=m(x-a)$$

We can get the slope of the tangent line by calculating the derivative at that point, as above. But how do we get the point at which our line must pass through? That’s easy: if $x=a$ then the $y$-coordinate of the corresponding point on $y=f(x)$ is simply $y=f(a)$! So all-together, an equation for the tangent line to $f(x)$ at $x=a$ is

$$y-f(a)=f^\prime(a)(x-a)$$

To do some examples:

  • Compute the tangent line to $y=x^2$ at $x-1$.

  • Compute the tangent line to $y=\frac{1}{x}$ at $x=2$.