Jump to content

Derivatives – "Math for Non-Geeks"

From Wikibooks, open books for an open world

The derivative f′(x) is one of the central concepts within calculus. For a given function f(x), the derivative f′(x) is another function which specifies the rate of change of f(x) in x. It is used in various scientific disciplines, basically everywhere, where there is a "rate of change" within a dynamical system. Knowing about derivatives means having a powerful tool at hand: it allows you to describe and predict rates of change in a huge variety of applications.

Intuitions of the derivative

[edit | edit source]

Te derivative is a mathematical object, which becomes useful in many situations. Depending on the situation, there are several intuitions which can make this abstract object come alive in your mind:

  • Derivative as instantaneous rate of change: The derivative corresponds to what we intuitively understand as the rate of change of a function f(x) at some instant x. A rate of change (ΔfΔx) describes how much a quantity changes (Δf) in relation to the change of some reference quantity (Δx). If we let (Δx) run to 0, we get the rate of change within an "infinitely small amount of time". An example are speeds: Consider a given time-dependent position s(t), i.e. the function f is relabeled as s and x is re-labelled as t. The quotient ΔsΔt of "travelled distance" Δx and "elapsed time" Δt just describes the "average speed". In order to get the speed v(t) at some time t, we make the time difference Δt smaller and smaller, such that the "average speed" ΔsΔt goes over to an "instantaneous speed" v(t) . This v(t) is called first derivative and mathematicians write v(t)=s′(t) .
  • Derivative as tangent slope: The derivative corresponds to the slope that the tangent of the graph has at the location of the derivative. Thus, the derivative solves the geometric problem of determining the tangent to a graph by a point.
  • Derivative as slope of the locally best linear approximation: Any function that has a derivative a point can be well approximated by a linear function in an environment around this point. The derivative corresponds to the slope of this linear function. This is useful if the function is hard to compute: the linear approximation can be computed way easier in many cases.
  • Derivative as generalised slope: How steep is a given function? At first, the concept of the "slope of a function" is only defined for linear functions. But we can use the derivative to define the "slope" also for non-linear functions.

We will discuss these intuitions in detail in the following and use them to derive a formal definition of the derivative. We will also see that derivable functions are "kink-free", which is why they are also called smooth functions (think of smoothly bending some dough or tissue).

Derivative as rate of change

[edit | edit source]

Introduction to the derivative

[edit | edit source]

The derivative corresponds to the rate of change of a function f. How can this rate of change of a function be determined or defined? Let, for example be f a real-valued function, which has the following graph:

The function f
The function f

For example, f may describe a physical quantity in relation to another quantity. For example, f(x) could correspond to the distance covered by an object at the time x. f(x) could also be the air pressure at the altitude x or the population size of a species at the time x. Now let us take the argument x~, where the function has the function value f(x~):

The function f with one argument and function value
The function f with one argument and function value

Let us assume that f(x) is the distance travelled by a car at the time x. Then the current rate of change of f at the position x~ is equal to the velocity of the car at the time x~.

It is hard to determine the velocity directly with only f(x) given. But we can estimate it. We take a point in time x1 shortly after x~ and look at the average speed in that time v=distancetime. The distance travelled in that time is f(x1)−f(x~), while the time difference is x1−x~. Thus, the car has the average speed

f(x1)−f(x~)x1−x~

This quotient, which indicates the average rate of change of the function f in the interval [x~,x1], is called difference quotient. As its name suggests, it is a quotient of two differences. In the following figure we see that this difference quotient is equal to the slope of the secant passing through the points (x~,f(x~)) and (x1,f(x1)):

The average rate of change corresponds to the slope of the secant.
The average rate of change corresponds to the slope of the secant.

This average speed is a good approximation of the current speed of our car at the time x~. It is only an approximation since the movement of the car between x~ and x1 need not be uniform - it can accelerate or decelerate. But we should get a better result if we shorten the period for calculating the average speed. So let's look at a time x2 which is even closer to x~ and determine the average speed f(x2)−f(x~)x2−x~ for the new time interval between x~ and x2:

The secant for a point closer to the derivative argument
The secant for a point closer to the derivative argument

We can shorten the time difference even further by taking a sequence (xn)n∈ℕ of times which converge towards x~. For every xn we calculate the average speed f(xn)−f(x~)xn−x~ of the car in the period from x~ to xn. The shorter xn−x~, the less the car should be able to accelerate or decelerate in this period of time. So the average speed should converge to the current speed of the car at time x~:

The secant slope (average rate of change) converges to the derivative (current rate of change).
The secant slope (average rate of change) converges to the derivative (current rate of change).
For xn→x0 , the average rate of change f(xn)−f(x0)xn−x0 converges to the current rate of change x0.

Thus, we have found a method to determine the current rate of change of f at time x~: We take any sequence of arguments (xn)n∈ℕ, which are all different from x~ and for which limn→∞xn=x~. For every xn we determine the quotient f(xn)−f(x~)xn−x~. The current rate of change is the limit of these quotients:

Rate of change of f at the argument x~=limn→∞f(xn)−f(x~)xn−x~

The derivative or f at x~ is denoted as f′(x~). So we have the mathematical definition:

f′(x~)=limn→∞f(xn)−f(x~)xn−x~

The limit of the difference quotient is sometimes also called differential quotient.

Negative time intervals

[edit | edit source]

What happens if we do not choose xn in the future, but in the past of x~? Let us draw this situation in a picture:

The average rate of change for an argument lower than the derivative argument
The average rate of change for an argument lower than the derivative argument

The average speed in the interval from xn to x~ is then equal to f(x~)−f(xn)x~−xn. If we extend this fraction by a factor of −1, we get

