## Section 4.1 The derivative

*Note: 1 lecture*

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.

### Subsection 4.1.1 Definition and basic properties

#### Definition 4.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

exists, then we say \(f\) is *differentiable* at \(c\text{,}\) that \(L\) is the *derivative* of \(f\) at \(c\text{,}\) and write \(f'(c) := 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.

#### Example 4.1.2.

Let \(f(x) := x^2\) defined on the whole real line. Let \(c \in \R\) be arbitrary. We find that if \(x \not=c\text{,}\)

Therefore,

#### Example 4.1.3.

Let \(f(x) := ax + b\) for numbers \(a, b \in \R\text{.}\) Let \(c \in \R\) be arbitrary. For \(x \not=c\text{,}\)

Therefore,

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.

#### Example 4.1.4.

The function \(f(x) := \sqrt{x}\) is differentiable for \(x > 0\text{.}\) To see this fact, fix \(c > 0\text{,}\) and take \(x \not= c\text{,}\) \(x > 0\text{.}\) Compute

Therefore,

#### Example 4.1.5.

The function \(f(x) := \abs{x}\) is not differentiable at the origin. When \(x > 0\text{,}\)

When \(x < 0\text{,}\)

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.

#### Proposition 4.1.6.

Let \(f \colon I \to \R\) be differentiable at \(c \in I\text{,}\) then it is continuous at \(c\text{.}\)

#### Proof.

We know the limits

exist. Furthermore,

Therefore, the limit of \(f(x)-f(c)\) exists and

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.

#### Proposition 4.1.7.

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) := \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) := f(x) + g(x)\text{.}\) Then \(h\) is differentiable at \(c\) and \(h'(c) = f'(c) + g'(c)\text{.}\)

#### Proof.

First, let \(h(x) := \alpha f(x)\text{.}\) For \(x \in I\text{,}\) \(x \not= c\text{,}\)

The limit as \(x\) goes to \(c\) exists on the right-hand side by Corollary 3.1.12. We get

Therefore, \(h\) is differentiable at \(c\text{,}\) and the derivative is computed as given.

Next, define \(h(x) := f(x)+g(x)\text{.}\) For \(x \in I\text{,}\) \(x \not= c\text{,}\) we have

The limit as \(x\) goes to \(c\) exists on the right-hand side by Corollary 3.1.12. We get

Therefore, \(h\) is differentiable at \(c\text{,}\) and the derivative is computed as given.

It is not true that the derivative of a multiple of two functions is the multiple of the derivatives. Instead we get the so-called *product rule* or the *Leibniz rule*^{ 1 }.

#### Proposition 4.1.8. Product rule.

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

then \(h\) is differentiable at \(c\) and

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.

#### Proposition 4.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

then \(h\) is differentiable at \(c\) and

Again, the proof is left as an exercise.

### Subsection 4.1.2 Chain rule

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.

#### Proposition 4.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

then \(h\) is differentiable at \(c\) and

#### Proof.

Let \(d := g(c)\text{.}\) Define \(u \colon I_2 \to \R\) and \(v \colon I_1 \to \R\) by

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{,}\)

Plug in to obtain

Therefore, if \(x \not= c\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 the limit is \(f'\bigl(g(c)\bigr)g'(c)\text{.}\)

### Subsection 4.1.3 Exercises

#### Exercise 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{.}\)

#### Exercise 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.

#### Exercise 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.

#### Exercise 4.1.4.

Prove that a polynomial is differentiable and find the derivative. Hint: Use the previous exercise.

#### Exercise 4.1.5.

Define \(f \colon \R \to \R\) by

Prove that \(f\) is differentiable at \(0\text{,}\) but discontinuous at all points except \(0\text{.}\)

#### Exercise 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{.}\)

#### Exercise 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.

#### Exercise 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) := {\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{.}\)

#### Exercise 4.1.9.

Suppose \(f \colon \R \to \R\) is a differentiable Lipschitz continuous function. Prove that \(f'\) is a bounded function.

#### Exercise 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)\)).

#### Exercise 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) := f(x) g(x)\) is differentiable at \(c\text{.}\) Hint: You cannot apply the product rule.

#### Exercise 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{.}\)

#### Exercise 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) := {\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) := {\bigl( f(x) \bigr)}^2\) is not differentiable at the origin.

#### Exercise 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{.}\)

#### Exercise 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

#### Exercise 4.1.16.

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{.}\)

^{ 2 }(1646–1716).

`https://en.wikipedia.org/wiki/Leibniz`