NOTE: You may view the original PDFs of the notes written in class by clicking on the link for the 1:30 Section or 2:30 Section, respectively.
Lecture 5: The Derivative
GOAL: Become familiar with the limit definition of the derivative. Be able to solve the Tangent Problem for various functions.
We say a line is tangent to an object if it touches it only once. Figures 1 and 2 show lines tangent to a circle and the graph of a function. One of the reasons Calculus was invented was to solve The Tangent Problem (stated below).
Figure 1
Figure 2
The Tangent Problem
Given a function \( f \) and a point \( c \), determine the equation of the line tangent to \( f \) at the point \( (c, f(c)) \).
Figure 3
We can approximate the solution using a secant line. The slope of the secant line (often called the difference quotient) is the following:
\[ \text{Slope} = \frac{y_2 - y_1}{x_2 - x_1} = \frac{f(c+h) - f(c)}{(c+h) - c} = \frac{f(c+h) - f(c)}{h} \approx \text{Slope of the tangent line} \]NOTICE:
We get a better approximation by moving closer to \( c \) (make \( h \) smaller). So, to get an exact answer we want to see what the difference quotient approaches as \(h\) gets really really small. I.e., take a limit.
Definition: The derivative of \( f \) at \( x = c \) is defined by
\[ f'(c) \overset{\text{def}}{=} \lim_{h \to 0} \frac{f(c+h) - f(c)}{h} \]If \( f'(c) \) exists, we say \( f \) is differentiable at \( c \). The symbol "\(f'(c)\)" is read as "\(f\) prime of \(c\)."
NOTE:
-
Some textbooks use \( \Delta x \) as opposed to \( h \). In particular, our textbook uses \(\Delta x\) just for this and the next section, then uses \(h\) in the subsequent sections as well as the homework.
-
If \( f'(c) \) exists, then the line with slope \( f'(c) \) containing the point \( (c, f(c)) \)
\[ y - f(c) = f'(c)(x - c) \]is the solution to the Tangent Problem.
Example 1
Find \( f'(1) \) if \( f(x) = 2x + 3 \)
Figure 4
The Derivative As A Function
In a perfect world, we do not want to repeat the same calculation again whenever we want to find the derivative at a different point. We solve this issue by doing the calculation for an arbitrary \(x\) as opposed to a specific point.
That is, we define a function: \[ f'(x) \overset{\text{def}}{=} \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \] that has a point \(x\) as input and returns the slope of the tangent line at \(x\) as output.
Example 2(a)
If \( f(x) = x^2 \), find \( f'(x) \)
\begin{align*} f'(x) =&~ \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h}\\ =&~ \lim_{h \to 0} \frac{x^2 + 2xh + h^2 - x^2}{h} \\ =&~ \lim_{h \to 0} \frac{2xh + h^2}{h}\\ =&~ \lim_{h \to 0} [2x + h]\\ =&~ 2x \end{align*}Example 2(b)
Find the equation of the line tangent to \( x^2 \) at \( x = -1 \)
\begin{align*} \text{Slope: }& f'(-1) = 2(-1) = -2 \\[0.5em] \text{Point: }& (-1, f(-1)) = (-1, (-1)^2) = (-1, 1) \end{align*}Figure 5
Now that we have the slope of the tangent and the point where it touches the graph, we can find the equation of the line.
\begin{align*} y - f(1) =&~ f'(1)(x - (-1))\\ y - 1 =&~ -2(x - (-1)) \\[0.5em] y - 1 =&~ -2(x+1) \\[0.5em] y - 1 =&~ -2x - 2 \\[0.5em] y =&~ -2x - 1 \end{align*}NOTATION: There are many of representing the derivative for a function \( y = f(x) \).
| Derivative | Evaluated at \( c \) |
|---|---|
| \( f'(x) \) | \( f'(c) \) |
| \( y' \) | \( y'(c) = y' \big|_{x=c} \) |
| \( \dfrac{df}{dx} = \dfrac{d}{dx}(f(x))\) | \( \dfrac{df}{dx} \Big|_{x=c} \) |
| \( \dfrac{dy}{dx} \) | \( \dfrac{dy}{dx} \Big|_{x=c} \) |
Example 3
Compute \( \dfrac{d}{dx}(x^3) \)
\[ \begin{array}{ccccccc} & & & 1 & & & \\ & & 1 & & 1 & & \\ & 1 & & 2 & & 1 & \\ 1 & & 3 & & 3 & & 1 \end{array} \]Here we use the Binomial Theorem (or Pascal's Triangle shown above) to find the coefficients when we expand \((x+h)^3\). You could just compute \((x+h)(x+h)(x+h)\), but that takes a bit of time.
\begin{align*} \frac{d}{dx}(x^3) =&~ \lim_{h \to 0}\frac{(x+h)^3 - x^3}{h}\\ =&~ \lim_{h \to 0} \frac{x^3 + 3x^2h +3xh^2 + h^3 - x^3}{h} \\[0.5em] =&~ \lim_{h \to 0} \frac{3x^2h+ 3xh^2 + h^3}{h}\\ =&~\lim_{h \to 0} \left[ 3x^2 + 3xh + h^2 \right]\\ =&~ 3x^2 \end{align*}Example 4
Find \( y' \) if \( y = \sqrt{x} \) \( (x > 0) \).
Note that in the difference of squares formula \(a^2 - b^2 = (a-b)(a+b)\), the factors \((a-b)\) and \((a+b)\) are each others' conjugates. So we multiply by the conjugate to get rid of the square roots.
\begin{align*} y' =&~ \lim_{h \to 0} \frac{\sqrt{x+h} - \sqrt{x}}{h}\\ =&~\lim_{h \to 0} \frac{\sqrt{x+h} - \sqrt{x}}{h} \left( \frac{\sqrt{x+h} + \sqrt{x}}{\sqrt{x+h} + \sqrt{x}} \right) \\[0.5em] =&~ \lim_{h \to 0} \frac{(x+h) - (x)}{h\left[\sqrt{x+h} + \sqrt{x}\right]} \\[0.5em] =&~ \lim_{h \to 0} \frac{h}{h\left[\sqrt{x+h} + \sqrt{x}\right]}\\ =&~ \lim_{h \to 0} \frac{1}{\sqrt{x+h} + \sqrt{x}} \\[0.5em] =&~ \frac{1}{2\sqrt{x}} \end{align*}Question: When does differentiability fail?
Answer 1: If there is a vertical tangent line
Example 5
When is \( \sqrt[3]{x} \) differentiable?
Take for granted \( \dfrac{d}{dx}\left(\sqrt[3]{x}\right) = \dfrac{1}{3\sqrt[3]{x^2}} \). Hence, it is differentiable everywhere except \(0\).
Figure 6
In this case \(\sqrt[3]{x}\) has a tangent line at \(x=0\), but the slope is undefined since the tangent is completely vertical.
Answer 2: If there is a discontinuity
Theorem
- If \( f \) is differentiable at \( c \), then \( f \) is continuous at \( c \).
- If \( f \) is discontinuous at \( c \), then it is not differentiable at \( c \).
Example 6
Compute \( \dfrac{d}{dx}\left(\dfrac{1}{x}\right) \)
\begin{align*} \lim_{h \to 0} \frac{\frac{1}{x+h} - \frac{1}{x}}{h} =&~ \lim_{h \to 0} \frac{1}{h}\left[\frac{x}{(x+h)x} - \frac{x+h}{x(x+h)}\right] \\[0.5em] =&~ \lim_{h \to 0} \frac{1}{h}\left[\frac{x - x - h}{x(x+h)}\right]\\ =&~ \lim_{h\to 0} \frac{1}{h}\left[\frac{-h}{x(x+h)}\right]\\ =&~\frac{-1}{x^2} \\[0.5em] \end{align*}Since \(\frac{1}{x}\) has an asymptote at \(x=0\), it is not differentiable at 0. The fact we divide by 0 if we try to plug 0 into the derivative reinforces this idea. So,
\[ \frac{d}{dx}\left(\frac{1}{x}\right) = \begin{cases} \dfrac{-1}{x^2} & x \ne 0 \\ \text{undefined} & x = 0 \end{cases}\]Answer 3: If there is any kind of corner or kink
Example 7
Show \( |x|=\begin{cases}x~~\quad& x\geq0\\-x\quad& x<0 \end{cases}\) is not differentiable at \( 0 \).
Figure 7
Since the formula changes at 0, we need to break up the derivative into its left and right limits:
\begin{align*} \lim_{h \to 0^{+}} \frac{|0+h| - |0|}{h}=&~ \lim_{h \to 0^{+}}\frac{|h|}{h}\quad h\text{ is positive here}\\ =&~\lim_{h \to 0^{+}}\frac{h}{h}\\ =&~\lim_{h \to 0^{+}}1\\ =&~1\\ \lim_{h \to 0^{-}} \frac{|0+h| - |0|}{h}=&~ \lim_{h \to 0^{-}}\frac{|h|}{h}\quad h\text{ is negative here}\\ =&~\lim_{h \to 0^{-}}\frac{-h}{h}\\ =&~\lim_{h \to 0^{-}}-1\\ =&~-1 \end{align*}The left and right limits are unequal, so the derivative does not exist at 0. This is an example of a function that is continuous at 0, but not differentiable at 0. For \(|x|\), 0 is the only trouble spot; redoing the calculation for when \(x>0\) and \(x<0\) we get
\[ \dfrac{d}{dx}(|x|) = \frac{|x|}{x} = \begin{cases}1~~\quad x>0\\\text{undefined}\quad x = 0\\-1\quad x <0 \end{cases} \]