f(x~)−f(xn)x~−xn=−(f(x~)−f(xn))−(x~−xn)=f(xn)−f(x~)xn−x~

We get the same term as in the previous section. This gives the average speed, no matter if xn<x~ or xn>x~. Thus, in the case of a negative time interval with xn<x~ the average speed should also be close to the current speed of the car at the time x~, if xn is only sufficiently close to x~. There is

f′(x~)=limn→∞f(xn)−f(x~)xn−x~

where (xn)n∈ℕ is any sequence of different from x~ with limn→∞xn=x~. The sequence elements of (xn)n∈∈ℕ can sometimes be larger and sometimes smaller than x~ depending on the index n:

A sequence of secants for computing the derivative
A sequence of secants for computing the derivative

Refining the definition

[edit | edit source]

Let now f:D→ℝ be a real-valued function and let x~∈D. As we have seen above, there is

f′(x~)=limn→∞f(xn)−f(x~)xn−x~

where (xn)n∈ℕ is a sequence of arguments different from x~ which converges to x~. In order to have at least one such sequence of arguments, x~ must be an accumulation point of the domain D (an element is an accumulation point of a set exactly when there is a sequence not including that number but converging towards it). This may sound more complicated than it often is. In most cases D⊆ℝ is an interval and then every x~∈D is an accumulation point of D. For the definition of the differential quotient it should not matter which sequence (xn)n∈ℕ we choose. Accordingly, we can define the derivative:

Let f:D→ℝ with D⊆ℝ and let x~∈D be an accumulation point of D. The function f is differentiable at x~ with derivative f′(x~), if for every sequence (xn)n∈ℕ of arguments different from x~ and with limn→∞xn=x~ there is:
f′(x~)=limn→∞f(xn)−f(x~)xn−x~


We can shorten this definition by using limits for functions. As a reminder: There is according to definition: limx→cg(x)=L if and only if limn→∞g(xn)=L for all sequences (xn)n∈ℕ of arguments non-equal to c with limn→∞xn=c. So:

Let f:D→ℝ with D⊆ℝ and let x~∈D be an accumulation point of D. The function f is differentiable at x~ with derivative f′(x~), whenever:
f′(x~)=limx→x~f(x)−f(x~)x−x~


The h-method

[edit | edit source]
Definition of the derivative via the h-method: For the respective h-values the corresponding secants are drawn in. You see that for h→0 the secant changes into the tangent and thus the secant slope (difference quotients) changes into the tangent slope (derivative).

There is an equivalent option to define the derivative. For this we go from the differential quotient limx→x~f(x)−f(x~)x−x~ and perform the substitution x=x~+h. The new variable h just describes the difference between x~ and the point where the difference quotient is formed. For x→x~, equivalently goes h→0. So we can also define the derivative as follows

Let f:D→ℝ with D⊆ℝ and let x~∈D be an accumulation point of D. The function f is differentiable at x~ with derivative f′(x~), whenever:
f′(x~)=limh→0f(x~+h)−f(x~)h


Applications in science and technology

[edit | edit source]

We have come to know the derivative as the current rate of change of a quantity. As such, it occurs frequently in science or applications. Several variables are defined as rates of change, for example:

  • velocity: The velocity is the instantaneous rate of change of the distance travelled by an object.
  • Acceleration: The acceleration is the instantaneous rate of change of the speed of an object.
  • Pressure change: Let p(h) the air pressure at altitude h. The derivative p′(h) is the rate of change of air pressure with altitude. This example shows that the rate of change need not always be related to time. It can also be the rate of change with respect to another quantity, e.g. altitude.
  • Chemical reaction rate: Let's consider a chemical reaction A→B. Let dA(t) the concentration of the substance A at time t. The derivative dA′(t) is the instantaneous rate of change of the concentration of A and thus indicates how much of the substance A is converted into the substance B. Thus dA′(t) indicates the chemical reaction rate for the reaction A→B.
  • Often the number of individuals N(t) in a population is considered (for example the number of people on the planet, the number of bacteria in a Petri dish, the number of animals of a species or the number of atoms of a radioactive substance). The derivative N′(t) represents the instantaneous rate of change of individuals at the time t.

Definitions

[edit | edit source]

Derivative and differentiability

[edit | edit source]
Definition

Let f:D→ℝ with D⊆ℝ and let x~∈D be an accumulation point of D. The function f is differentiable at x~ with derivative f′(x~), whenever:

f′(x~)=limx→x~f(x)−f(x~)x−x~

Equivalently, we can require:

f′(x~)=limh→0f(x~+h)−f(x~)h

A function that can be differentiated at x~ is called differentiable at the position x~. A function is called differentiable, if the above limit exists at every position within the domain of definition. That means, differentiable functions are differentiable at every point, where they are defined.

Difference quotient and differential quotient

[edit | edit source]
Der difference quotient between x0 and x1 is just the slope of the blue secant

The terms "difference quotient" and "differential quotient" are mathematically defined as follows:

f′(x~)⏟derivative=limx→x~f(x)−f(x~)x−x~⏟difference quotient⏟differential quotient

The following definitions hold:

Definition (Difference quotient)

The difference quotient of a function f:D→ℝ with D⊆ℝ for the interval [x~,x] is the quotient

f(x)−f(x~)x−x~

This quotient corresponds to the slope of the secant between the points (x~,f(x~)) and (x,f(x)).

Definition (Differential quotient)

Let f:D→ℝ with D⊆ℝ. Let x~∈D be an accumulation point of the domain D. The differential quotient of this function at x~ is defined as the limit:

