# Is the sum of a Darboux function and a polynomial necessarily a Darboux function?

A function $f: \mathbb{R} \to \mathbb{R}$ is called a Darboux function if and only if it maps every connected subset of $\mathbb{R}$ to a connected set.

As an example : We know that (a.k.a., the Intermediate Value Property of continuous functions) all continuous functions are Darboux functions, further all the functions that are derivatives of some other function are also Darboux functions.

Question :

Given any Darboux function $f: \mathbb{R} \to \mathbb{R}$ and a polynomial $p(x) \in \mathbb{R} [ x ]$ then is the function $f+p$ always a Darboux function ?

Note that : (from the work of other mathematicians we know that : )

Sum of two Darboux functions need not be a Darboux function. In fact, a theorem of Sierpinski says that every function $f: \mathbb{R} \to \mathbb{R}$ can be written as a sum of two Darboux functions.

Further,

Here ( http://matwbn.icm.edu.pl/ksiazki/fm/fm146/fm14622.pdf ) in a mathematics paper by Juris Steprans it says that the sum of Darboux functions and continuous (actually differentiable functions are considered here) need not be Darboux functions.

The source of thought for the original problem is the two methods to solve the following problem (it appeared as a problem in the Freshman exam in mathematics at Cornell university in some past year).

Prove that there is no continuous function $f: \mathbb{R} \to \mathbb{R}$ such that for all rational numbers $x$ we have $f(x)$ is irrational and for all irrational numbers $x$ we have $f(x)$ is rational.

First way : Assume the contrary, (that is assume there exists such a continuous function $f: \mathbb{R} \to \mathbb{R}$ that takes every rational number to irrationals and every irrational number to rationals)

Consider the functions, $h_1 : \mathbb{R} \to \mathbb{R}$ and $h_2 : \mathbb{R} \to \mathbb{R}$ defined by $h_1(x)= f(x) - x$ and $h_2(x) = f(x) + x$ for all real numbers $x$. Then by assumption $h_1,h_2$ are continuous and have only irrational numbers in their range. Thus by Intermediate Value Property (a.k.a., Darboux property of continuous functions) they must be constant and thus their sum is a constant function. But observe $h_1+h_2 = 2f$ , thus forcing $f$ to be constant and hence a contradiction (since, $f$ has both rationals and irrationals in its range).

This solves the problem.

Another solution : Assume the contrary, Observe that their must exist irrationals $a,b$ with $a<b$ such that $f(a) \ne f(b)$. Thus by the Darboux property of $f$, every point between $f(a)$ and $f(b)$ must belong to the range of $f$ restricted on $(a,b)$. So, every irrational number between $f(a),f(b)$ must be attained by $x$ varies over $(a,b)$. But since $f(x)$ takes irrational values only at rational $x$, so all the irrationals between $f(a),f(b)$ must be attained at rationals in $(a,b)$. But the set of all irrationals between $f(a)$ and $f(b)$ is uncountable but the set of rationals is countable.

Observe that : We used no more than the Darboux property of $f(x) \pm x$ in the first proof, and we never used anything more than the Darboux property of $f$ in the second proof.
No, the fact that $f$ is Darboux does not even imply that $x\mapsto f(x)+x$ is Darboux.
Here is one way to construct a counterexample. Fix a bijection $\psi\colon\mathbb{R}/\mathbb{Q}\to\mathbb{R}$ (which exists because both have the same cardinality). Let $g\colon\mathbb{R}\to\mathbb{R}$ be the composition of $\psi$ with the canonical surjection $\mathbb{R}\to\mathbb{R}/\mathbb{Q}$. Then $g$ takes every real value $y$ on every nontrivial real interval $I$ (because $\psi^{-1}(y)$, seen as a translation coset of $\mathbb{Q}$, intersects $I$). Now let $f\colon\mathbb{R}\to\mathbb{R}$ be defined by $f(x)=g(x)$ except in case $g(x)=-x$ in which case $f(x)=g(x)+1=-x+1$ (for example). Clearly, $f$ still has the property of taking every real value $y$ on every nontrivial interval $I$ (because $\psi^{-1}(y)$ intersects $I\setminus\{-y\}$). In particular, $f$ has the Darboux property (it has a much stronger property). But by construction, $x\mapsto f(x)+x$ does not take the value $0$, so it is not Darboux.