# Darboux's theorem (analysis)

In mathematics, Darboux's theorem is a theorem in real analysis, named after Jean Gaston Darboux. It states that every function that results from the differentiation of another function has the intermediate value property: the image of an interval is also an interval.
When ƒ is continuously differentiable (ƒ in C$^1$([a,b])), this is a consequence of the intermediate value theorem. But even when ƒ′ is not continuous, Darboux's theorem places a severe restriction on what it can be.

## Darboux's theorem

Let $I$ be a closed interval, $f\colon I\to \mathbb {R}$ be a real-valued differentiable function. Then $f'$ has the intermediate value property: If $a$ and $b$ are points in $I$ with $a<b$, then for every $y$ between $f'(a)$ and $f'(b)$, there exists an $x$ in $[a,b]$ such that $f'(x)=y$.

## Proofs

Proof 1. The first proof is based on the extreme value theorem.
If $y$ equals $f'(a)$ or $f'(b)$, then setting $x$ equal to $a$ or $b$, respectively, gives the desired result. Now assume that $y$ is strictly between $f'(a)$ and $f'(b)$, and in particular that $f'(a)>y>f'(b)$. Let $\varphi \colon I\to \mathbb {R}$ such that $\varphi (t)=f(t)-yt$. If it is the case that $f'(a)<y<f'(b)$ we adjust our below proof, instead asserting that $\varphi$ has its minimum on $[a,b]$.
Since $\varphi$ is continuous on the closed interval $[a,b]$, the maximum value of $\varphi$ on $[a,b]$ is attained at some point in $[a,b]$, according to the extreme value theorem.
Because $\varphi '(a)=f'(a)-y>0$, we know $\varphi$ cannot attain its maximum value at $a$. (If it did, then $(\varphi (t)-\varphi (a))/(t-a)\leq 0$ for all $t\in (a,b]$, which implies $\varphi '(a)\leq 0$.)
Likewise, because $\varphi '(b)=f'(b)-y<0$, we know $\varphi$ cannot attain its maximum value at $b$.
Therefore, $\varphi$ must attain its maximum value at some point $x\in (a,b)$. Hence, by Fermat's theorem, $\varphi '(x)=0$, i.e. $f'(x)=y$.
Proof 2. The second proof is based on combining the mean value theorem and the intermediate value theorem.
Define $c={\frac {1}{2}}(a+b)$. For $a\leq t\leq c,$ define $\alpha (t)=a$ and $\beta (t)=2t-a$. And for $c\leq t\leq b,$ define $\alpha (t)=2t-b$ and $\beta (t)=b$.
Thus, for $t\in (a,b)$ we have $a\leq \alpha (t)<\beta (t)\leq b$. Now, define $g(t)={\frac {(f\circ \beta )(t)-(f\circ \alpha )(t)}{\beta (t)-\alpha (t)}}$ with $a<t<b$. $\,g$ is continuous in $(a,b)$.
Furthermore, $g(t)\rightarrow {f}'(a)$ when $t\rightarrow a$ and $g(t)\rightarrow {f}'(b)$ when $t\rightarrow b$; therefore, from the Intermediate Value Theorem, if $y\in ({f}'(a),{f}'(b))$ then, there exists $t_{0}\in (a,b)$ such that $g(t_{0})=y$. Let's fix $t_{0}$.
From the Mean Value Theorem, there exists a point $x\in (\alpha (t_{0}),\beta (t_{0}))$ such that ${f}'(x)=g(t_{0})$. Hence, ${f}'(x)=y$.

## Darboux function

A Darboux function is a real-valued function ƒ which has the "intermediate value property": for any two values a and b in the domain of ƒ, and any y between ƒ(a) and ƒ(b), there is some c between a and b with ƒ(c) = y. By the intermediate value theorem, every continuous function on a real interval is a Darboux function. Darboux's contribution was to show that there are discontinuous Darboux functions.
Every discontinuity of a Darboux function is essential, that is, at any point of discontinuity, at least one of the left hand and right hand limits does not exist.
An example of a Darboux function that is discontinuous at one point is the topologist's sine curve function:
    $x\mapsto {\begin{cases}\sin(1/x)&{\text{for }}x\neq 0,\\0&{\text{for }}x=0.\end{cases}}$
By Darboux's theorem, the derivative of any differentiable function is a Darboux function. In particular, the derivative of the function $x\mapsto x^{2}\sin(1/x)$ is a Darboux function even though it is not continuous at one point.
An example of a Darboux function that is nowhere continuous is the Conway base 13 function.
Darboux functions are a quite general class of functions. It turns out that any real-valued function ƒ on the real line can be written as the sum of two Darboux functions. This implies in particular that the class of Darboux functions is not closed under addition.
A strongly Darboux function is one for which the image of every (non-empty) open interval is the whole real line.