2.7. Differentiable FunctionsΒΆ

We continue our discussion on real functions and focus on a special class of functions which are differentiable.

Definition 2.78 (Differentiable function)

A real function f:R→R is differentiable at an interior point x=a of its domain domf if the difference quotient

f(x)βˆ’f(a)xβˆ’a,xβ‰ a

approaches a limit as x approaches a.

If f is differentiable at x=a, the limit is called the derivative of f at x=a and is denoted by fβ€²(a); thus,

fβ€²(a)=limxβ†’af(x)βˆ’f(a)xβˆ’a.

An alternative way is to write x as x=a+h and define fβ€²(a) as:

fβ€²(a)=limhβ†’0f(a+h)βˆ’f(a)h.

Notes

  • The difference quotient is not defined at x=a. This is okay as computing the limit limxβ†’ag(x) doesn’t require g to be defined at x=a.

  • The derivative is not defined for the non-interior points of domf. Only one sided limits may be computed at the non-interior points on the difference quotient.

  • We can treat fβ€² as a function from R to R where fβ€² is defined only on points at which f is differentiable.

  • The type signature for fβ€² is fβ€²:Rβ†’R.

  • The domain of fβ€² denoted by domfβ€² is the set of points at which f is differentiable.

Remark 2.17 (Domain of the derivative function)

The domain of the derivative of a function f; i.e., the set of points at which the derivative exists (or is defined) is a subset of the interior of the domain of the function f itself.

domfβ€²βŠ†intdomf.

Definition 2.79 (Differentiable function)

Let f be defined on an open set A. We say that f is differentiable on A if f is differentiable at every point in A.

If f is differentiable on (open) A, then fβ€² is defined on A. In other words: domfβ€²=A.

Definition 2.80 (Continuously differentiable function)

We say that f is continuously differentiable on an open set A if f is differentiable on A and fβ€² is continuous on A.

Definition 2.81 (Second and n-th derivatives)

If f is differentiable on a neighborhood of x=a and fβ€² is differentiable at x=a, we denote the derivative of fβ€² at x=a by fβ€³(a) and call it the second derivative of f at x=a. Another notation for the second derivative is f(2)(a).

Inductively, if f(nβˆ’1) is defined on a neighborhood of x=a and f(nβˆ’1) is differentiable at x=a, then the n-th derivative of f at x=a, denoted by f(n)(a), is the derivative of f(nβˆ’1) at x=a.

The zeroth derivative of f is defined to be f itself.

f(0)=f.

Another common notation is:

dfdx=fβ€² and dnfdxn=f(n).

Definition 2.82 (Tangent line)

If f is differentiable at x=a, then the tangent to f at x=a can be given by:

T(x)=f(a)+fβ€²(a)(xβˆ’a).

It is useful to remove the contribution of the tangent in f and study the remaining part of f.

Lemma 2.1 (Removal of tangent line from function)

If f is differentiable at x=a, then we can write f as:

(2.1)ΒΆf(x)=f(a)+[fβ€²(a)+E(x)](xβˆ’a)

where E is defined in the neighborhood of x=a and

limx→aE(x)=E(a)=0.

In other words, E is continuous at x=a.

Proof. We define E as:

