We now define the “derivative” explicitly, based on the limiting slope ideas of the previous section. Then we see how to compute some simple derivatives.
Let us now generalise what we did in the last section so as to find “the slope of the curve \(y=f(x)\) at \((x_0,y_0)\)” for any smooth enough 1
The idea of “smooth enough” can be made quite precise. Indeed the word “smooth” has a very precise meaning in mathematics, which we won’t cover here. For now think of “smooth” as meaning roughly just “smooth”.
As before, let \((x_0,y_0)\) be any point on the curve \(y=f(x)\text{.}\) So we must have \(y_0=f(x_0)\text{.}\) Now let \((x_1,y_1)\) be any other point on the same curve. So \(y_1=f(x_1)\) and \(x_1\ne x_0\text{.}\) Think of \((x_1,y_1)\) as being pretty close to \((x_0,y_0)\) so that the difference
\begin{gather*}
\De x=x_1-x_0
\end{gather*}
in \(x\)–coordinates is pretty small. In terms of this \(\De x\) we have
Again the term “reasonably smooth” can be made more precise.
, then as \(x_1\) approaches \(x_0\text{,}\) i.e. as \(\De x\) approaches \(0\text{,}\) we would expect the secant through \((x_0,y_0)\) and \((x_1,y_1)\) to approach the tangent line to the curve \(y=f(x)\) at \((x_0,y_0)\text{,}\) just as happened in Figure 2.1.6. And more importantly, the slope of the secant through \((x_0,y_0)\) and \((x_1,y_1)\) should approach the slope of the tangent line to the curve \(y=f(x)\) at \((x_0,y_0)\text{.}\)
When we talk of the “slope of the curve” at a point, what we really mean is the slope of the tangent line to the curve at that point. So “the slope of the curve \(y=f(x)\) at \((x_0,y_0)\)” is also the limit 4
This is of course under the assumption that the limit exists — we will talk more about that below.
expressed in the above equation. The derivative of \(f(x)\) at \(x=x_0\) is also defined to be this limit. Which leads 5
We will rename “\(x_0\)” to “\(a\)” and “\(\De x\)” to “\(h\)”.
When the above limit exists, the function \(f(x)\) is said to be differentiable at \(x=a\text{.}\) When the limit does not exist, the function \(f(x)\) is said to be not differentiable at \(x=a\text{.}\)
To see that these two definitions are the same, we set \(x=a+h\) and then the limit as \(h\) goes to \(0\) is equivalent to the limit as \(x\) goes to \(a\text{.}\)
Lets now compute the derivatives of some very simple functions. This is our first step towards building up a toolbox for computing derivatives of complicated functions — this process will very much parallel what we did in Chapter 1 with limits. The two simplest functions we know are \(f(x)=c\) and \(g(x)=x\text{.}\)
Again, we compute the derivative of \(g\) by just substituting the function of interest into the formal definition of the derivative and then evaluating the resulting limit.
To ratchet up the difficulty a little bit more, let us redo the example we have already done a few times \(f(x)=x^2\text{.}\) To make it a little more interesting let’s change the names of the function and the variable so that it is not exactly the same as Examples 2.1.2 and 2.1.5.
This function isn’t quite like the ones we saw earlier — it’s a function of \(t\) rather than \(x\text{.}\) Recall that a function is a rule which assigns to each input value an output value. So far, we have usually called the input value \(x\text{.}\) But this “\(x\)” is just a dummy variable representing a generic input value. There is nothing wrong with calling a generic input value \(t\) instead. Indeed, from time to time you will see functions that are not written as formulas involving \(x\text{,}\) but instead are written as formulas in \(t\) (for example representing time — see Section 1.2), or \(z\) (for example representing height), or other symbols.
But there is a problem — “\(h\)” plays two roles here — it is both the function name and the small quantity that is going to zero in our limit. It is extremely dangerous to have a symbol represent two different things in a single computation. We need to change one of them. So let’s rename the small quantity that is going to zero in our limit from “\(h\)” to “\(\De t\)”:
Subsection2.2.1An Important Point (and Some Notation)
Notice here that the answer we get depends on our choice of \(a\) — if we want to know the derivative at \(a=3\) we can just substitute \(a=3\) into our answer \(2a\) to get the slope is 6. If we want to know at \(a=1\) (like at the end of Section 1.1) we substitute \(a=1\) and get the slope is 2. The important thing here is that we can move from the derivative being computed at a specific point to the derivative being a function itself — input any value of \(a\) and it returns the slope of the tangent line to the curve at the point \(x=a\text{,}\)\(y=h(a)\text{.}\) The variable \(a\) is a dummy variable. We can rename \(a\) to anything we want, like \(x\text{,}\) for example. So we can replace every \(a\) in
\begin{align*}
h'(a)&=2a &\text{ by $x$, giving} && h'(x) &=2x
\end{align*}
where all we have done is replaced the symbol \(a\) by the symbol \(x\text{.}\)
Note that we will sometimes be a little sloppy with our discussions and simply write “\(f\) is differentiable” to mean “\(f\) is differentiable on an interval we are interested in” or “\(f\) is differentiable everywhere”.
Notice that the original function \(f(x)=\frac{1}{x}\) was not defined at \(x=0\) and the derivative is also not defined at \(x=0\text{.}\) This does happen more generally — if \(f(x)\) is not defined at a particular point \(x=a\text{,}\) then the derivative will not exist at that point either.
As we noted at the beginning of the chapter, the derivative was discovered independently by Newton and Leibniz in the late \(17^{\rm th}\) century. Because their discoveries were independent, Newton and Leibniz did not have exactly the same notation. Stemming from this, and from the many different contexts in which derivatives are used, there are quite a few alternate notations for the derivative:
We will generally use the first three, but you should recognise them all. The notation \(f'(a)\) is due to Lagrange, while the notation \(\diff{f}{x}(a)\) is due to Leibniz. They are both very useful. Neither can be considered “better”.
Leibniz notation writes the derivative as a “fraction” — however it is definitely not a fraction and should not be thought of in that way. It is just shorthand, which is read as “the derivative of \(f\) with respect to \(x\)”.
Similarly you read \(\diff{f}{x}(a)\) as “dee–\(f\)–dee–\(x\) at \(a\)”, and \(\diff{ }{x}f(x)|_{x=a}\) as “dee-by-dee-\(x\) of \(f\) of \(x\) at \(x\) equals \(a\)”.
At this point we could try to start working out how derivatives interact with arithmetic and make an “Arithmetic of derivatives” theorem just like the one we saw for limits (Theorem 1.4.3). We will get there shortly, but before that it is important that we become more comfortable with computing derivatives using limits and then understanding what the derivative actually means. So — more examples.
As \(x\) tends to \(a\text{,}\) the numerator and denominator both tend to zero. But \(\tfrac{0}{0}\) is not defined. So to get a well defined limit we need to exhibit a cancellation between the numerator and denominator — just as we saw in Examples 1.4.12 and 1.4.17. Now there are two equivalent ways to proceed from here, both based on a similar “trick”.
For the first, review Example 1.4.17, which concerned taking a limit involving square-roots, and recall that we used “multiplication by the conjugate” there:
Alternatively, we can arrive at \(\frac{\sqrt{x}-\sqrt{a}}{x-a}=\frac{1}{\sqrt{x}+\sqrt{a}}\) by using almost the same trick to factor the denominator. Just set \(A=\sqrt{x}\) and \(B=\sqrt{a}\) in \(A^2 - B^2 = (A-B)(A+B) \) to get
\begin{align*}
x - a &= (\sqrt{x}-\sqrt{a})(\sqrt{x}+\sqrt{a})
\end{align*}
and then substitute this little fact into our expression
\begin{align*}
\frac{\sqrt{x}-\sqrt{a}}{x-a}
&=\frac{\sqrt{x}-\sqrt{a}}{(\sqrt{x}-\sqrt{a})(\sqrt{x}+\sqrt{a})}
& \text{(now cancel common factors)}\\
&=\frac{1}{(\sqrt{x}+\sqrt{a})}
\end{align*}
We should think about the domain of \(f'\) here — that is, for which values of \(a\) is \(f'(a)\) defined? The original function \(f(x)\) was defined for all \(x \geq 0\text{,}\) however the derivative \(f'(a)=\frac{1}{2\sqrt{a}}\) is undefined at \(a = 0\text{.}\)
If we draw a careful picture of \(\sqrt{x}\) around \(x=0\) we can see why this has to be the case. The figure below shows three different tangent lines to the graph of \(y=f(x)=\sqrt{x}\text{.}\) As the point of tangency moves closer and closer to the origin, the tangent line gets steeper and steeper. The slope of the tangent line at \(\big(a,\sqrt{a}\big)\) blows up as \(a\to 0\text{.}\)
Since \(x \gt 0\) and we are interested in the behaviour of this function as \(h \to 0\) we can assume \(h\) is much smaller than \(x\text{.}\) This means \(x+h \gt 0\) and so \(|x+h|=x+h\text{.}\)
Since \(x \lt 0\) and we are interested in the behaviour of this function as \(h \to 0\) we can assume \(h\) is much smaller than \(x\text{.}\) This means \(x+h \lt 0\) and so \(|x+h|=-(x+h)\text{.}\)
According to Definition 2.2.1, the derivative \(f'(a)\) exists precisely when the limit \(\lim\limits_{x\rightarrow a} \frac{f(x)-f(a)}{x-a}\) exists. That limit is also the slope of the tangent line to the curve \(y=f(x)\) at \(x=a\text{.}\) That limit does not exist when the curve \(y=f(x)\) does not have a tangent line at \(x=a\) or when the curve does have a tangent line, but the tangent line has infinite slope. We have already seen some examples of this.
In Example 2.2.7, we considered the function \(f(x)=\frac{1}{x}\text{.}\) This function “blows up” (i.e. becomes infinite) at \(x=0\text{.}\) It does not have a tangent line at \(x=0\) and its derivative does not exist at \(x=0\text{.}\)
In Example 2.2.10, we considered the function \(f(x)=|x|\text{.}\) This function does not have a tangent line at \(x=0\text{,}\) because there is a sharp corner in the graph of \(y=|x|\) at \(x=0\text{.}\) (Look at the graph in Example 2.2.10.) So the derivative of \(f(x)=|x|\) does not exist at \(x=0\text{.}\)
blows up. The same sort of computation shows that \(f'(a)\) cannot possibly exist whenever the function \(f\) is not continuous at \(a\text{.}\) We will formalize, and prove, this statement in Theorem 2.2.14, below.
Visually, it looks like the function \(f(x) = x^{1/3}\text{,}\) sketched below, (this might be a good point to recall that cube roots of negative numbers are negative — for example, since \((-1)^3=-1\text{,}\) the cube root of \(-1\) is \(-1\)),
We have already considered the derivative of the function \(\sqrt{x}\) in Example 2.2.9. We’ll now look at the function \(f(x) = \sqrt{|x|}\text{.}\) Recall, from Example 2.2.10, the definition of \(|x|\text{.}\)
When \(x \gt 0\text{,}\) we have \(|x|=x\) and \(f(x)\) is identical to \(\sqrt{x}\text{.}\) When \(x \lt 0\text{,}\) we have \(|x|=-x\) and \(f(x)=\sqrt{-x}\text{.}\) So to graph \(y=\sqrt{|x|}\) when \(x \lt 0\text{,}\) you just have to graph \(y=\sqrt{x}\) for \(x \gt 0\) and then send \(x\rightarrow -x\) — i.e. reflect the graph in the \(y\)–axis. Here is the graph.
The pointy thing at the origin is called a cusp. The graph of \(y=f(x)\) does not have a tangent line at \((0,0)\) and, correspondingly, \(f'(0)\) does not exist because
The function \(f(x)\) is continuous at \(x=a\) if and only if the limit of
\begin{gather*}
f(a+h) - f(a) = \frac{f(a+h)-f(a)}{h}\ h
\end{gather*}
as \(h\rightarrow 0\) exists and is zero. But if \(f(x)\) is differentiable at \(x=a\text{,}\) then, as \(h\rightarrow 0\text{,}\) the first factor, \(\frac{f(a+h)-f(a)}{h}\) converges to \(f'(a)\) and the second factor, \(h\text{,}\) converges to zero. So the product provision of our arithmetic of limits Theorem 1.4.3 implies that the product \(\frac{f(a+h)-f(a)}{h}\ h\) converges to \(f'(a)\cdot 0=0\) too.
Remark: In the text, you have already learned the derivatives of \(x^2\) and \(ax+b\text{.}\) In this question, you are only asked to find the values of \(a\) and \(b\)—not to justify how you got them—so you don’t have to use the definition of the derivative. However, on an exam, you might be asked to justify your answer, in which case you would show how to differentiate the two branches of \(f(x)\) using the definition of a derivative.
Let \(p(x)=f(x)+g(x)\text{,}\) for some functions \(f\) and \(g\) whose derivatives exist. Use limit laws and the definition of a derivative to show that \(p'(x)=f'(x)+g'(x)\text{.}\)
There are two distinct straight lines that pass through the point \((1,-3)\) and are tangent to the curve \(y = x^2\text{.}\) Find equations for these two lines.