limx→x~f(x)−f(x~)x−x~

If the limit exists, it coincides with the derivative f′(x~).

Derivative function

[edit | edit source]
The derivative function assigns to every argument x of the function f its derivative f′(x). Within the animation, the derivative function is evaluated at several arguments. It corresponds to the slope of the tangent at those points.

If a function f:D→ℝ with D⊆ℝ is differentiable at every point within its domain of definition, then f has a derivative at every point in D. The function that assigns its derivative f′(x~) to every m argument x~ is called derivative function of f:

Definition (Derivative function)

Let f:D→ℝ be a differentiable function with D⊆ℝ. We define the derivative function f′:D→ℝ by

f′(x~):=limx→x~f(x)−f(x~)x−x~

If the derivative function f′ is additionally continuous, we call f continuously differentiable.

Warning

The terms "continuously differentiable" and "differentiable" are not equivalent. The continuity of the derivative function has to be imposed separately.

Notations

[edit | edit source]

Historically, different notations have been developed to represent the derivative of a function. In this article we have only learned about the notation f′ for the derivative of f. It goes back to the mathematician Joseph-Louis Lagrange , who introduced it in 1797. Within this notation the second derivative of f is denoted f″ and the n-th derivative is denoted f(n) .

Isaac Newton - (the founder of differential calculus besides Leibniz) - denoted the first derivative of x with x˙, accordingly he denoted the second derivative by x¨. Nowadays, this notation is mainly used in physics for the derivative with respect to time.

Gottfried Wilhelm Leibniz introduced for the first derivative of f with respect to the variable x the notation dfdx(x). This notation is read as "d f over d x of x". The second derivative is then denoted d2fdx2(x) and the n-th derivative is written as dnfdxn(x).

The notation of Leibniz is mathematically speaking not a fraction! The symbols df and dx are called differentials, but in modern calculus (apart from the theory of so-called "differential forms") they have only a symbolic meaning. They are only allowed in this notation as formal differential quotients. Now there are applications of derivatives (like the "chain rule" or "integration by substitution"), in which the differentials df or dx can be handled as if they were ordinary variables and in which one can come to correct solutions. But since there are no differentials in modern calculus, such calculations are not mathematically correct.

The notation Df or Dxf(x) for the first derivative of f dates back to Leonhard Euler. In this notation, the second derivative is written as D2f or Dx2f(x) and the n-th derivative as Dnf or Dxnf(x).

Overview about notations

[edit | edit source]
Notation of the … 1st derivative 2nd derivative n-th derivative
Lagrange f′ f″ f(n)
Newton f˙ f¨ f˙n
Leibniz dfdx d2fdx2 dnfdxn
Euler Df D2f Dnf

Derivative as tangential slope

[edit | edit source]
For Δx=x−x~→0 the secant slope f(x)−f(x~)x−x~ converges to the tangential slope. The derivative f′(x~) is equal to the tangent slope of the tangent touching the graph at the point (x~,f(x~)).
If a differentiable function is used, a tangent can be fitted to it at every m point of the graph. The derivative corresponds to the slope of this tangent.

The derivative f′(x~) corresponds to the limit value limx→x~f(x)−f(x~)x−x~. The difference quotient f(x)−f(x~)x−x~ is the slope of the secant between the points (x~,f(x~)) and (x,f(x)). In the case of the boundary value formation x→x~, this secant merges into the tangent that touches the graph of f at the point (x~,f(x~)):

function with a secant and a tangent
function with a secant and a tangent

Thus, the derivative f′(x~) is equal to the slope of the tangent to the graph through the point (x~,f(x~)). We may also use the derivative to compute the tangent to a graph. With f′(x~) we know the slope of the tangent. The offset can be determined using that (x~,f(x~)) is a point on the tangent. The following question illustrates how this works:

Question: What is the tangent equation if its slope is f′(x) and it passes through the point (x~,f(x~))?

The general formula of a linear function g is g(x)=mx+y0. Where m is the slope of g and y0 is the intersection of g with the y-axis (offset). Now let t be the tangent you are looking for. It has slope f′(x~) and therefore t(x)=f′(x~)⋅x+y0.

So we only need to find the offset y0 . Since t passes through the point (x~,f(x~)) , there is

f(x~)=t(x~)=f′(x~)⋅x~+y0⟹y0=f(x~)−f′(x~)⋅x~

So

t(x)=f′(x~)⋅x+f(x~)−f′(x~)⋅x~=f(x~)+f′(x~)⋅(x−x~)

We note: knowing the derivative f′(x~) at a point (and the point itself) suffices for computing the equation of the tangent.

Derivative as characterization of best approximations

[edit | edit source]

Approximating a differentiable function

[edit | edit source]

The derivative can be used to approximate a function. One may even define the derivative as the "best linear approximation" to a function. To find this approximation we start with the definition of the derivative as a limit:

f′(x~)=limx→x~f(x)−f(x~)x−x~

The difference quotient f(x)−f(x~)x−x~ gets arbitrarily close to the derivative f′(x~), if x gets sufficiently close to x~. For x≈x~ we can write:

f′(x~)≈f(x)−f(x~)x−x~

In the following we assume, that the expression x≈x~ for "x is approximately as large as x~" is well-defined and obeys the common arithmetic laws for equations. So we can change this equation to

f′(x~)≈f(x)−f(x~)x−x~⟹f′(x~)⋅(x−x~)≈f(x)−f(x~)⟹f(x~)+f′(x~)⋅(x−x~)≈f(x)⟹f(x)≈f(x~)+f′(x~)⋅(x−x~)

