
Is this right?
I saw a question which puzzled me earlier on this forum (I apologize, but I can't find the original discussion, it's buried a month or so back).
Find a Real > Real function f which has the following properties:
f(0) = 0 ; f is differentiable at x = 0, and has f '(0) = 1.
and:
For any positive number a, f is NOT monotonically increasing over the interval (0,a).
Well, I just had an inspiration:
I think it's fairly easy to show that this function is NOT monotonically increasing over any interval (0,a). Just tell me, please: is this right? Am I right to assert that the derivative at 0 is 1?

I don't know whether your function is right or not, but the way I see it, you're overcomplicating things. Wouldn't the function f(x) = x for x irrational and 0 for x rational
work just as well? Near 0, it will behave almost exactly the same, and that's all you're looking for.
Actually, on second thought neither function works for this problem. Let's take your function. By the traditional epsilondelta definition of the derivative, you would need that given any epsilon=e>0, find d>0 s.t. if x<d, then (f(x)x)/x<e. But within the set {x 0<x<d}, there is a rational x=1/b in lowest terms (let's say it's positive  negative case is similar), for which f(x)x)/x=(1/b)/(1/b)=1 which is by no means less than epsilon. The function I suggested fails for a similar reason.
Now  if there was a way to constrain a sin curve so that it would bouce between x(x+1) and x(x1) (both of which have a derivative of 1 at 0), and give this sin curve the property of sin(1/x) s.t. it will oscillate more and more rapidly as it approaches 0 (thus making monotonicity impossible), it might be possible to tame the oscillation enough in order to make the derivative exist. Of course, I'm not sure, and i'll let you do the legwork to figure it out. Who would've guessed  ender wiggin telling mazer what to do . . . :D

HAHAHAHA, great job on the reference. And wonderful theatrics there. (Rock)
You got me. It doesn't work, damn.
But, on the last thread, I remember everyone talking about that oscillating thing, but no one put up a solution. I thought about it and just couldn't make the function, but I'll sleep on it tonight.

solution
OK I've got it figured out.
We want our modified sin function to oscillate between and . So, it should center around the average of these two, aka, . So it'll be of the form . Now, our amplitude needs to keep us always in sync with the upper and lower bounds, so it needs to be half of the difference between them, aka . So our function is .
I'm certain that this works.
If you want to challenge yourself, try to find a function which is Cinfinity at 0, and has all derivatives equal to 1 there. It's slightly more challenging, but very feasible.