# Math for Non-Geeks/ Derivatives

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

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 (${\tfrac {\Delta f}{\Delta x}}$) describes how much a quantity changes ($\Delta f$) in relation to the change of some reference quantity ($\Delta x$). If we let ($\Delta 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 re-labeld as $s$ and $x$ is re-labelled as $t$. The quotient ${\tfrac {\Delta s}{\Delta t}}$ of "travelled distance" $\Delta x$ and "elapsed time" $\Delta t$ just describes the "average speed". In order to get the speed $v(t)$ at some time $t$, we make the time difference $\Delta t$ smaller and smaller, such that the "average speed" ${\tfrac {\Delta s}{\Delta 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
### Introduction to the derivative

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:
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 ${\tilde {x}}$, where the function has the function value $f({\tilde {x}})$:
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 ${\tilde {x}}$ is equal to the velocity of the car at the time ${\tilde {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 $x_{1}$ shortly after ${\tilde {x}}$ and look at the average speed in that time $v={\frac {\text{distance}}{\text{time}}}$. The distance travelled in that time is $f(x_{1})-f({\tilde {x}})$, while the time difference is $x_{1}-{\tilde {x}}$. Thus the car has the average speed
${\frac {f(x_{1})-f({\tilde {x}})}{x_{1}-{\tilde {x}}}}$
This quotient, which indicates the average rate of change of the function $f$ in the interval $[{\tilde {x}},x_{1}]$, 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 $({\tilde {x}},f({\tilde {x}}))$ and $(x_{1},f(x_{1}))$:
This average speed is a good approximation of the current speed of our car at the time ${\tilde {x}}$. It is only an approximation since the movement of the car between ${\tilde {x}}$ and $x_{1}$ 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 $x_{2}$ which is even closer to ${\tilde {x}}$ and determine the average speed ${\tfrac {f(x_{2})-f({\tilde {x}})}{x_{2}-{\tilde {x}}}}$ for the new time interval between ${\tilde {x}}$ and $x_{2}$:
We can shorten the time difference even further by taking a sequence $(x_{n})_{n\in \mathbb {N} }$ of times which converge towards ${\tilde {x}}$. For every $x_{n}$ we calculate the average speed ${\tfrac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$ of the car in the period from ${\tilde {x}}$ to $x_{n}$. The shorter $x_{n}-{\tilde {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 ${\tilde {x}}$:
Thus we have found a method to determine the current rate of change of $f$ at time ${\tilde {x}}$: We take any sequence of arguments $(x_{n})_{n\in \mathbb {N} }$, which are all different from ${\tilde {x}}$ and for which $\lim _{n\to \infty }x_{n}={\tilde {x}}$. For every $x_{n}$ we determine the quotient ${\tfrac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$. The current rate of change is the limit of these quotients:
${\text{Rate of change of }}f{\text{ at the argument }}{\tilde {x}}=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
The derivative or $f$ at ${\tilde {x}}$ is denoted as $f'({\tilde {x}})$. So we have the mathematical definition:
$f'({\tilde {x}})=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
The limit of the difference quotient is sometimes also called differential quotient.

### Negative time intervals

What happens if we do not choose $x_{n}$ in the future, but in the past of ${\tilde {x}}$? Let us draw this situation in a picture:
The average speed in the interval from $x_{n}$ to ${\tilde {x}}$ is then equal to ${\tfrac {f({\tilde {x}})-f(x_{n})}{{\tilde {x}}-x_{n}}}$. If we extend this fraction by a factor of $-1$, we get
${\frac {f({\tilde {x}})-f(x_{n})}{{\tilde {x}}-x_{n}}}={\frac {-\left(f({\tilde {x}})-f(x_{n})\right)}{-({\tilde {x}}-x_{n})}}={\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
We get the same term as in the previous section. This gives the average speed, no matter if $x_{n}<{\tilde {x}}$ or $x_{n}>{\tilde {x}}$. Thus, in the case of a negative time interval with $x_{n}<{\tilde {x}}$ the average speed should also be close to the current speed of the car at the time ${\tilde {x}}$, if $x_{n}$ is only sufficiently close to ${\tilde {x}}$. There is
$f'({\tilde {x}})=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
where $(x_{n})_{n\in \mathbb {N} }$ is any sequence of different from ${\tilde {x}}$ with $\lim _{n\to \infty }x_{n}={\tilde {x}}$. The sequence elements of $(x_{n})_{n\in \in \mathbb {N} }$ can sometimes be larger and sometimes smaller than ${\tilde {x}}$ depending on the index $n$:

### Refining the definition

Let now $f:D\to \mathbb {R}$ be a real-valued function and let ${\tilde {x}}\in D$. As we have seen above, there is
$f'({\tilde {x}})=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
where $\left(x_{n}\right)_{n\in \mathbb {N} }$ is a sequence of arguments different from ${\tilde {x}}$ which converges to ${\tilde {x}}$. In order to have at least one such sequence of arguments, ${\tilde {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\subseteq \mathbb {R}$ is an interval and then every ${\tilde {x}}\in D$ is an accumulation point of $D$. For the definition of the differential quotient it should not matter which sequence $(x_{n})_{n\in \mathbb {N} }$ we choose. Accordingly, we can define the derivative:
We can shorten this definition by using limits for functions. As a reminder: There is according to definition: $\lim _{x\to c}g(x)=L$ if and only if $\lim _{n\to \infty }g(x_{n})=L$ for all sequences $(x_{n})_{n\in \mathbb {N} }$ of arguments non-equal to $c$ with $\lim _{n\to \infty }x_{n}=c$. So:

### The h-method

There is an equivalent option to define the derivative. For this we go from the differential quotient $\lim _{x\to {\tilde {x}}}{\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ and perform the substitution $x={\tilde {x}}+h$. The new variable $h$ just describes the difference between ${\tilde {x}}$ and the point where the difference quotient is formed. For $x\to {\tilde {x}}$, equivalently goes $h\to 0$. So we can also define the derivative as follows

### Applications in science and technology

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\to B$. Let $d_{A}(t)$ the concentration of the substance $A$ at time $t$. The derivative $d_{A}'(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 $d_{A}'(t)$ indicates the chemical reaction rate for the reaction $A\to 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
### Derivative and differentiability

Definition
Let $f:D\to \mathbb {R}$ with $D\subseteq \mathbb {R}$ and let ${\tilde {x}}\in D$ be an accumulation point of $D$. The function $f$ is differentiable at ${\tilde {x}}$ with derivative $f'({\tilde {x}})$, whenever:
$f'({\tilde {x}})=\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
Equivalently, we can require:
$f'({\tilde {x}})=\lim _{h\to 0}{\frac {f({\tilde {x}}+h)-f({\tilde {x}})}{h}}$
A function that can be differentiated at ${\tilde {x}}$ is called differentiable at the position ${\tilde {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

The terms "difference quotient" and "differential quotient" are mathematically defined as follows:
$\underbrace {f'({\tilde {x}})} _{\text{derivative}}=\underbrace {\lim _{x\to {\tilde {x}}}\underbrace {\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}} _{\text{difference quotient}}} _{\text{differential quotient}}$
The following definitions hold:
Definition (Difference quotient)
The difference quotient of a function $f:D\to \mathbb {R}$ with $D\subseteq \mathbb {R}$ for the interval $[{\tilde {x}},x]$ is the quotient
${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
This quotient corresponds to the slope of the secant between the points $({\tilde {x}},f({\tilde {x}}))$ and $(x,f(x))$.
Definition (Differential quotient)
Let $f:D\to \mathbb {R}$ with $D\subseteq \mathbb {R}$. Let ${\tilde {x}}\in D$ be an accumulation point of the domain $D$. The differential quotient of this function at ${\tilde {x}}$ is defined as the limit:
$\lim _{x\to {\tilde {x}}}{\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
If the limit exists, it coincides with the derivative $f'({\tilde {x}})$.

### Derivative function

If a function $f:D\to \mathbb {R}$ with $D\subseteq \mathbb {R}$ 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'({\tilde {x}})$ to every m argument ${\tilde {x}}$ is called derivative function of $f$:
Definition (Derivative function)
Let $f:D\to \mathbb {R}$ be a differentiable function with $D\subseteq \mathbb {R}$. We define the derivative function $f':D\to \mathbb {R}$ by
$f'({\tilde {x}}):=\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {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

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 ${\dot {x}}$, accordingly he denoted the second derivative by ${\ddot {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 ${\tfrac {\mathrm {d} f}{\mathrm {d} x}}(x)$. This notation is read as "d f over d x of x". The second derivative is then denoted ${\tfrac {\mathrm {d} ^{2}f}{\mathrm {d} x^{2}}}(x)$ and the $n$-th derivative is written as ${\tfrac {\mathrm {d} ^{n}f}{\mathrm {d} x^{n}}}(x)$.
The notation of Leibniz is mathematically speaking not a fraction! The symbols $\mathrm {d} f$ and $\mathrm {d} x$ 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 $\mathrm {d} f$ or $\mathrm {d} x$ 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 $D_{x}f(x)$ for the first derivative of $f$ dates back to Leonhard Euler. In this notation, the second derivative is written as $D^{2}f$ or $D_{x}^{2}f(x)$ and the $n$-th derivative as $D^{n}f$ or $D_{x}^{n}f(x)$.

### Overview about notations

| Notation of the … | 1st derivative | 2nd derivative | $n$-th derivative |
| Lagrange | $f'$ | $f''$ | $f^{(n)}$ |
| Newton | ${\dot {f}}$ | ${\ddot {f}}$ | ${\overset {\,n}{\dot {f}}}$ |
| Leibniz | ${\tfrac {\mathrm {d} f}{\mathrm {d} x}}$ | ${\tfrac {\mathrm {d} ^{2}f}{\mathrm {d} x^{2}}}$ | ${\tfrac {\mathrm {d} ^{n}f}{\mathrm {d} x^{n}}}$ |
| Euler | $Df$ | $D^{2}f$ | $D^{n}f$ |

## Derivative as tangential slope

The derivative $f'({\tilde {x}})$ corresponds to the limit value $\lim _{x\to {\tilde {x}}}{\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$. The difference quotient ${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ is the slope of the secant between the points $({\tilde {x}},f({\tilde {x}}))$ and $(x,f(x))$. In the case of the boundary value formation $x\to {\tilde {x}}$, this secant merges into the tangent that touches the graph of $f$ at the point $({\tilde {x}},f({\tilde {x}}))$:
Damit ist die derivative $f'({\tilde {x}})$ gleich der Steigung der Tangente am Graphen durch den Punkt $({\tilde {x}},f({\tilde {x}}))$. Die derivative kann also genutzt werden, um die Tangente an einem Graphen zu bestimmen. Somit löst sie auch ein geometrisches Problem. Mit $f'({\tilde {x}})$ kennen wir die Steigung der Tangente and with $({\tilde {x}},f({\tilde {x}}))$ einen Punkt auf der Tangente. Damit können wir die functionsgleichung dieser Tangente bestimmen.
Thus the derivative $f'({\tilde {x}})$ is equal to the slope of the tangent to the graph through the point $({\tilde {x}},f({\tilde {x}}))$. we may also use the derivative to compute the tangent to a graph. With $f'({\tilde {x}})$ we know the slope of the tangent. The offset can be determined using that $({\tilde {x}},f({\tilde {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 $({\tilde {x}},f({\tilde {x}}))$?
The general formula of a linear function $g$ is $g(x)=mx+y_{0}$. Where $m$ is the slope of $g$ and $y_{0}$ is the intersection of $g$ with the y-axis (offset). Now let $t$ be the tangent you are looking for. It has slope $f'({\tilde {x}})$ and therefore $t(x)=f'({\tilde {x}})\cdot x+y_{0}$.
So we only need to find the offset $y_{0}$ . Since $t$ passes through the point $({\tilde {x}},f({\tilde {x}}))$ , there is
${\begin{aligned}&f({\tilde {x}})=t({\tilde {x}})=f'({\tilde {x}})\cdot {\tilde {x}}+y_{0}\\\implies&y_{0}=f({\tilde {x}})-f'({\tilde {x}})\cdot {\tilde {x}}\end{aligned}}$
So
${\begin{aligned}t(x)&=f'({\tilde {x}})\cdot x+f({\tilde {x}})-f'({\tilde {x}})\cdot {\tilde {x}}\\&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})\end{aligned}}$
We note: knowing the derivative $f'({\tilde {x}})$ at a point (and the point itself) suffices for computing the equation of the tangent.

## Derivative as characterization of best approximations
### Approximating a differentiable function

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'({\tilde {x}})=\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
The difference quotient ${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ gets arbitrarily close to the derivative $f'({\tilde {x}})$, if $x$ gets sufficiently close to ${\tilde {x}}$. For $x\approx {\tilde {x}}$ we can write:
$f'({\tilde {x}})\approx {\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
In the following we assume, that the expression $x\approx {\tilde {x}}$ for "$x$ is approximately as large as ${\tilde {x}}$" is well defined and obeys the common arithmetic laws for equations. So we can change this equation to
${\begin{aligned}&&f'({\tilde {x}})&\approx {\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&\implies&f'({\tilde {x}})\cdot (x-{\tilde {x}})&\approx f(x)-f({\tilde {x}})\\[0.3em]&\implies&f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})&\approx f(x)\\[0.3em]&\implies&f(x)&\approx f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})\end{aligned}}$
If $x$ is sufficiently close to ${\tilde {x}}$, then $f(x)$ is approximately equal to $f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$. This value can thus be used as an approximation of $f(x)$ near the derivative position. The function with the assignment rule $x\mapsto f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$ is a linear function, since ${\tilde {x}}$ is an arbitrary but fixed point.
The assignment rule $t(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {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:
This line is described by the assignment rule $t(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$ and corresponds to the tangent of the graph at this position.

### Example: The sine for small angles

Let's take a look at the above mentioned example. For this we consider the sine function $\sin(x)$. Its graph is
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)\approx \sin(0)+\sin '(0)\cdot (x-0)=0+1\cdot (x-0)=x$
In the vicinity of zero, there is $\sin(x)\approx x$. This is the so called small-angle approximation. Thus, $\sin \left({\tfrac {1}{4}}\right)$ can be approximated by ${\tfrac {1}{4}}$. With $\sin \left({\tfrac {1}{4}}\right)=0{.}2474\ldots$ 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)\approx x$:
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)\approx x$ is therefore only meaningful for small arguments!

### Quality of approximations

How good is the approximation $f(x)\approx f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$? To answer this, let $\epsilon (x)$ be the value with
${\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}=f'({\tilde {x}})+\epsilon (x)$
The value $\epsilon (x)$ is therefore the difference between the difference quotient ${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ and the derivative $f'({\tilde {x}})$. This difference disappears in the limit $x\to {\tilde {x}}$, because for this limit the difference quotient turns into a differential quotient, i.e. the derivative $f'({\tilde {x}})$. There is also $\lim _{x\to {\tilde {x}}}\epsilon (x)=0$. Now we can rearrange the above equation and get
${\begin{aligned}&&{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}&=f'({\tilde {x}})+\epsilon (x)\\[0.3em]&\implies&f(x)-f({\tilde {x}})&=f'({\tilde {x}})\cdot (x-{\tilde {x}})+\epsilon (x)\cdot (x-{\tilde {x}})\\[0.3em]&\implies&f(x)&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\underbrace {\epsilon (x)\cdot (x-{\tilde {x}})} _{:=\ \delta (x)}\\[0.3em]&\implies&f(x)&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)\end{aligned}}$
The error between $f(x)$ and $f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$ is thus equal to the term $\delta (x)=\epsilon (x)\cdot (x-{\tilde {x}})$. Because of $\lim _{x\to {\tilde {x}}}\epsilon (x)=0$ there is
$\lim _{x\to {\tilde {x}}}\delta (x)=\lim _{x\to {\tilde {x}}}\underbrace {\epsilon (x)} _{\to 0}\cdot \underbrace {(x-{\tilde {x}})} _{\to 0}=0$
So the error $\delta (x)$ disappears for $x\to {\tilde {x}}$. But we can say even more: $\delta (x)$ decreases faster than a linear term towards zero. Even if we divide $\delta (x)$ by $x-{\tilde {x}}$ and thus greatly increase this term near ${\tilde {x}}$, then ${\tfrac {\delta (x)}{x-{\tilde {x}}}}$ disappears for $x\to {\tilde {x}}$. There is
$\lim _{x\to {\tilde {x}}}{\frac {\delta (x)}{x-{\tilde {x}}}}=\lim _{x\to {\tilde {x}}}{\frac {\epsilon (x)(x-{\tilde {x}})}{x-{\tilde {x}}}}=\lim _{x\to {\tilde {x}}}\epsilon (x)=0$
The error $\delta (x)$ in the approximation $f(x)\approx f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})$ thus falls off to zero faster than linear for $x\to {\tilde {x}}$. Let us summarize the previous argumentation in one theorem:
Theorem (Approximation of a differentiable function)
Let $f:D\to \mathbb {R}$ and let ${\tilde {x}}\in D$ be an accumulation point of $D$. Let also $f$ be differentiable at the point ${\tilde {x}}$ with the derivative $f'({\tilde {x}})$. Let $epsilon$ and $\delta$ be defined such that for all $x\in D$ there is
${\begin{aligned}f(x)&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\epsilon (x)\cdot (x-{\tilde {x}})\\[0.3em]&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)\end{aligned}}$
Then the error term $\epsilon (x)$ for $x\to {\tilde {x}}$ vanishes, i.e. $\lim _{x\to {\tilde {x}}}\epsilon (x)=0$. For $\delta (x)$ there is accordingly $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$.

### Alternative definition of the derivative

The fact that differentiable functions can be approximated by linear functions characterises the derivative. Every function $f$ is differentiable at the position ${\tilde {x}}$, if a real number $c\in \mathbb {R}$ (best approximation parameter) as well as a function $\delta$ exist, such that that $f(x)=f({\tilde {x}})+c\cdot (x-{\tilde {x}})+\delta (x)$ and $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$ apply. Its derivative is then $f'({\tilde {x}})=c$. There is
${\begin{aligned}f'({\tilde {x}})&=\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&=\lim _{x\to {\tilde {x}}}{\frac {f({\tilde {x}})+c\cdot (x-{\tilde {x}})+\delta (x)-f({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&=\lim _{x\to {\tilde {x}}}{\frac {c\cdot (x-{\tilde {x}})+\delta (x)}{x-{\tilde {x}}}}\\[0.3em]&=\lim _{x\to {\tilde {x}}}c+\underbrace {\frac {\delta (x)}{x-{\tilde {x}}}} _{\to 0}\\[0.3em]&=c\end{aligned}}$
So we can also define the derivative as follows:
Definition (Alternative definition of the derivative)
Let $f:D\to \mathbb {R}$ be a function and ${\tilde {x}}\in D$ an accumulation point of $D$. The function $f$ is differentiable with the derivative $f'({\tilde {x}})\in \mathbb {R}$ at the point ${\tilde {x}}$ if a function $\delta :D\to \mathbb {R}$ exists, such that
$f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)$
and $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$ holds.

### Describing derivatives using a continuous function

There is a further characterisation of derivative. We start with the formula
${\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}=f'({\tilde {x}})+\epsilon (x)$
Where $\epsilon (x)$ is the difference between the difference quotient and the derivative (which disappears for $x\to {\tilde {x}}$). If we rearrange this formula we get:
${\begin{aligned}&&{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}&=f'({\tilde {x}})+\epsilon (x)\\[0.3em]&\implies&f(x)-f({\tilde {x}})&=f'({\tilde {x}})\cdot (x-{\tilde {x}})+\epsilon (x)\cdot (x-{\tilde {x}})\\[0.3em]&\implies&f(x)&=f({\tilde {x}})+(f'({\tilde {x}})+\epsilon (x))\cdot (x-{\tilde {x}})\\[0.3em]&&&\ {\color {Gray}\left\downarrow \ \varphi (x)=f'({\tilde {x}})+\epsilon (x)\right.}\\[0.3em]&\implies&f(x)&=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})\end{aligned}}$
The function $\varphi (x)$ for $x\to {\tilde {x}}$ has the property
$\lim _{x\to {\tilde {x}}}\varphi (x)=\lim _{x\to {\tilde {x}}}(f'({\tilde {x}})+\underbrace {\epsilon (x)} _{\to 0})=f'({\tilde {x}})$
Thus $\varphi (x)$ can be extended to a function which is continuous at the position ${\tilde {x}}$, whereby the function value is set $\varphi ({\tilde {x}})=f'({\tilde {x}})$. This representation of a differentiable function allows a further characterisation of continuous functions:
Theorem (Equivalent characterisation of the derivative)
A function $f:D\to \mathbb {R}$ is differentiable in ${\tilde {x}}\in D$ if and only if there is a function $\varphi :D\to \mathbb {R}$ continuous in ${\tilde {x}}$ with:
$f(x)=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})$
In that case, $\varphi ({\tilde {x}})=f'({\tilde {x}})$.
Proof (Equivalent characterisation of the derivative)
Proof step: $f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)$ with $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$ $\Longrightarrow$ $f(x)=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})$ with $\varphi ({\tilde {x}})=f'({\tilde {x}})$
Let $f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)$, where $\delta :D\to \mathbb {R}$ is a function with $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$. Now, for $x\in D\setminus \{{\tilde {x}}\}$ there is
${\begin{aligned}f(x)&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)\\[0.3em]&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+{\tfrac {\delta (x)(x-{\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&=f({\tilde {x}})+\left(f'({\tilde {x}})+{\tfrac {\delta (x)}{x-{\tilde {x}}}}\right)\cdot (x-{\tilde {x}})\end{aligned}}$
We now define $\varphi :D\to \mathbb {R} ,\varphi (x)=f'({\tilde {x}})+{\tfrac {\delta (x)}{x-{\tilde {x}}}}$. Then we get
$\lim _{x\to {\tilde {x}}}\varphi (x)=\lim _{x\to {\tilde {x}}}f'({\tilde {x}})+\underbrace {\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}} _{=0}=f'({\tilde {x}})$
So $\varphi$ is continuous in ${\tilde {x}}\in D$ with $\varphi ({\tilde {x}})=f'({\tilde {x}})$.
Proof step: $f(x)=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})$ with $\varphi ({\tilde {x}})=f'({\tilde {x}})$ $\Longrightarrow$ $f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)$ with $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$
Let now $f(x)=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})$ with a function $\varphi :D\to \mathbb {R}$ continuous in ${\tilde {x}}\in D$ , where $\varphi ({\tilde {x}})=f'({\tilde {x}})$. For $x\in D\setminus \{{\tilde {x}}\}$ there is then
${\begin{aligned}f(x)&=f({\tilde {x}})+\varphi (x)\cdot (x-{\tilde {x}})\\[0.3em]&=f({\tilde {x}})+(\varphi (x)+\varphi ({\tilde {x}})-\varphi ({\tilde {x}}))\cdot (x-{\tilde {x}})\\[0.3em]&=f({\tilde {x}})+\varphi ({\tilde {x}})\cdot (x-{\tilde {x}})+(\varphi (x)-\varphi ({\tilde {x}}))\cdot (x-{\tilde {x}})\\[0.3em]&=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+(\varphi (x)-\varphi ({\tilde {x}}))\cdot (x-{\tilde {x}})\end{aligned}}$
Now, we define $\delta :D\to \mathbb {R} ,\delta (x)=(\varphi (x)-\varphi ({\tilde {x}}))\cdot (x-{\tilde {x}})$ and get
$\lim _{x\to {\tilde {x}}}{\frac {\delta (x)}{x-{\tilde {x}}}}=\lim _{x\to {\tilde {x}}}(\varphi (x)-\varphi ({\tilde {x}}))=\varphi ({\tilde {x}})-\varphi ({\tilde {x}})=0$

## Derivative as generalized slope

The slope is initially only defined for linear functions $g$ with the assignment rule $g(x)=mx+b$ where $m,b\in \mathbb {R}$. 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 ${\tilde {x}}$ from the domain of definition $g$ there is:
${\begin{aligned}{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}&={\frac {(mx+b)-(m{\tilde {x}}+b)}{x-{\tilde {x}}}}\\[0.3em]&={\frac {mx-m{\tilde {x}}}{x-{\tilde {x}}}}\\[0.3em]&={\frac {m(x-{\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&=m\end{aligned}}$
Now $m$ is also the derivative of $g$ at every accumulation point ${\tilde {x}}$ of the domain of definition:
${\begin{aligned}g'({\tilde {x}})&=\lim _{x\to {\tilde {x}}}{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ {\text{see calculation above}}\right.}\\[0.3em]&=\lim _{x\to {\tilde {x}}}m=m\end{aligned}}$
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 $\rightarrow$ 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
### Example of a differentiable function

Example (The square function is differentiable at $x=3$)
The square function $f:\mathbb {R} \to \mathbb {R} :x\mapsto x^{2}$ can be differentiated at the position $x_{0}=3$ with derivative $6$. We get this result if we evaluate the differential quotient at the position $x_{0}=3$:
${\begin{aligned}f'(3)&=\lim _{h\to 0}{\frac {f(3+h)-f(3)}{h}}=\lim _{h\to 0}{\frac {(3+h)^{2}-3^{2}}{h}}\\[0.3em]&=\lim _{h\to 0}{\frac {9+6h+h^{2}-9}{h}}=\lim _{h\to 0}{\frac {6h+h^{2}}{h}}=\lim _{h\to 0}{(6+h)}\end{aligned}}$
The latter expression shows that the difference quotient is equal to $6+h$ for $h\neq 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\to 0$:
$\lim _{h\to 0}{(6+h)}=6+0=6$
Thus the derivative of $f$ at the position $x_{0}=3$ is equal to $6$, i.e. $f'(3)=6$. Analogously, we can determine the derivative of $f$ at any position ${\tilde {x}}\in \mathbb {R}$:
${\begin{aligned}f'({\tilde {x}})&=\lim _{h\to 0}{\frac {f({\tilde {x}}+h)-f({\tilde {x}})}{h}}=\lim _{h\to 0}{\frac {({\tilde {x}}+h)^{2}-{\tilde {x}}^{2}}{h}}\\[0.3em]&=\lim _{h\to 0}{\frac {{\tilde {x}}^{2}+2{\tilde {x}}h+h^{2}-{\tilde {x}}^{2}}{h}}=\lim _{h\to 0}{\frac {2{\tilde {x}}h+h^{2}}{h}}\\[0.3em]&=\lim _{h\to 0}{(2{\tilde {x}}+h)}=2{\tilde {x}}\end{aligned}}$
Thus the derivative of the square function at the position ${\tilde {x}}$ is equal to $f'({\tilde {x}})=2{\tilde {x}}$. The derivative function of $f$ is therefore the function $f':\mathbb {R} \to \mathbb {R} :x\mapsto 2x$.

### Example of a non-differentiable function

Example (Absolute value function is not differentiable)
We consider the absolute value function $f:\mathbb {R} \to \mathbb {R} ,x\mapsto |x|$ and check whether it can be differentiated at the position $x_{0}=0$. Here we select the sequences $(x_{n})_{n\in \mathbb {N} }$, $({\tilde {x}}_{n})_{n\in \mathbb {N} }$ and $({\hat {x}}_{n})_{n\in \mathbb {N} }$ with
$x_{n}={\frac {1}{n}},\quad {\tilde {x}}_{n}=-{\frac {1}{n}},\quad {\hat {x}}_{n}=(-1)^{n}{\frac {1}{n}}$
These all converge to $x_{0}=0$. What are the differential quotients corresponding to those sequences? For $(x_{n})_{n\in \mathbb {N} }$ there is:
${\begin{aligned}\lim _{n\rightarrow \infty }{\frac {f(x_{n})-f(x_{0})}{x_{n}-x_{0}}}&=\lim _{n\rightarrow \infty }{\frac {|{\frac {1}{n}}|-|0|}{{\frac {1}{n}}-0}}=\lim _{n\rightarrow \infty }{\frac {\frac {1}{n}}{\frac {1}{n}}}\\[0.3em]&=\lim _{n\rightarrow \infty }{1}=1\end{aligned}}$
For $({\tilde {x}}_{n})_{n\in \mathbb {N} }$ we get:
${\begin{aligned}\lim _{n\rightarrow \infty }{\frac {f({\tilde {x}}_{n})-f(x_{0})}{{\tilde {x}}_{n}-x_{0}}}&=\lim _{n\rightarrow \infty }{\frac {|-{\tfrac {1}{n}}|-|0|}{-{\tfrac {1}{n}}-0}}=\lim _{n\rightarrow \infty }{\frac {\tfrac {1}{n}}{-{\tfrac {1}{n}}}}\\[0.3em]&=\lim _{n\rightarrow \infty }{-1}=-1\end{aligned}}$
For $({\hat {x}}_{n})_{n\in \mathbb {N} }$ there is:
${\begin{aligned}\lim _{n\rightarrow \infty }{\frac {f({\hat {x}}_{n})-f(x_{0})}{{\hat {x}}_{n}-x_{0}}}&=\lim _{n\rightarrow \infty }{\frac {|(-1)^{n}{\tfrac {1}{n}}|-|0|}{(-1)^{n}{\tfrac {1}{n}}-0}}\\[0.3em]&=\lim _{n\rightarrow \infty }{\frac {\tfrac {1}{n}}{(-1)^{n}{\tfrac {1}{n}}}}=\lim _{n\rightarrow \infty }{(-1)^{n}}\end{aligned}}$
This limit for the sequence $({\hat {x}}_{n})_{n\in \mathbb {N} }$ does not exist. We therefore see that depending on the sequence $(a_{n})_{n\in \mathbb {N} }$ chosen, the limit value $\lim _{n\to \infty }{\tfrac {f(a_{n})-f(x_{0})}{a_{n}-x_{0}}}$ is different or does not exist. Thus, according to definition, the limit value $\lim _{x\to x_{0}}{\tfrac {f(x)-f(x_{0})}{x-x_{0}}}$ does not exist either. So the function $f$ cannot be differentiated at the position $x_{0}=0$. The absolute value function has no derivative at zero.

## Left-hand and right-hand derivative
### Definition

The derivative of a function $f:D\to \mathbb {R}$ is the limit of the difference quotient ${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ for $x\to {\tilde {x}}$. The difference quotient can be understood as a function $D\setminus \{{\tilde {x}}\}\to \mathbb {R}$, which is defined for all $x\in D$ except for $x={\tilde {x}}$. So $\lim _{x\to {\tilde {x}}}{\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {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 ${\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$ are considered, where $xis<{\tilde {x}}$. Then it is checked whether the difference quotient converges to a number in the limit $x\to {\tilde {x}}$ converge against a number. If the answer is yes, then this number is the left-hand derivative at that point:
${f_{-}}'({\tilde {x}})=\lim _{x\uparrow {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
Here ${f_{-}}'({\tilde {x}})$ is the notation for the left-hand derivative of $f$ at the position ${\tilde {x}}$. For this limit to make sense, there must be at least one sequence $(x_{n})_{n\in \mathbb {N} }$ of arguments that converges from the left towards ${\tilde {x}}$. So ${\tilde {x}}$ has to be an accumulation point of the set $D\cap (-\infty ,{\tilde {x}})=\{x\in D:x<{\tilde {x}}\}$.
Definition (Left-hand derivative)
Let $f:D\to \mathbb {R}$ be a function and ${\tilde {x}}$ an accumulation point of the set $\{x\in D:x<{\tilde {x}}\}$. The number ${f_{-}}'({\tilde {x}})$ is the left-hand derivative of $f$ at the position ${\tilde {x}}$, if there is
${f_{-}}'({\tilde {x}})=\lim _{x\uparrow {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
This is equivalent to the statement that for all sequences $(x_{n})_{n\in \mathbb {N} }$ from $\mathbb {N}$ with $x_{n}\in D$ and $x_{n}<{\tilde {x}}$ and $\lim _{n\to \infty }x_{n}={\tilde {x}}$ there is
${f_{-}}'({\tilde {x}})=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$
Analogously, the right-hand derivative can be defined as follows:
Definition (Right-hand derivative)
Let $f:D\to \mathbb {R}$ be a function and ${\tilde {x}}$ an accumulation point of the set $\{x\in D:x>{\tilde {x}}\}$. The number ${f_{+}}'({\tilde {x}})$ is the right-hand derivative of $f$ at the position ${\tilde {x}}$, if there is
${f_{+}}'({\tilde {x}})=\lim _{x\downarrow {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
This is equivalent to the statement that for all sequences $(x_{n})_{n\in \mathbb {N} }$ from $\mathbb {N}$ with $x_{n}\in D$ and $x_{n}>{\tilde {x}}$ and $\lim _{n\to \infty }x_{n}={\tilde {x}}$ there is
${f_{+}}'({\tilde {x}})=\lim _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {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:

### Example

We have already shown that the absolute value function $f:\mathbb {R} \to \mathbb {R} :x\mapsto |x|$ is not differentiable at ${\tilde {x}}=0$. However, we can still show that the right-hand derivative exists at this position and is equal to $1$:
${\begin{aligned}{f_{+}}'(0)&=\lim _{x\downarrow 0}{\frac {f(x)-f(0)}{x-0}}=\lim _{x\downarrow 0}{\frac {|x|-|0|}{x}}\\[0.3em]&\ {\color {OliveGreen}\left\downarrow \ x>0\implies |x|=x\right.}\\[0.3em]&=\lim _{x\downarrow 0}{\frac {x-0}{x}}=\lim _{x\downarrow 0}1=1\end{aligned}}$
Analogously, we can show that the left-hand derivative is equal to $-1$ at this position:
${\begin{aligned}{f_{-}}'(0)&=\lim _{x\uparrow 0}{\frac {f(x)-f(0)}{x-0}}=\lim _{x\uparrow 0}{\frac {|x|-|0|}{x}}\\[0.3em]&\ {\color {OliveGreen}\left\downarrow \ x<0\implies |x|=-x\right.}\\[0.3em]&=\lim _{x\uparrow 0}{\frac {-x-0}{x}}=\lim _{x\uparrow 0}-1=-1\end{aligned}}$
Since the right-hand and left-hand derivatives do not coincide, the absolute value function cannot be differentiated at ${\tilde {x}}=0$. At this point, it has left-hand and right-hand derivatives, but no general derivative.
Weil die rechtsseitige and die linksseitige derivative nicht übereinstimmen, ist die Betragsfunktion an der Stelle ${\tilde {x}}=0$ nicht ableitbar. Sie besitzt dort zwar links- and rechtsseitige derivativeen, aber keine derivative.

## Differentiable functions do not have kinks

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 $\xi =0$, so that the left-hand and right-hand derivative are different. If we go to $\xi =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 $\operatorname {sgn}(x)$ with the definition
$\operatorname {sgn}(x)={\begin{cases}1&x>0\\0&x=0\\-1&x<0\end{cases}}$
Its graph is
This function is not differentiable at the zero point ${\tilde {x}}=0$, because near the the "jump" of the function, the difference quotient converges towards infinity. For the right-hand derivative there is for example:
$\lim _{h\downarrow 0}{\frac {\operatorname {sgn}(h)-\operatorname {sgn}(0)}{h}}=\lim _{h\downarrow 0}{\frac {1-0}{h}}=\lim _{h\downarrow 0}{\frac {1}{h}}=\infty$
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

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:
${\begin{aligned}&{\text{continuously differentiability}}\\\implies&{\text{differentiability}}\\\implies&{\text{continuity}}\end{aligned}}$
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

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\to \mathbb {R}$ with $D\subseteq \mathbb {R}$ be a function, that is differentiable at ${\tilde {x}}\in D$ . Then, $f$ is also continuous at ${\tilde {x}}$ . Consequently, every differentiable function $f$ is continuous.
Proof
Let $(x_{n})_{n\in \mathbb {N} }$ be any sequence in $D$ converging to ${\tilde {x}}$. Since $f$ is differentiable in ${\tilde {x}}\in D$ , there is a function $\delta :D\to \mathbb {R}$ ("approximation error") with $\lim _{x\to {\tilde {x}}}{\tfrac {\delta (x)}{x-{\tilde {x}}}}=0$, such that for all $x$ in $D$ we have
$f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)$
In this case, we will also have $\lim _{x\to {\tilde {x}}}\delta (x)=0$ . Since $\lim _{n\to \infty }{x_{n}}={\tilde {x}}$ , we will also have $\lim _{n\to \infty }{\delta (x_{n})}=0$ . So there is:
${\begin{aligned}&\lim _{n\to \infty }{f(x_{n})}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta (x)\right.}\\[0.3em]=\ &\lim _{n\to \infty }{f({\tilde {x}})+f'({\tilde {x}})\cdot (x_{n}-{\tilde {x}})+\delta (x_{n})}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ {\text{pull appart the limit}}\right.}\\[0.3em]=\ &\lim _{n\to \infty }\underbrace {f({\tilde {x}})} _{\to f({\tilde {x}})}+\lim _{n\to \infty }f'({\tilde {x}})\cdot \underbrace {(x_{n}-{\tilde {x}})} _{\to 0}+\lim _{n\to \infty }\underbrace {\delta (x_{n})} _{\to 0}\\[0.3em]=\ &f({\tilde {x}})+0+0\\[0.3em]=\ &f({\tilde {x}})\end{aligned}}$
We were allowed to pull the limits apart here because the limits $\lim _{n\to \infty }{f({\tilde {x}})}=f({\tilde {x}})$, $\lim _{n\to \infty }{f'({\tilde {x}})\cdot (x_{n}-{\tilde {x}})}=0$ and $\lim _{n\to \infty }{\delta (x_{n})}=0$ exist. According to the sequence definition for continuity, $\lim _{n\to \infty }{f(x_{n})}=f({\tilde {x}})$ implies that $f$ is continuous at ${\tilde {x}}$.
Alternative proof
Let $(x_{n})_{n\in \mathbb {N} }$ be a sequence in $D$ converging towards ${\tilde {x}}$ and whose sequence elements are not equal to ${\tilde {x}}$. There is also $\lim _{n\to \infty }(x_{n}-{\tilde {x}})=0$ and $x_{n}-{\tilde {x}}\neq 0$ for all $n\in \mathbb {N}$. Since $f$ is differentiable in ${\tilde {x}}\in D$, there is $f'({\tilde {x}})=\lim _{n\rightarrow \infty }{\tfrac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}$. The derivative of $f$ in the point ${\tilde {x}}$ is a real number. Then, there is:
${\begin{aligned}&\lim _{n\rightarrow \infty }{f(x_{n})-f({\tilde {x}})}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ \forall n\in \mathbb {N} :x_{n}-{\tilde {x}}\neq 0\right.}\\[0.3em]=\ &\lim _{n\rightarrow \infty }{\frac {(f(x_{n})-f({\tilde {x}}))\cdot (x_{n}-{\tilde {x}})}{x_{n}-{\tilde {x}}}}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ {\text{pull appart the limit}}\right.}\\[0.3em]=\ &\lim _{n\rightarrow \infty }\underbrace {\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}} _{\to f'({\tilde {x}})}\cdot \lim _{n\rightarrow \infty }\underbrace {(x_{n}-{\tilde {x}})} _{\to 0}\ \\[0.3em]=\ &f'({\tilde {x}})\cdot 0\\[0.3em]=\ &0\end{aligned}}$
We were allowed to pull the limits apart here because the limit values $\lim _{n\rightarrow \infty }{\tfrac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}=f'({\tilde {x}})$ and $\lim _{n\rightarrow \infty }{(x_{n}-{\tilde {x}})}=0$ exist. Thus $\lim _{n\to \infty }f(x_{n})=f({\tilde {x}})$ as long as the sequence $(x_{n})_{n\in \mathbb {N} }$ attains the value ${\tilde {x}}$ at most a finite number of times and $x_{n}\to {\tilde {x}}$ holds.
Let now $({\hat {x}}_{n})_{n\in \mathbb {N} }$ be any sequence in $D$ which converges towards ${\tilde {x}}$ and whose sequence elements infinitely often attain the value ${\tilde {x}}$. In this case, we take the subsequence of $({\hat {x}}_{n})_{n\in \mathbb {N} }$ with sequence elements unequal to ${\tilde {x}}$ and also obtain the function value limit $f({\tilde {x}})$. The partial sequence of elements ${\tilde {x}}$ is constant and its function values trivially converge to $f({\tilde {x}})$. Thus the sequence $(f({\hat {x}}_{n}))_{n\in \mathbb {N} }$ can be split into two subsequences, both of which converge towards $f({\tilde {x}})$. So we have $\lim _{n\to \infty }f({\hat {x}}_{n})=f({\tilde {x}})$.
Hence, for every sequence $({\hat {x}}_{n})_{n\in \mathbb {N} }$ in $D$ which converges towards ${\tilde {x}}$, there is $\lim _{n\to \infty }f({\hat {x}}_{n})=f({\tilde {x}})$. So $f$ is continuous at the position ${\tilde {x}}$.

### Application: Non-continuous functions are not differentiable

From the previous section we know that every differentiable function is continuous:
${\text{differentiability}}\implies {\text{continuity}}$
Applying the principle of contraposition to this implication, we also get:
${\text{non-continuity}}\implies {\text{non-differentiability}}$

### Example: Non-continuous functions are not differentiable

Take, as an for example the sign function
$\operatorname {sgn} :\mathbb {R} \to \mathbb {R} :x\mapsto f(x)={\begin{cases}1&x>0\\0&x=0\\-1&x<0\end{cases}}$
It is not continuous at ${\tilde {x}}=0$. So it is also not differentiable there. We can prove non-continuity by taking a sequence $x_{n}={\tfrac {1}{n}}$. This sequence converges towards zero. If the sign function was differentiable, then the limit value $\lim _{n\rightarrow \infty }{\tfrac {f(x_{n})-f(0)}{x_{n}-0}}$ would have to exist. However
$\lim _{n\rightarrow \infty }{\frac {f\left({\frac {1}{n}}\right)-f(0)}{{\frac {1}{n}}-0}}=\lim _{n\rightarrow \infty }{\frac {1-0}{{\frac {1}{n}}-0}}=\lim _{n\rightarrow \infty }{n}=\infty$
The limit value does not exist in $\mathbb {R}$. Therefore the sign function is - as expected - not differentiable at ${\tilde {x}}=0$.

### Not every differentiable function is continuously differentiable

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:\mathbb {R} \to \mathbb {R} :x\mapsto f(x)={\begin{cases}x^{2}\cdot \sin \left({\frac {1}{x}}\right)&x\neq 0\\0&x=0\end{cases}}$
At ${\tilde {x}}\neq 0$ , the product and chain rule (which we will derive later) tells us that the function is infinitely often continuously differentiable. However, at ${\tilde {x}}=0$ there is
$f'(0)=\lim _{h\to 0}{\frac {h^{2}\sin \left({\frac {1}{h}}\right)-0}{h}}=\lim _{h\to 0}\underbrace {h} _{\to 0}\cdot \underbrace {\sin \left({\frac {1}{h}}\right)} _{\in [-1,1]}=0$
So $f$ is also differentiable at ${\tilde {x}}=0$ with derivative $f'(0)=0$. However, the derivative function $f'$ is not continuous at ${\tilde {x}}=0$ . To show this, we have to determine the derivative function. For ${\tilde {x}}\neq 0$ , the product and chain rule yield
${\begin{aligned}f'({\tilde {x}})&=\left(x^{2}\cdot \sin \left({\frac {1}{x}}\right)\right)'\\[0.3em]&=2x\sin \left({\frac {1}{x}}\right)+x^{2}\cos \left({\frac {1}{x}}\right)\left(-{\frac {1}{x^{2}}}\right)\\[0.3em]&=2x\cdot \sin \left({\frac {1}{x}}\right)-\cos \left({\frac {1}{x}}\right)\end{aligned}}$
Together with the derivative value $f'(0)=0$ we get the derivative function
$f':\mathbb {R} \to \mathbb {R} :x\mapsto f'(x)={\begin{cases}2x\cdot \sin \left({\frac {1}{x}}\right)-\cos \left({\frac {1}{x}}\right)&x\neq 0\\0&x=0\end{cases}}$
To show the discontinuity of $f'$ at ${\tilde {x}}=0$ we use the sequence definition of continuity. Let us take the sequence $(x_{n})_{n\in \mathbb {N} }$ with $x_{n}={\tfrac {1}{n\pi }}$. There is $\lim _{n\to \infty }x_{n}=0$. If $f'$ was continuous, then according to the sequence criterion, $\lim _{n\to \infty }f'(x_{n})=0=f'(0)=f'\left(\lim _{n\to \infty }x_{n}\right)$ should apply. But now
${\begin{aligned}\lim _{n\to \infty }f'(x_{n})&=\lim _{n\to \infty }\left(2x_{n}\cdot \sin \left({\frac {1}{x_{n}}}\right)-\cos \left({\frac {1}{x_{n}}}\right)\right)\\[0.3em]&=\lim _{n\to \infty }\left(2{\frac {1}{n\pi }}\cdot \sin(n\pi )-\cos(n\pi )\right)\\[0.3em]&=\lim _{n\to \infty }\left(2{\frac {1}{n\pi }}\cdot 0-(-1)^{n}\right)\\[0.3em]&=\lim _{n\to \infty }-(-1)^{n}\end{aligned}}$
The limit value $\lim _{n\to \infty }(-1)^{n}$ does not exist, because the sequence $\left((-1)^{n}\right)_{n\in \mathbb {N} }$ has the two accumulation points $1$ and $-1$. It follows that $f'$ is not continuous at ${\tilde {x}}=0$. Therefore, $f$ is differentiable, but not continuously differentiable.

## Exercises
### Hyperbolic function

Math for Non-Geeks: Template:Aufgabe

### Root function

Math for Non-Geeks: Template:Aufgabe

### Determining limits

Exercise (Determining limits with differential quotients)
Let $f:D\to \mathbb {R}$ be differentiable in $a\in D$. Show that the following limits hold:
* $\lim _{h\to 0}{\frac {f(a-h)-f(a)}{h}}=-f'(a)$
* $\lim _{h\to 0}{\frac {f(a+h)-f(a-h)}{h}}=f'(a)$
* Does the reverse statement also hold for the limit value $\lim _{h\to 0}{\tfrac {f(a+h)-f(a-h)}{h}}=f'(a)$? I.e. if the limit value $\lim _{h\to 0}{\tfrac {f(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
$\lim _{h\to 0}{\frac {f(a+h)-f(a)}{h}}=f'(a)$
If we substitute $h=-{\tilde {h}}$, then there is $h\to 0\iff {\tilde {h}}\to 0$. Hence
${\begin{aligned}\lim _{h\to 0}{\frac {f(a-h)-f(a)}{h}}&{\overset {{\tilde {h}}=-h}{=}}\lim _{{\tilde {h}}\to 0}{\frac {f(a+{\tilde {h}})-f(a)}{-{\tilde {h}}}}\\[0.3em]&=-\lim _{{\tilde {h}}\to 0}{\frac {f(a+{\tilde {h}})-f(a)}{\tilde {h}}}=-f'(a)\end{aligned}}$
Solution sub-exercise 2:
Here, we have
${\begin{aligned}\lim _{h\to 0}{\frac {f(a+h)-f(a-h)}{2h}}&=\lim _{h\to 0}{\frac {f(a+h)-f(a)-(f(a-h)-f(a))}{2h}}\\[0.3em]&={\frac {1}{2}}\cdot \underbrace {\lim _{h\to 0}{\frac {f(a+h)-f(a)}{h}}} _{=f'(a)}-{\frac {1}{2}}\cdot \underbrace {\lim _{h\to 0}{\frac {f(a-h)-f(a)}{h}}} _{=-f'(a)}\\[0.3em]&={\frac {1}{2}}f'(a)+{\frac {1}{2}}f'(a)=f'(a)\end{aligned}}$
Solution sub-exercise 3:
The converse is not true. To show this we consider the function $f:\mathbb {R} \to \mathbb {R} ,\ f(x)=|x|$ in $a=0$. For this function we have the limit value
${\begin{aligned}\lim _{h\to 0}{\frac {f(0+h)-f(0-h)}{h}}&=\lim _{h\to 0}{\frac {|h|-|-h|}{h}}\\[0.3em]&=\lim _{h\to 0}{\frac {|h|-|h|}{h}}=\lim _{h\to 0}{\frac {0}{h}}=0\end{aligned}}$
However, the absolute function is not differentiable at 0.

### Criterion for differentiability

Math for Non-Geeks: Template:Aufgabe