# Real functions/Differentiability/Introduction/Section

In this section, we consider functions
    $f\colon D\longrightarrow \mathbb {R} ,$
where $D\subseteq \mathbb {R}$ is a subset of the real numbers. We want to explain what it means that such a function is differentiable in a point $a\in D$. The intuitive idea is to look at another point $x\in D$, and to consider the secant, given by the two points $(a,f(a))$ and $(x,f(x))$, and then to let "$x$ move towards $a$“. If this limiting process makes sense, the secants tend to become a tangent. However, this process only has a precise basis, if we use the concept of the limit of a function as defined earlier.

## Definition

Let $D\subseteq \mathbb {R}$ be a subset, $a\in D$ a point, and
    $f\colon D\longrightarrow \mathbb {R}$
a function. For $x\in D$, $x\neq a$, the number
    ${\frac {f(x)-f(a)}{x-a}}$
is called the difference quotient of $f$ for
$a$
$x$
The difference quotient is the slope of the secant at the graph, running through the two points $(a,f(a))$ and $(x,f(x))$. For $x=a$, this quotient is not defined. However, a useful limit might exist for $x\rightarrow a$. This limit represents, in the case of existence, the slope of the tangent for $f$ in the point $(a,f(a))$.

## Definition

Let $D\subseteq \mathbb {R}$ be a subset, $a\in D$ a point, and
    $f\colon D\longrightarrow \mathbb {R}$
a function. We say that $f$ is differentiable in $a$ if the limit
    $\operatorname {lim} _{x\in D\setminus \{a\},\,x\rightarrow a}\,{\frac {f(x)-f(a)}{x-a}}$
exists. In the case of existence, this limit is called the derivative of $f$ in $a$, written
    $f'(a).$
The derivative in a point $a$ is, if it exists, an element in $\mathbb {R}$. Quite often one takes the difference $h:=x-a$ as the parameter for this limiting process, that is, one considers
    $\operatorname {lim} _{h\rightarrow 0}\,{\frac {f(a+h)-f(a)}{h}}.$
The condition $x\in D\setminus \{a\}$ translates then to $a+h\in D$, $h\neq 0$. If the Function $f$ describes a one-dimensional movement, meaning a time-dependent process on the real line, then the difference quotient ${\frac {f(x)-f(a)}{x-a}}$ is the average velocity between the (time) points $a$ and $x$ and $f'(a)$ is the instantaneous velocity in $a$.

## Example

Let $s,c\in \mathbb {R}$, and let
    $\alpha \colon \mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto sx+c,$
be an affine-linear function. To determine the derivative in a point $a\in \mathbb {R}$, we consider the difference quotient
    ${\frac {(sx+c)-(sa+c)}{x-a}}={\frac {sx-sa}{x-a}}=s\,.$
This is constant and equals $s$, so that the limit of the difference quotient as $x$ tends to $a$ exists and equals $s$ as well. Hence, the derivative exists in every point and is just $s$. The slope of the affine-linear function is also its derivative.

## Example

We consider the function
    $f\colon \mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto x^{2}.$
The difference quotient for $a$ and $a+h$ is
    ${\frac {f(a+h)-f(a)}{h}}={\frac {(a+h)^{2}-a^{2}}{h}}={\frac {a^{2}+2ah+h^{2}-a^{2}}{h}}={\frac {2ah+h^{2}}{h}}=2a+h\,.$
The limit of this, as $h$ tends to $0$, is $2a$. The derivative of $f$ in $a$ is therefore $f'(a)=2a$.