If x is sufficiently close to x~, then f(x) is approximately equal to f(x~)+f′(x~)⋅(x−x~). This value can thus be used as an approximation of f(x) near the derivative position. The function with the assignment rule x↦f(x~)+f′(x~)⋅(x−x~) is a linear function, since x~ is an arbitrary but fixed point.

The assignment rule t(x)=f(x~)+f′(x~)⋅(x−x~) describes the tangent, which touches the graph of the function at the position where the derivative is taken. Thus, the tangent near the point of contact is a good approximation of the graph. This is also shown in the following diagram. If one zooms in close enough at a point in a differential function, the graph looks approximately like a straight line:


Differentiable functions locally look like a line
Differentiable functions locally look like a line

This line is described by the assignment rule t(x)=f(x~)+f′(x~)⋅(x−x~) and corresponds to the tangent of the graph at this position.

Example: The sine for small angles

[edit | edit source]

Let's take a look at the above-mentioned example. For this we consider the sine function sin⁡(x). Its graph is

The graph of a sine function
The graph of a sine function

As we shall see, the derivative of the sine is the cosine and thus

sin′⁡(0)=cos⁡(0)=1

the linear approximation of the sine is hence

sin⁡(x)≈sin⁡(0)+sin′⁡(0)⋅(x−0)=0+1⋅(x−0)=x

In the vicinity of zero, there is sin⁡(x)≈x. This is the so called small-angle approximation. Thus, sin⁡(14) can be approximated by 14. With sin⁡(14)=0.2474… this approximation is also quite good. The following diagram shows that near zero, the sine function can be described approximately by a line sin⁡(x)≈x:

Small-angle approximation for the sine function
Small-angle approximation for the sine function

The diagram also shows that this approximation is only good near the derivative point. For values x far away from zero, sin⁡(x) differs greatly from x. The approximation sin⁡(x)≈x is therefore only meaningful for small arguments!

Quality of approximations

[edit | edit source]

How good is the approximation f(x)≈f(x~)+f′(x~)⋅(x−x~)? To answer this, let ϵ(x) be the value with

f(x)−f(x~)x−x~=f′(x~)+ϵ(x)

The value ϵ(x) is therefore the difference between the difference quotient f(x)−f(x~)x−x~ and the derivative f′(x~). This difference disappears in the limit x→x~, because for this limit the difference quotient turns into a differential quotient, i.e. the derivative f′(x~). There is also limx→x~ϵ(x)=0. Now we can rearrange the above equation and get

f(x)−f(x~)x−x~=f′(x~)+ϵ(x)⟹f(x)−f(x~)=f′(x~)⋅(x−x~)+ϵ(x)⋅(x−x~)⟹f(x)=f(x~)+f′(x~)⋅(x−x~)+ϵ(x)⋅(x−x~)⏟:= δ(x)⟹f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)

The error between f(x) and f(x~)+f′(x~)⋅(x−x~) is thus equal to the term δ(x)=ϵ(x)⋅(x−x~). Because of limx→x~ϵ(x)=0 there is

limx→x~δ(x)=limx→x~ϵ(x)⏟→0⋅(x−x~)⏟→0=0

So the error δ(x) disappears for x→x~. But we can say even more: δ(x) decreases faster than a linear term towards zero. Even if we divide δ(x) by x−x~ and thus greatly increase this term near x~, then δ(x)x−x~ disappears for x→x~. There is

limx→x~δ(x)x−x~=limx→x~ϵ(x)(x−x~)x−x~=limx→x~ϵ(x)=0

The error δ(x) in the approximation f(x)≈f(x~)+f′(x~)⋅(x−x~) thus falls off to zero faster than linear for x→x~. Let us summarize the previous argumentation in one theorem:

Theorem (Approximation of a differentiable function)

Let f:D→ℝ and let x~∈D be an accumulation point of D. Let also f be differentiable at the point x~ with the derivative f′(x~). Let epsilon and δ be defined such that for all x∈D there is


f(x)=f(x~)+f′(x~)⋅(x−x~)+ϵ(x)⋅(x−x~)=f(x~)+f′(x~)⋅(x−x~)+δ(x)

Then the error term ϵ(x) for x→x~ vanishes, i.e. limx→x~ϵ(x)=0. For δ(x) there is accordingly limx→x~δ(x)x−x~=0.

Alternative definition of the derivative

[edit | edit source]

The fact that differentiable functions can be approximated by linear functions characterises the derivative. Every function f is differentiable at the position x~, if a real number c∈ℝ (best approximation parameter) as well as a function δ exist, such that f(x)=f(x~)+c⋅(x−x~)+δ(x) and limx→x~δ(x)x−x~=0 apply. Its derivative is then f′(x~)=c. There is

f′(x~)=limx→x~f(x)−f(x~)x−x~=limx→x~f(x~)+c⋅(x−x~)+δ(x)−f(x~)x−x~=limx→x~c⋅(x−x~)+δ(x)x−x~=limx→x~c+δ(x)x−x~⏟→0=c

So we can also define the derivative as follows:

Definition (Alternative definition of the derivative)

Let f:D→ℝ be a function and x~∈D an accumulation point of D. The function f is differentiable with the derivative f′(x~)∈ℝ at the point x~ if a function δ:D→ℝ exists, such that

f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)

and limx→x~δ(x)x−x~=0 holds.

Describing derivatives using a continuous function

[edit | edit source]

There is a further characterisation of derivative. We start with the formula

f(x)−f(x~)x−x~=f′(x~)+ϵ(x)

Where ϵ(x) is the difference between the difference quotient and the derivative (which disappears for x→x~). If we rearrange this formula we get:


f(x)−f(x~)x−x~=f′(x~)+ϵ(x)⟹f(x)−f(x~)=f′(x~)⋅(x−x~)+ϵ(x)⋅(x−x~)⟹f(x)=f(x~)+(f′(x~)+ϵ(x))⋅(x−x~) ↓ φ(x)=f′(x~)+ϵ(x)⟹f(x)=f(x~)+φ(x)⋅(x−x~)

The function φ(x) for x→x~ has the property

limx→x~φ(x)=limx→x~(f′(x~)+ϵ(x)⏟→0)=f′(x~)

Thus φ(x) can be extended to a function which is continuous at the position x~, whereby the function value is set φ(x~)=f′(x~). This representation of a differentiable function allows a further characterisation of continuous functions:

Theorem (Equivalent characterisation of the derivative)

A function f:D→ℝ is differentiable in x~∈D if and only if there is a function φ:D→ℝ continuous in x~ with:

f(x)=f(x~)+φ(x)⋅(x−x~)

In that case, φ(x~)=f′(x~).

Proof (Equivalent characterisation of the derivative)

Proof step: f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x) with limx→x~δ(x)x−x~=0 ⟹ f(x)=f(x~)+φ(x)⋅(x−x~) with φ(x~)=f′(x~)

Let f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x), where δ:D→ℝ is a function with limx→x~δ(x)x−x~=0. Now, for x∈D∖{x~} there is

f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)(x−x~)x−x~=f(x~)+(f′(x~)+δ(x)x−x~)⋅(x−x~)

We now define φ:D→ℝ,φ(x)=f′(x~)+δ(x)x−x~. Then we get

limx→x~φ(x)=limx→x~f′(x~)+limx→x~δ(x)x−x~⏟=0=f′(x~)

So φ is continuous in x~∈D with φ(x~)=f′(x~).

Proof step: f(x)=f(x~)+φ(x)⋅(x−x~) with φ(x~)=f′(x~) ⟹ f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x) with limx→x~δ(x)x−x~=0

Let now f(x)=f(x~)+φ(x)⋅(x−x~) with a function φ:D→ℝ continuous in x~∈D , where φ(x~)=f′(x~). For x∈D∖{x~} there is then

f(x)=f(x~)+φ(x)⋅(x−x~)=f(x~)+(φ(x)+φ(x~)−φ(x~))⋅(x−x~)=f(x~)+φ(x~)⋅(x−x~)+(φ(x)−φ(x~))⋅(x−x~)=f(x~)+f′(x~)⋅(x−x~)+(φ(x)−φ(x~))⋅(x−x~)

Now, we define δ:D→ℝ,δ(x)=(φ(x)−φ(x~))⋅(x−x~) and get

limx→x~δ(x)x−x~=limx→x~(φ(x)−φ(x~))=φ(x~)−φ(x~)=0

Derivative as generalized slope

[edit | edit source]
The slope of a linear function is given by the quotient ΔyΔx=y2−y1x2−x1.

The slope is initially only defined for linear functions g with the assignment rule g(x)=mx+b where m,b∈ℝ. For such functions the slope is equal to the value m and can be calculated using the difference quotient. For two different arguments x and x~ from the domain of definition g there is:

g(x)−g(x~)x−x~=(mx+b)−(mx~+b)x−x~=mx−mx~x−x~=m(x−x~)x−x~=m

Now m is also the derivative of g at every accumulation point x~ of the domain of definition:

g′(x~)=limx→x~g(x)−g(x~)x−x~↓ see calculation above=limx→x~m=m

The derivative of a linear function is therefore always equal to its slope. But the derivative is more general: it is defined for all differentiable functions. (Remember: A term A is a generalisation of another term B, if A is the same as B in all cases where B is defined and A can be applied to other cases.)

So we can consider the derivative as the slope of a function at a point. The transition slope → derivative thus changes from a global property (the slope for linear functions is defined for the whole function), to a local property (the derivative is the instantaneous rate of change of a function).

Examples

[edit | edit source]

Example of a differentiable function

[edit | edit source]
Example (The square function is differentiable at x=3)
The graph of the square function
The derivative of the square function is given by f(x)=2x

The square function f:ℝ→ℝ:x↦x2 can be differentiated at the position x0=3 with derivative 6. We get this result if we evaluate the differential quotient at the position x0=3:

f′(3)=limh→0f(3+h)−f(3)h=limh→0(3+h)2−32h=limh→09+6h+h2−9h=limh→06h+h2h=limh→0(6+h)

The latter expression shows that the difference quotient is equal to 6+h for h≠0 (for h=0 the difference quotient is not defined because otherwise we would divide by zero). Now we have to determine the limit value of 6+h as h→0:

limh→0(6+h)=6+0=6

Thus, the derivative of f at the position x0=3 is equal to 6, i.e. f′(3)=6. Analogously, we can determine the derivative of f at any position x~∈ℝ:

f′(x~)=limh→0f(x~+h)−f(x~)h=limh→0(x~+h)2−x~2h=limh→0x~2+2x~h+h2−x~2h=limh→02x~h+h2h=limh→0(2x~+h)=2x~

Thus, the derivative of the square function at the position x~ is equal to f′(x~)=2x~. The derivative function of f is therefore the function f′:ℝ→ℝ:x↦2x.

Example of a non-differentiable function

[edit | edit source]
Example (Absolute value function is not differentiable)
The absolute value function is not differentiable at x~=0

We consider the absolute value function f:ℝ→ℝ,x↦|x| and check whether it can be differentiated at the position x0=0. Here we select the sequences (xn)n∈ℕ, (x~n)n∈ℕ and (x̂n)n∈ℕ with

xn=1n,x~n=−1n,x̂n=(−1)n1n

These all converge to x0=0. What are the differential quotients corresponding to those sequences? For (xn)n∈ℕ there is:

limn→∞f(xn)−f(x0)xn−x0=limn→∞|1n|−|0|1n−0=limn→∞1n1n=limn→∞1=1

For (x~n)n∈ℕ we get:

limn→∞f(x~n)−f(x0)x~n−x0=limn→∞|−1n|−|0|−1n−0=limn→∞1n−1n=limn→∞−1=−1

For (x̂n)n∈ℕ there is:

limn→∞f(x̂n)−f(x0)x̂n−x0=limn→∞|(−1)n1n|−|0|(−1)n1n−0=limn→∞1n(−1)n1n=limn→∞(−1)n

This limit for the sequence (x̂n)n∈ℕ does not exist. We therefore see that depending on the sequence (an)n∈ℕ chosen, the limit value limn→∞f(an)−f(x0)an−x0 is different or does not exist. Thus, according to definition, the limit value limx→x0f(x)−f(x0)x−x0 does not exist either. So the function f cannot be differentiated at the position x0=0. The absolute value function has no derivative at zero.

Left-hand and right-hand derivative

[edit | edit source]

Definition

[edit | edit source]

The derivative of a function f:D→ℝ is the limit of the difference quotient f(x)−f(x~)x−x~ for x→x~. The difference quotient can be understood as a function D∖{x~}→ℝ, which is defined for all x∈D except for x=x~. So limx→x~f(x)−f(x~)x−x~ is actually the limit value of a function.

The terms "left-hand and right-hand derivative" can also be considered for the difference quotient. Thus, we obtain the terms "left-hand" and "right-hand" derivative. For the left-hand derivative, only secants to the left of the considered point are evaluated. So only difference quotients f(x)−f(x~)x−x~ are considered, where xis<x~. Then it is checked whether the difference quotient converges to a number in the limit x→x~ converge against a number. If the answer is yes, then this number is the left-hand derivative at that point:

f−'(x~)=limx↑x~f(x)−f(x~)x−x~

Here f−'(x~) is the notation for the left-hand derivative of f at the position x~. For this limit to make sense, there must be at least one sequence (xn)n∈ℕ of arguments that converges from the left towards x~. So x~ has to be an accumulation point of the set D∩(−∞,x~)={x∈D:x<x~}.

Definition (Left-hand derivative)

Let f:D→ℝ be a function and x~ an accumulation point of the set {x∈D:x<x~}. The number f−'(x~) is the left-hand derivative of f at the position x~, if there is

f−'(x~)=limx↑x~f(x)−f(x~)x−x~

This is equivalent to the statement that for all sequences (xn)n∈ℕ from ℕ with xn∈D and xn<x~ and limn→∞xn=x~ there is

f−'(x~)=limn→∞f(xn)−f(x~)xn−x~

Analogously, the right-hand derivative can be defined as follows:

Definition (Right-hand derivative)

Let f:D→ℝ be a function and x~ an accumulation point of the set {x∈D:x>x~}. The number f+'(x~) is the right-hand derivative of f at the position x~, if there is

f+'(x~)=limx↓x~f(x)−f(x~)x−x~

This is equivalent to the statement that for all sequences (xn)n∈ℕ from ℕ with xn∈D and xn>x~ and limn→∞xn=x~ there is

f+'(x~)=limn→∞f(xn)−f(x~)xn−x~


functions only have a limit value at one position in their domain of definition if both the left-hand and the right-hand limit value exist at this position and both limit values match. We can apply this theorem directly to derivative functions:

A function is differentiable at a position in its domain of definition if and only if both the left-hand and the right-hand derivative exist there and both derivatives coincide.

Example

[edit | edit source]

We have already shown that the absolute value function f:ℝ→ℝ:x↦|x| is not differentiable at x~=0. However, we can still show that the right-hand derivative exists at this position and is equal to 1:

f+′(0)=limx↓0f(x)−f(0)x−0=limx↓0|x|−|0|x ↓ x>0⟹|x|=x=limx↓0x−0x=limx↓01=1

Analogously, we can show that the left-hand derivative is equal to −1 at this position:

f−′(0)=limx↑0f(x)−f(0)x−0=limx↑0|x|−|0|x ↓ x<0⟹|x|=−x=limx↑0−x−0x=limx↑0−1=−1

Since the right-hand and left-hand derivatives do not coincide, the absolute value function cannot be differentiated at x~=0. At this point, it has left-hand and right-hand derivatives, but no general derivative.

Differentiable functions do not have kinks

[edit | edit source]

In the above example we have seen that the absolute value function is not differentiable. This is because the absolute value function "has a kink" at the position ξ=0, so that the left-hand and right-hand derivative are different. If we go to ξ=0 from the left-hand side, the derivative is equal to −1, while the derivative from the right-hand side is equal to 1. The kink in the absolute value function thus prevents differentiability.

So if a function has a kink, it is not differentiable at this point. In other words: differentiable functions are kink-free. Therefore, they are also called smooth functions (actually, smooth means "infinitely many times differentiable"). This does not mean, however, that kink-free functions are automatically differentiable. As an example, let us consider the sign function sgn⁡(x) with the definition

sgn⁡(x)={1x>00x=0−1x<0

Its graph is

Graph of the sign function
Graph of the sign function

This function is not differentiable at the zero point x~=0, because near the "jump" of the function, the difference quotient converges towards infinity. For the right-hand derivative there is for example:

limh↓0sgn⁡(h)−sgn⁡(0)h=limh↓01−0h=limh↓01h=∞

The sign function has no kink at the zero point. Instead, it makes a "jump" there.

At the example of the sign function we see that being "free of kinks" and "differentiable" cannot be the same. However, freedom from kinks is a prerequisite for differentiability. So differentiable functions are free of kinks.

Relations between differentiability, continuity and continuous differentiability

[edit | edit source]

Continuous differentiability of a function f implies its differentiability, which in turn implies its continuity. The converse statements do not hold, as we will see in the course of this section:

continuously differentiability⟹differentiability⟹continuity

The first implication follows directly from the definition: A function f is called continuously differentiable if it is differentiable and the derivative function f′ is continuous. Thus, continuously differentiable functions are also differentiable. The second implication needs some more work:

Differentiable functions are continuous

[edit | edit source]

We now show that every at one point differentiable function is also continuous at this point. Thus, differentiability is a stronger condition for a function than continuity:

Theorem

Let f:D→ℝ with D⊆ℝ be a function, that is differentiable at x~∈D . Then, f is also continuous at x~ . Consequently, every differentiable function f is continuous.

Proof

Let (xn)n∈ℕ be any sequence in D converging to x~. Since f is differentiable in x~∈D , there is a function δ:D→ℝ ("approximation error") with limx→x~δ(x)x−x~=0, such that for all x in D we have

f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)

In this case, we will also have limx→x~δ(x)=0 . Since limn→∞xn=x~ , we will also have limn→∞δ(xn)=0 . So there is:

limn→∞f(xn)↓ f(x)=f(x~)+f′(x~)⋅(x−x~)+δ(x)= limn→∞f(x~)+f′(x~)⋅(xn−x~)+δ(xn)↓ pull apart the limit= limn→∞f(x~)⏟→f(x~)+limn→∞f′(x~)⋅(xn−x~)⏟→0+limn→∞δ(xn)⏟→0= f(x~)+0+0= f(x~)

We were allowed to pull the limits apart here because the limits limn→∞f(x~)=f(x~), limn→∞f′(x~)⋅(xn−x~)=0 and limn→∞δ(xn)=0 exist. According to the sequence definition for continuity, limn→∞f(xn)=f(x~) implies that f is continuous at x~.

Alternative proof

Let (xn)n∈ℕ be a sequence in D converging towards x~ and whose sequence elements are not equal to x~. There is also limn→∞(xn−x~)=0 and xn−x~≠0 for all n∈ℕ. Since f is differentiable in x~∈D, there is f′(x~)=limn→∞f(xn)−f(x~)xn−x~. The derivative of f in the point x~ is a real number. Then, there is:

limn→∞f(xn)−f(x~)↓ ∀n∈ℕ:xn−x~≠0= limn→∞(f(xn)−f(x~))⋅(xn−x~)xn−x~↓ pull apart the limit= limn→∞f(xn)−f(x~)xn−x~⏟→f′(x~)⋅limn→∞(xn−x~)⏟→0 = f′(x~)⋅0= 0

We were allowed to pull the limits apart here because the limit values limn→∞f(xn)−f(x~)xn−x~=f′(x~) and limn→∞(xn−x~)=0 exist. Thus limn→∞f(xn)=f(x~) as long as the sequence (xn)n∈ℕ attains the value x~ at most a finite number of times and xn→x~ holds.

Let now (x̂n)n∈ℕ be any sequence in D which converges towards x~ and whose sequence elements infinitely often attain the value x~. In this case, we take the subsequence of (x̂n)n∈ℕ with sequence elements unequal to x~ and also obtain the function value limit f(x~). The partial sequence of elements x~ is constant, and its function values trivially converge to f(x~). Thus, the sequence (f(x̂n))n∈ℕ can be split into two subsequences, both of which converge towards f(x~). So we have limn→∞f(x̂n)=f(x~).

Hence, for every sequence (x̂n)n∈ℕ in D which converges towards x~, there is limn→∞f(x̂n)=f(x~). So f is continuous at the position x~.

Application: Non-continuous functions are not differentiable

[edit | edit source]

From the previous section we know that every differentiable function is continuous:

differentiability⟹continuity

Applying the principle of contraposition to this implication, we also get:

non-continuity⟹non-differentiability

Example: Non-continuous functions are not differentiable

[edit | edit source]

Take, as an example, the sign function

