Latest EDIT : This question in its latest form has been solved here
I want to know the existence of a class of functions with the following properties. If they exist, how to construct them ? In case they do not exist, please suggest a proof.
Let $ f : \mathbb{R} \to \mathbb{R} $ be a differentiable function with compact support in [0,1]. Let the notation $ Cf(x) = k$ represent that $ f $ is exactly $ k $ times differentiable at the point $ x \in \mathbb{R} $ where $ k \in \mathbb{N} $. $ f $ should satisfy the following properties.
$ Cf(x) >= q $ $\forall x \in \mathbb{Q}\cap (0,1] $ where $ q \in \mathbb{N} $ is denominator of $ x $ when written in simplest form. $ Cf(0) >= 1 $. $ Cf(x) = \infty \forall x \in (\mathbb{R}\setminus\mathbb{Q})\cap[0,1] $. The last statement means that $ f(x) $ is smooth at every $ x\in (\mathbb{R}\setminus\mathbb{Q})\cap[0,1] $.
I want to study such functions (in case they exist) as they seem to have some very nice properties.Also they might be the most well behaved after smooth functions.
EDIT :
Clarification : $f(x)$ is exactly $k$ times differentiable at $x$ means it is not differentiable more than $k$ times at $x$ .
EDIT 2 :
Clarification : $Cf(x)$ is always finite for $\forall x \in Q\cap (0,1] $
EDIT 3 :
One approach i tried is as given in answer/coments to this question question.
I added such functions starting at every rational point to make up the function and varying the scale of the bump functions $\epsilon$. Making $\epsilon \to 0$ would give a limit function (by making some restrictions) which does not have the desired properties.
EDIT 4 : I would like to know whether you find it interesting due to any reasons or not much due to some obvious reasons. Please comment.
To me it appears very beautiful and interesting concept..if i am allowed to make such statements.
EDIT 5 edited on Feb 12 2011.
I have constructed such a class of functions which happen to be nonempty.More over it has many interesting and important properties.Please contact me if you are interested in knowing more details and the proof.
EDIT : 6
@chandok : thank you for the clarification. I think i should mention something after having a re look at your answer. When i was asking the question, I wanted to rule out a particular condition which seemed not of interest, but later due to my misinterpretation/mistaken view of Darboux Theorem, I thought such a condition would not arise, but strikingly your answer is exactly utilizing such a condition and only after looking at your answer i came to know that such a condition is indeed possible and hence I realize that i made a mistake by not ruling out such a condition in the question itself. Now i would like to mention that condition in the question, but i want you to note that i give full credit to your answer as it brought to notice that such a condition is indeed possible, even though it is not very interesting.
New Condition
when ever $f(x)$ is not differentiable more than $n$ times at a point is is because for the $(n+1)^{th}$ derivative, the left and right limits exist and are not equal. The left and right limits do not diverge.
Keeping the above condition in mind i have constructed such a class of functions and it indeed is not empty and i think it has very important and interesting properties.If interested please contact me for details and the proof. You are also welcome to make any comments.
I once again thank Chandok for taking patience in providing an answer.