E(x)={f(x)βˆ’f(a)xβˆ’aβˆ’fβ€²(a),x∈domf and xβ‰ a0,x=a.

This E meets the requirements of (2.1). Note that E is continuous at x=a as limx→aE(x)=E(a)=0.

We note that:

f(x)βˆ’T(x)=E(x)(xβˆ’a).

Alternatively

f(x)=T(x)+E(x)(xβˆ’a).

Remark 2.18 (Difference quotient and derivative)

At x≠a, (2.1) can also be written as:

f(x)βˆ’f(a)xβˆ’a=fβ€²(a)+E(x).

In other words, the difference quotient f(x)βˆ’f(a)xβˆ’a is the sum of the derivative fβ€²(a) and E(x).

Theorem 2.47 (Differentiability implies continuity)

If f is differentiable at x=a, then f is continuous at x=a.

Proof. Using Definition 2.82 and Lemma 2.1, we have:

f(x)=T(x)+E(x)(xβˆ’a).

It is easy to see that E(x) and T(x) are both continuous at x=a. Thus, f is continuous at x=a.

Notes:

  1. If f is not continuous at x=a then f is not differentiable at x=a.

  2. Continuity is a necessary condition but not sufficient condition for differentiability.

Remark 2.19 (Derivative sign and monotonicity in the neighborhood)

If f is differentiable at x=a, and fβ€²(a)β‰ 0, then there is Ξ΄>0 such that if fβ€²(a)>0, then

sgn(f(x)βˆ’f(a))=sgn(xβˆ’a)βˆ€|xβˆ’a|<Ξ΄

and if fβ€²(a)<0, then

sgn(f(x)βˆ’f(a))=sgn(aβˆ’x)βˆ€|xβˆ’a|<Ξ΄.

Proof. We have, from Lemma 2.1, for x≠a:

f(x)βˆ’f(a)xβˆ’a=fβ€²(a)+E(x).

Assume fβ€²(a)β‰ 0. Then |fβ€²(a)|>0. Since E is continuous at a, with Ο΅=|fβ€²(a)|>0, there exists Ξ΄>0 such that

|E(x)βˆ’E(a)|=|E(x)|<Ο΅=|fβ€²(a)| whenever |xβˆ’a|<Ξ΄.

Thus,

sgn(fβ€²(a)+E(x))=sgn(fβ€²(a))βˆ€|xβˆ’a|<Ξ΄.

Thus,

sgn(f(x)βˆ’f(a)xβˆ’a)=sgn(fβ€²(a))βˆ€|xβˆ’a|<Ξ΄.

Now, if fβ€²(a)>0, then

sgn(f(x)βˆ’f(a))=sgn(xβˆ’a)βˆ€|xβˆ’a|<Ξ΄.

If fβ€²(a)<0, then

sgn(f(x)βˆ’f(a))=βˆ’sgn(xβˆ’a)=sgn(aβˆ’x)βˆ€|xβˆ’a|<Ξ΄.

2.7.1. ArithmeticΒΆ

Theorem 2.48 (Differentiation and arithmetic )

If f and g are differentiable at x=a, then so are f+g, fβˆ’g, fg. fg is differentiable at x=a if gβ€²(a)β‰ 0. The derivatives are:

  1. (f+g)β€²(a)=fβ€²(a)+gβ€²(a).

  2. (fβˆ’g)β€²(a)=fβ€²(a)βˆ’gβ€²(a).

  3. (fg)β€²(a)=fβ€²(a)g(a)+f(a)gβ€²(a).

  4. (fg)β€²(a)=fβ€²(a)g(a)βˆ’f(a)gβ€²(a)[gβ€²(a)]2 provided gβ€²(a)β‰ 0.

2.7.2. The Chain RuleΒΆ

Theorem 2.49 (The chain rule)

Let f be differentiable at x=a. Assume that g is differentiable at f(a). Then the composite function given by h=g∘f is differentiable at f(a) with

hβ€²(a)=gβ€²(f(a))fβ€²(a).

Proof. Let b=f(a). Since g is differentiable at b, we can write g as (Lemma 2.1):

g(t)=g(b)+[gβ€²(b)+E(t)](tβˆ’b)

where E is continuous in the neighborhood of t=b and limt→bE(t)=E(b)=0. Thus,

g(t)βˆ’g(b)=[gβ€²(b)+E(t)](tβˆ’b).

Putting t=f(x), we get:

g(f(x))βˆ’g(f(a))=[gβ€²(f(a))+E(f(x))][f(x)βˆ’f(a)].

Since h(x)=g(f(x)), we get:

h(x)βˆ’h(a)=[gβ€²(f(a))+E(f(x))][f(x)βˆ’f(a)].

Dividing both sides by (xβˆ’a), we get:

h(x)βˆ’h(a)xβˆ’a=[gβ€²(f(a))+E(f(x))]f(x)βˆ’f(a)xβˆ’a.

Since f is continuous at x=a, E is continuous at t=b=f(a), and b is an interior point of domE, hence E∘f is continuous at x=a due to Theorem 2.40. Thus,

limx→aE(f(x))=E(f(a))=E(b)=0.

Therefore,

hβ€²(a)=limxβ†’ah(x)βˆ’h(a)xβˆ’a=limxβ†’a[gβ€²(f(a))+E(f(x))]limxβ†’af(x)βˆ’f(a)xβˆ’a=[gβ€²(f(a))+limxβ†’aE(f(x))]fβ€²(a)=gβ€²(f(a))fβ€²(a).

Example 2.12

Let

f(x)=1x and g(x)=sin⁑x.

Then, the composition h=g∘f is given by

h(x)=(g∘f)(x)=g(f(x))=sin⁑1x.

We have:

fβ€²(x)=βˆ’1x2 and gβ€²(x)=cos⁑x.

Thus,

hβ€²(x)=gβ€²(f(x))fβ€²(x)=(cos⁑1x)(βˆ’1x2).

2.7.3. One Sided DerivativesΒΆ

Definition 2.83 (One sided derivatives)

One sided limits of the difference quotient

f(x)βˆ’f(a)xβˆ’a,xβ‰ a

are called one-sided derivatives if they exist.

If f is defined over [a,b), then the right hand derivative is defined as:

f+β€²(a)β‰œlimxβ†’a+f(x)βˆ’f(a)xβˆ’a

if the limit exists.

If f is defined over (c,a], then the left hand derivative is defined as:

fβˆ’β€²(a)β‰œlimxβ†’aβˆ’f(x)βˆ’f(a)xβˆ’a

if the limit exists.

Remark 2.20 (Differentiability and one-sided derivatives)

A function f is differentiable at x=a if and only if its left and right hand derivatives exist and are equal. In that case:

fβˆ’β€²(a)=fβ€²(a)=f+β€²(a).

This is a direct implication of Theorem 2.36.

Remark 2.21

One sided derivative is not the same thing as one sided limit of a derivative.

  1. f+β€²(a) need not be equal to fβ€²(a+).

  2. fβˆ’β€²(a) need not be equal to fβ€²(aβˆ’).

2.7.4. Closed IntervalsΒΆ

Definition 2.84 (Differentiability on a closed interval)

We say that f is differentiable on the closed interval [a,b] if f is differentiable on the open interval (a,b) and the one sided derivatives f+β€²(a) and fβˆ’β€²(b) both exist.

We assign fβ€²(a)=f+β€²(a) and fβ€²(b)=fβˆ’β€²(b) to complete the definition of fβ€² over [a,b].

Note

While it is possible to use the notion of one sided derivatives to define fβ€² on a closed interval, this notion doesn’t generalize to multivariable calculus. The definition of derivative on an open interval (or an open subset of domf) can be easily extended to multivariable calculus.

Definition 2.85 (Continuous differentiability on a closed interval)

We say that f is continuously differentiable on the closed interval [a,b] if

  1. f is differentiable on the closed interval [a,b]

  2. fβ€² is continuous over the open interval (a,b)

  3. f+β€²(a)=fβ€²(a+).

  4. fβˆ’β€²(b)=fβ€²(bβˆ’).

2.7.5. Extreme ValuesΒΆ

Definition 2.86 (Local extreme value)

We say that f(a) is a local extreme value of f if there exists Ξ΄>0 such that f(x)βˆ’f(a) doesn’t change sign on

(aβˆ’Ξ΄,a+Ξ΄)∩domf.

More specifically,

  1. f(a) is a local maximum value of f if for some Ξ΄>0:

    f(x)β‰₯f(a)βˆ€x∈(aβˆ’Ξ΄,a+Ξ΄)∩domf.
  2. f(a) is a local minimum value of f if for some Ξ΄>0:

    f(x)β‰₯f(a)βˆ€x∈(aβˆ’Ξ΄,a+Ξ΄)∩domf.

The point x=a is called a local extreme point of f or more specifically, a local maximum or a local minimum point of f.

Theorem 2.50

If f is differentiable at a local extreme point a∈domf, then fβ€²(a)=0.

In other words, if the derivative exists at a local extreme point, it vanishes there.

Proof. We show that if fβ€²(a)β‰ 0 then a is not a local extreme point. Thus, if a is a local extreme point then fβ€²(a) must be 0.

Assume fβ€²(a)β‰ 0.

From Lemma 2.1, we have (at x≠a):

f(x)βˆ’f(a)xβˆ’a=fβ€²(a)+E(x)

where limx→aE(x)=0 and E is continuous at x=a.

Since fβ€²(a)β‰ 0, hence |fβ€²(a)|>0, hence there exists Ξ΄>0 such that

|E(x)|<|fβ€²(a)| whenever |xβˆ’a|<Ξ΄.

Thus, in the interval |xβˆ’a|<Ξ΄, the term fβ€²(a)+E(x) has the same sign as fβ€²(a).

Hence the term f(x)βˆ’f(a)xβˆ’a must not change sign in |xβˆ’a|<Ξ΄.

But the term (xβˆ’a) changes sign in |xβˆ’a|<Ξ΄. Hence, f(x)βˆ’f(a) must also change sign.

Moreover, (xβˆ’a) changes sign in every neighborhood |xβˆ’a|<Ξ΄1 with Ξ΄1>0. Hence f(x)βˆ’f(a) must also change sign in every neighborhood.

Hence there is no neighborhood of a in which f(x)βˆ’f(a) doesn’t change sign. Hence, a is not a local extreme point of f.

Definition 2.87 (Critical point)

Let f:Rβ†’R be a real function. Let a∈intdomf. If f is not differentiable at a or if f is differentiable at x=a and fβ€²(a)=0, then we say that a is a critical point of f.

Definition 2.88 (Stationary point)

If f is differentiable at x=a and fβ€²(a)=0, then we say that a is a stationary point of f.

All stationary points are critical points while all critical points need not be stationary points. If the derivative doesn’t exist at some point a∈intdomf, it could indicate a potential maximum or minimum.

Remark 2.22

All local extreme points are critical points.

Example 2.13 (A non-extreme critical point)

A critical point need not be a local extreme point. For the function f(x)=x3, fβ€²(0)=0. Thus, x=0 is a critical point. But it is not a local extreme point since f changes sign around x=0.

Theorem 2.51 (Rolle’s theorem)

Let f be continuous on the closed interval [a,b]. Assume f to be differentiable on the open interval (a,b). Further assume that f(a)=f(b). Then, fβ€²(c)=0 for some c∈(a,b).

Proof. Recall that if f is continuous on a closed interval, then f attains its maximum and minimum value on points in the interval (Theorem 2.42).

Assume

Ξ±=infa≀x≀bf(x) and Ξ²=supa≀x≀bf(x).

If Ξ±=Ξ², then f is a constant function on [a,b]. In that case, fβ€²(c)=0 for all c∈(a,b).

Consider the case where α<β. In that case, either the maximum or the minimum is attained at some point c∈(a,b) since f(a)=f(b).

  1. If α=f(a)=f(b), then β must be attained at some point in c∈(a,b).

  2. If β=f(a)=f(b), then α must be attained at some point in c∈(a,b).

  3. If neither of the above hold true, then both Ξ± and Ξ² are attained at some point in (a,b).

Since f is differentiable at c and f(c) is either maximum or minimum (i.e. a local extremum), hence fβ€²(c)=0 due to Theorem 2.50.

2.7.6. Intermediate ValuesΒΆ

Theorem 2.52 (Intermediate value theorem for derivatives)

Suppose that:

  1. f is differentiable on an open interval I.

  2. There is a closed interval [a,b]βŠ‚I.

  3. fβ€²(a)β‰ fβ€²(b).

  4. ΞΌ is in between fβ€²(a) and fβ€²(b).

Then fβ€²(c)=ΞΌ for some c∈(a,b)

Note that this result doesn’t require f to be continuously differentiable (i.e. fβ€² to be continuous).

Proof. Since f is differentiable on I, hence f is continuous on I.

Assume without loss of generality:

fβ€²(a)<ΞΌ<fβ€²(b).

Define

g(x)=f(x)βˆ’ΞΌx.

Then,

gβ€²(x)=fβ€²(x)βˆ’ΞΌ,βˆ€a≀x≀b.

Since fβ€²(a)<ΞΌ hence gβ€²(a)<0. Similarly, gβ€²(b)>0.

Since g is continuous on [a,b], hence g attains a minimum at some point c∈[a,b] (Theorem 2.42).

Now, gβ€²(a)<0 implies that there exists Ξ΄>0 such that:

g(x)<g(a)βˆ€a<x<a+Ξ΄.

Similarly,

g(x)<g(b)βˆ€bβˆ’Ξ΄<x<b.

Thus, minimum of g cannot be at a or b. Hence, c∈(a,b). Since c is a local extreme point, and g is differentiable at c, Hence gβ€²(c)=0 due to Theorem 2.50. This in turn implies that fβ€²(c)=ΞΌ.

The case of fβ€²(a)>ΞΌ>fβ€²(b) can be handled by applying the same argument to βˆ’f.

2.7.7. Mean ValuesΒΆ

Theorem 2.53 (Generalized mean value theorem)

If f and g are continuous on the closed interval [a,b] and differentiable on the open interval (a,b), then

[g(b)βˆ’g(a)]fβ€²(c)=[f(b)βˆ’f(a)]gβ€²(c)

holds true for some c∈(a,b).

Proof. Define the function:

h(x)=[g(b)βˆ’g(a)]f(x)βˆ’[f(b)βˆ’f(a)]g(x).
  1. Since f and g are continuous on [a,b], so is h.

  2. Since f and g are differentiable on (a,b) so is h.

  3. h(a)=h(b)=g(b)f(a)βˆ’f(b)g(a).

  4. Therefore, by Rolle's theorem, hβ€²(c)=0 for some c∈(a,b).

  5. But hβ€²(c)=[g(b)βˆ’g(a)]fβ€²(c)βˆ’[f(b)βˆ’f(a)]gβ€²(c).

  6. Hence the result.

Theorem 2.54 (Mean value theorem)

If f is continuous on the closed interval [a,b] and differentiable on the open interval (a,b), then

fβ€²(c)=f(b)βˆ’f(a)bβˆ’a

for some c∈(a,b).

Proof. In Theorem 2.53, let g(x)=x.

Then,

(bβˆ’a)fβ€²(c)=f(b)βˆ’f(a).

Remark 2.23

Assume f to be differentiable on some open interval (a,b). Assume x1,x2∈(a,b). We haven’t specified whether x1<x2 or x1>x2.

  1. f is continuous on the closed interval with endpoints x1 and x2.

  2. f is differentiable on the interior of this closed interval.

  3. By mean value theorem:

    (2.2)ΒΆf(x2)βˆ’f(x1)=fβ€²(c)(x2βˆ’x1)

    for some c in the open interval between x1 and x2.

Theorem 2.55

If fβ€²(x)=0 for all x∈(a,b), then f is constant on (a,b).

Proof. For any x1,x2∈(a,b), using (2.2), we get:

f(x2)βˆ’f(x1)=0.

Theorem 2.56 (No change in derivative sign implies monotonicity)

If fβ€² exists and does not change sign on (a,b), then f is monotonic on (a,b). In particular:

  1. If fβ€²(x)>0, then f is strictly increasing in (a,b).

  2. If fβ€²(x)β‰₯0, then f is increasing in (a,b).

  3. If fβ€²(x)≀0, then f is decreasing in (a,b).

  4. If fβ€²(x)<0, then f is strictly decreasing in (a,b).

Proof. Let x1,x2∈(a,b) be such that x1<x2. By mean value theorem, there exists c∈(x1,x2) such that:

f(x2)βˆ’f(x1)=fβ€²(c)(x2βˆ’x1).

Now,

  1. If fβ€²(x)>0βˆ€x∈(a,b), then f(x2)βˆ’f(x1)>0.

  2. If fβ€²(x)β‰₯0βˆ€x∈(a,b), then f(x2)βˆ’f(x1)β‰₯0.

  3. If fβ€²(x)≀0βˆ€x∈(a,b), then f(x2)βˆ’f(x1)≀0.

  4. If fβ€²(x)<0βˆ€x∈(a,b), then f(x2)βˆ’f(x1)<0.

Theorem 2.57 (Bounded derivative implies Lipschitz continuity)

If

|fβ€²(x)|≀M,βˆ€a<x<b,

then:

|f(x)βˆ’f(xβ€²)|≀M|xβˆ’xβ€²|,βˆ€x,xβ€²βˆˆ(a,b).

This is another direct implication of the mean value theorem.