sgn⁡:ℝ→ℝ:x↦f(x)={1x>00x=0−1x<0

It is not continuous at x~=0. So it is also not differentiable there. We can prove non-continuity by taking a sequence xn=1n. This sequence converges towards zero. If the sign function was differentiable, then the limit value limn→∞f(xn)−f(0)xn−0 would have to exist. However

limn→∞f(1n)−f(0)1n−0=limn→∞1−01n−0=limn→∞n=∞

The limit value does not exist in ℝ. Therefore, the sign function is - as expected - not differentiable at x~=0.

Not every differentiable function is continuously differentiable

[edit | edit source]

In the following example, we already use some derivatives rules, which will be discussed in more detail in the next chapter. Perhaps you already know them from school. If not, they are a useful insight to what will follow.

Example (Example of a differentiable, but not continuously differentiable function)

We will show that the following function is differentiable everywhere, but its derivative function is not continuous:

f:ℝ→ℝ:x↦f(x)={x2⋅sin⁡(1x)x≠00x=0

At x~≠0 , the product and chain rule (which we will derive later) tells us that the function is infinitely often continuously differentiable. However, at x~=0 there is

f′(0)=limh→0h2sin⁡(1h)−0h=limh→0h⏟→0⋅sin⁡(1h)⏟∈[−1,1]=0

So f is also differentiable at x~=0 with derivative f′(0)=0. However, the derivative function f′ is not continuous at x~=0 . To show this, we have to determine the derivative function. For x~≠0 , the product and chain rule yield

f′(x~)=(x2⋅sin⁡(1x))′=2xsin⁡(1x)+x2cos⁡(1x)(−1x2)=2x⋅sin⁡(1x)−cos⁡(1x)

Together with the derivative value f′(0)=0 we get the derivative function

f′:ℝ→ℝ:x↦f′(x)={2x⋅sin⁡(1x)−cos⁡(1x)x≠00x=0

To show the discontinuity of f′ at x~=0 we use the sequence definition of continuity. Let us take the sequence (xn)n∈ℕ with xn=1nπ. There is limn→∞xn=0. If f′ was continuous, then according to the sequence criterion, limn→∞f′(xn)=0=f′(0)=f′(limn→∞xn) should apply. But now

limn→∞f′(xn)=limn→∞(2xn⋅sin⁡(1xn)−cos⁡(1xn))=limn→∞(21nπ⋅sin⁡(nπ)−cos⁡(nπ))=limn→∞(21nπ⋅0−(−1)n)=limn→∞−(−1)n

The limit value limn→∞(−1)n does not exist, because the sequence ((−1)n)n∈ℕ has the two accumulation points 1 and −1. It follows that f′ is not continuous at x~=0. Therefore, f is differentiable, but not continuously differentiable.

Exercises

[edit | edit source]

Hyperbolic function

[edit | edit source]
Exercise (Hyperbolic function is differentiable at 2)

Show that the hyperbolic function g:ℝ∖{0}, g(x)=1x is differentiable at ξ=2 and calculate the derivative there. What is the derivative of g at any position x~∈ℝ∖{0}?

Solution (Hyperbolic function is differentiable at 2)

Here is the differential quotient at the position ξ=2 is:

g′(2)=limh→0g(2+h)−g(2)h=limh→012+h−12h=limh→02−(2+h)2⋅(2+h)h=limh→0−h2h(h+2)=limh→0−12h+4=−10+4=−14

So g is differentiable at ξ=2 with the derivative g′(2)=−14. For a general x~∈ℝ∖{0} there is

g′(x~)=limh→0g(x~+h)−g(x~)h=limh→01x~+h−1x~h=limh→0x~−(x~+h)x~⋅(x~+h)h=limh→0−hx~h(h+x~)=limh→0−1x~h+x~2=−10+x~2=−1x~2

Root function

[edit | edit source]
Exercise (Root function is not differentiable at 0)

Show that the root function

g:ℝ0+→ℝ, g(x)=x

is not differentiable at ξ=0.

Solution (Root function is not differentiable at 0)

We must show that the differential quotient of g in 0 does not exist. This quotient is

limx→0+g(x)−g(0)x−0=limx→0+x−0x−0=limx→0+xx=limx→0+1x

We choose the positive sequence (xn)n∈ℕ=(1n2)n∈ℕ converging to 0. For this sequence there is

limn→∞g(xn)−g(0)xn−0=limn→∞1xn=limn→∞11n2=limn→∞n2=limn→∞n=∞

Thus, there is no limit to the differential quotient limx→0+g(x)−g(0)x−0. The function g is therefore not differentiable at ξ=0.

Determining limits

[edit | edit source]
Exercise (Determining limits with differential quotients)

Let f:D→ℝ be differentiable in a∈D. Show that the following limits hold:

  1. limh→0f(a−h)−f(a)h=−f′(a)
  2. limh→0f(a+h)−f(a−h)h=f′(a)
  3. Does the reverse statement also hold for the limit value limh→0f(a+h)−f(a−h)h=f′(a)? I.e. if the limit value limh→0f(a+h)−f(a−h)h exists, then f is differentiable at a, and f′(a) is equal to this limit?
Solution (Determining limits with differential quotients)

Solution sub-exercise 1:

Since f is differentiable in a , there is

limh→0f(a+h)−f(a)h=f′(a)

If we substitute h=−h~, then there is h→0⟺h~→0. Hence

limh→0f(a−h)−f(a)h=h~=−hlimh~→0f(a+h~)−f(a)−h~=−limh~→0f(a+h~)−f(a)h~=−f′(a)

Solution sub-exercise 2:

Here, we have

limh→0f(a+h)−f(a−h)2h=limh→0f(a+h)−f(a)−(f(a−h)−f(a))2h=12⋅limh→0f(a+h)−f(a)h⏟=f′(a)−12⋅limh→0f(a−h)−f(a)h⏟=−f′(a)=12f′(a)+12f′(a)=f′(a)

Solution sub-exercise 3:

The converse is not true. To show this we consider the function f:ℝ→ℝ, f(x)=|x| in a=0. For this function we have the limit value

limh→0f(0+h)−f(0−h)h=limh→0|h|−|−h|h=limh→0|h|−|h|h=limh→00h=0

However, the absolute function is not differentiable at 0.

Criterion for differentiability

[edit | edit source]
Exercise (Criterion for differentiability of a general function at zero)

Let f:(−1,1)→ℝ. Show: if |f(x)|≤|x|α for some α>1, then f is differentiable at 0 with f′(0)=0.

Solution (Criterion for differentiability of a general function at zero)

There is

0≤|f(0)|≤|0|α=0⟹f(0)=0

Since α−1>0, there is

0≤|f(x)−f(0)x−0|=|f(x)||x|≤|f(x)|≤|x|α|x|α|x|=|x|α−1⟶x→00

The squeeze theorem then implies

f′(0)=limx→0f(x)−f(0)x−0=0