The idea of a derivative is the following. If the graph of a function looks locally like a straight line, then we can then talk about the slope of this line. The slope tells us the rate at which the value of the function is changing at that particular point. Of course, we are leaving out any function that has corners or discontinuities. Let us be precise.
Subsection4.1.1Definition and basic properties
Definition4.1.1.
Let \(I\) be an interval, let \(f \colon I \to \R\) be a function, and let \(c \in I\text{.}\) If the limit
\begin{equation*}
L \coloneqq \lim_{x \to c} \frac{f(x)-f(c)}{x-c}
\end{equation*}
exists, then we say \(f\) is differentiable at \(c\text{,}\) we call \(L\) the derivative of \(f\) at \(c\text{,}\) and we write \(f'(c) \coloneqq L\text{.}\)
If \(f\) is differentiable at all \(c \in I\text{,}\) then we simply say that \(f\) is differentiable, and then we obtain a function \(f' \colon I \to \R\text{.}\) The derivative is sometimes written as \(\frac{df}{dx}\) or \(\frac{d}{dx}\bigl( f(x) \bigr)\text{.}\)
The expression \(\frac{f(x)-f(c)}{x-c}\) is called the difference quotient.
The graphical interpretation of the derivative is depicted in Figure 4.1. The left-hand plot gives the line through \(\bigl(c,f(c)\bigr)\) and \(\bigl(x,f(x)\bigr)\) with slope \(\frac{f(x)-f(c)}{x-c}\text{,}\) that is, the so-called secant line. When we take the limit as \(x\) goes to \(c\text{,}\) we get the right-hand plot, where we see that the derivative of the function at the point \(c\) is the slope of the line tangent to the graph of \(f\) at the point \(\bigl(c,f(c)\bigr)\text{.}\)
We allow \(I\) to be a closed interval and we allow \(c\) to be an endpoint of \(I\text{.}\) Some calculus books do not allow \(c\) to be an endpoint of an interval, but all the theory still works by allowing it, and it makes our work easier.
Example4.1.2.
Let \(f(x) \coloneqq x^2\) defined on the whole real line. Let \(c \in \R\) be arbitrary. We find that if \(x \not=c\text{,}\)
Let \(f(x) \coloneqq ax + b\) for numbers \(a, b \in \R\text{.}\) Let \(c \in \R\) be arbitrary. For \(x \not=c\text{,}\)
\begin{equation*}
\frac{f(x)-f(c)}{x-c} =
\frac{a(x-c)}{x-c} = a .
\end{equation*}
Therefore,
\begin{equation*}
f'(c) =
\lim_{x\to c}
\frac{f(x)-f(c)}{x-c} =
\lim_{x\to c}
a = a.
\end{equation*}
In fact, every differentiable function “infinitesimally” behaves like the affine function \(ax + b\text{.}\) You can guess many results and formulas for derivatives, if you work them out for affine functions first.
Example4.1.4.
The function \(f(x) \coloneqq \sqrt{x}\) is differentiable for \(x > 0\text{.}\) To see this fact, fix \(c > 0\text{,}\) and suppose \(x \not= c\) and \(x > 0\text{.}\) Compute
A famous example of Weierstrass shows that there exists a continuous function that is not differentiable at any point. The construction of this function is beyond the scope of this chapter. On the other hand, a differentiable function is always continuous.
Proposition4.1.6.
Let \(f \colon I \to \R\) be differentiable at \(c \in I\text{,}\) then it is continuous at \(c\text{.}\)
Hence \(\lim\limits_{x\to c} f(x) = f(c)\text{,}\) and \(f\) is continuous at \(c\text{.}\)
An important property of the derivative is linearity. The derivative is the approximation of a function by a straight line. The slope of a line through two points changes linearly when the \(y\)-coordinates are changed linearly. By taking the limit, it makes sense that the derivative is linear.
Proposition4.1.7.Linearity.
Let \(I\) be an interval, let \(f \colon I \to \R\) and \(g \colon I \to \R\) be differentiable at \(c \in I\text{,}\) and let \(\alpha \in \R\text{.}\)
Define \(h \colon I \to \R\) by \(h(x) \coloneqq \alpha f(x)\text{.}\) Then \(h\) is differentiable at \(c\) and \(h'(c) = \alpha f'(c)\text{.}\)
Define \(h \colon I \to \R\) by \(h(x) \coloneqq f(x) + g(x)\text{.}\) Then \(h\) is differentiable at \(c\) and \(h'(c) = f'(c) + g'(c)\text{.}\)
Proof.
First, let \(h(x) \coloneqq \alpha f(x)\text{.}\) For \(x \in I\text{,}\)\(x \not= c\text{,}\)
Therefore, \(h\) is differentiable at \(c\text{,}\) and the derivative is computed as given.
It is not true that the derivative of a product of two functions is the product of the derivatives. Instead we get the so-called product rule or the Leibniz rule 1
Let \(I\) be an interval, let \(f \colon I \to \R\) and \(g \colon I \to \R\) be functions differentiable at \(c\text{.}\) If \(h \colon I \to \R\) is defined by
The proof of the product rule is left as an exercise. The key to the proof is the identity \(f(x) g(x) - f(c) g(c) =
f(x)\bigl( g(x) - g(c) \bigr)
+ \bigl( f(x) - f(c) \bigr) g(c)\text{,}\) which is illustrated in Figure 4.2.
Proposition4.1.9.Quotient rule.
Let \(I\) be an interval, let \(f \colon I \to \R\) and \(g \colon I \to \R\) be differentiable at \(c\) and \(g(x) \not= 0\) for all \(x \in I\text{.}\) If \(h \colon I \to \R\) is defined by
More complicated functions are often obtained by composition, which is differentiated via the chain rule. The rule also tells us how a derivative changes if we change variables.
Proposition4.1.10.Chain rule.
Let \(I_1, I_2\) be intervals, let \(g \colon I_1 \to I_2\) be differentiable at \(c \in I_1\text{,}\) and \(f \colon I_2 \to \R\) be differentiable at \(g(c)\text{.}\) If \(h \colon I_1 \to \R\) is defined by
Let \(d \coloneqq g(c)\text{.}\) Define \(u \colon I_2 \to \R\) and \(v \colon I_1 \to \R\) by
\begin{equation*}
u(y) \coloneqq
\begin{cases}
\frac{f(y) - f(d)}{y-d} & \text{if } y \not=d, \\
f'(d) & \text{if } y = d,
\end{cases}
\qquad
v(x) \coloneqq
\begin{cases}
\frac{g(x) - g(c)}{x-c} & \text{if } x \not=c, \\
g'(c) & \text{if } x = c.
\end{cases}
\end{equation*}
Because \(f\) is differentiable at \(d = g(c)\text{,}\) we find that \(u\) is continuous at \(d\text{.}\) Similarly, \(v\) is continuous at \(c\text{.}\) For any \(x\) and \(y\text{,}\)
By continuity of \(u\) and \(v\) at \(d\) and \(c\) respectively, we find \(\lim_{y \to d} u(y)
= f'(d) = f'\bigl(g(c)\bigr)\) and \(\lim_{x \to c} v(x) = g'(c)\text{.}\) The function \(g\) is continuous at \(c\text{,}\) and so \(\lim_{x \to c} g(x) = g(c)\text{.}\) Hence the limit of the right-hand side of (4.1) as \(x\) goes to \(c\) exists and is equal to \(f'\bigl(g(c)\bigr) g'(c)\text{.}\) Thus \(h\) is differentiable at \(c\) and \(h'(c) = f'\bigl(g(c)\bigr)g'(c)\text{.}\)
Exercises4.1.3Exercises
4.1.1.
Prove the product rule. Hint: Prove and use \(f(x) g(x) - f(c) g(c) = f(x)\bigl( g(x) - g(c) \bigr) + \bigl( f(x) -
f(c) \bigr) g(c)\text{.}\)
4.1.2.
Prove the quotient rule. Hint: You can do this directly, but it may be easier to find the derivative of \(\nicefrac{1}{x}\) and then use the chain rule and the product rule.
4.1.3.
For \(n \in \Z\text{,}\) prove that \(x^n\) is differentiable and find the derivative, unless, of course, \(n < 0\) and \(x=0\text{.}\) Hint: Use the product rule.
4.1.4.
Prove that a polynomial is differentiable and find the derivative. Hint: Use the previous exercise.
Prove that \(f\) is differentiable at \(0\text{,}\) but discontinuous at all points except \(0\text{.}\)
4.1.6.
Assume the inequality \(\abs{x-\sin(x)} \leq x^2\text{.}\) Prove that \(\sin\) is differentiable at \(0\text{,}\) and find the derivative at \(0\text{.}\)
4.1.7.
Using the previous exercise, prove that \(\sin\) is differentiable at all \(x\) and that the derivative is \(\cos(x)\text{.}\) Hint: Use the sum-to-product trigonometric identity as we did before.
4.1.8.
Let \(f \colon I \to \R\) be differentiable. For \(n \in \Z\text{,}\) let \(f^n\) be the function defined by \(f^n(x) \coloneqq {\bigl( f(x) \bigr)}^n\text{.}\) If \(n < 0\text{,}\) assume \(f(x) \not= 0\) for all \(x \in I\text{.}\) Prove that \((f^n)'(x) = n {\bigl(f(x) \bigr)}^{n-1} f'(x)\text{.}\)
4.1.9.
Suppose \(f \colon \R \to \R\) is a differentiable Lipschitz continuous function. Prove that \(f'\) is a bounded function.
4.1.10.
Let \(I_1, I_2\) be intervals. Let \(f \colon I_1 \to I_2\) be a bijective function and \(g \colon I_2 \to I_1\) be the inverse. Suppose that both \(f\) is differentiable at \(c \in I_1\) and \(f'(c) \not=0\) and \(g\) is differentiable at \(f(c)\text{.}\) Use the chain rule to find a formula for \(g'\bigl(f(c)\bigr)\) (in terms of \(f'(c)\)).
4.1.11.
Suppose \(f \colon I \to \R\) is bounded, \(g \colon I \to
\R\) is differentiable at \(c \in I\text{,}\) and \(g(c) = g'(c) = 0\text{.}\) Show that \(h(x) \coloneqq f(x) g(x)\) is differentiable at \(c\text{.}\) Hint: You cannot apply the product rule.
4.1.12.
Suppose \(f \colon I \to \R\text{,}\)\(g \colon I \to \R\text{,}\) and \(h \colon I \to \R\text{,}\) are functions. Suppose \(c \in I\) is such that \(f(c) = g(c) = h(c)\text{,}\)\(g\) and \(h\) are differentiable at \(c\text{,}\) and \(g'(c) = h'(c)\text{.}\) Furthermore suppose \(h(x) \leq f(x) \leq g(x)\) for all \(x \in I\text{.}\) Prove \(f\) is differentiable at \(c\) and \(f'(c) = g'(c) =
h'(c)\text{.}\)
4.1.13.
Suppose \(f \colon (-1,1) \to \R\) is a function such that \(f(x) = x h(x)\) for a bounded function \(h\text{.}\)
Show that \(g(x) \coloneqq {\bigl( f(x) \bigr)}^2\) is differentiable at the origin and \(g'(0) = 0\text{.}\)
Find an example of a continuous function \(f \colon (-1,1) \to \R\) with \(f(0) = 0\text{,}\) but such that \(g(x) \coloneqq {\bigl( f(x) \bigr)}^2\) is not differentiable at the origin.
4.1.14.
Suppose \(f \colon I \to \R\) is differentiable at \(c \in I\text{.}\) Prove there exist numbers \(a\) and \(b\) with the property that for every \(\epsilon > 0\text{,}\) there is a \(\delta > 0\text{,}\) such that \(\abs{a+b(x-c) - f(x)} \leq \epsilon \abs{x-c}\text{,}\) whenever \(x \in I\) and \(\abs{x-c} < \delta\text{.}\) In other words, show that there exists a function \(g \colon I \to \R\) such that \(\lim_{x\to c} g(x) = 0\) and \(\abs{a+b(x-c) - f(x)} = g(x) \abs{x-c}\text{.}\)
4.1.15.
Prove the following simple version of L’Hôpital’s rule. Suppose \(f \colon (a,b) \to \R\) and \(g \colon (a,b) \to \R\) are differentiable functions whose derivatives \(f'\) and \(g'\) are continuous functions. Suppose that at \(c \in (a,b)\text{,}\)\(f(c) = 0\text{,}\)\(g(c)=0\text{,}\)\(g'(x) \not= 0\) for all \(x \in (a,b)\text{,}\) and \(g(x) \not= 0\) whenever \(x \not= c\text{.}\) Note that the limit of \(\nicefrac{f'(x)}{g'(x)}\) as \(x\) goes to \(c\) exists. Show that
Suppose \(f \colon (a,b) \to \R\) is differentiable at \(c \in (a,b)\text{,}\)\(f(c)=0\text{,}\) and \(f'(c) > 0\text{.}\) Prove that there is a \(\delta > 0\) such that \(f(x) < 0\) whenever \(c-\delta < x < c\) and \(f(x) > 0\) whenever \(c < x < c+\delta\text{.}\)
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf