Prove or disprove the existence of a continuous differentiable function f:R->R that is nowhere linear such that if x is rational, f(x) is also, and if x is irrational, f(x) is also.

Originally posted by royalchicken Prove or disprove the existence of a continuous differentiable function f:R->R that is nowhere linear such that if x is rational, f(x) is also, and if x is irrational, f(x) is also.

Originally posted by TheMaster37 Suspicions to be proven:

-IF such a function exists it has to be a polynomial to get rational output with rational input.

Well, any ratio of two polynomials gives rational output with rational inpur (eg (x^3-9)/(x^2+3)). This doesn't necessarily give irrational output with irrationals, and the denominator may not have real roots.

-Polynomials aren't irrational with every irrational input (eg there is always an irrational input wich given rational output)

This is true. Note that irrational numbers can be associated with the degree of the lowest-degree polynomial of which they are a root. Are all irrationals roots of some polynomial?

To the last question i know the answer immedeately. Some irrationals are no root of any FINITE polynomial, actually there are more numbers wich aren't ðŸ™‚

-IF such a function exists it has to be a polynomial to get rational output with rational input.

I change this to something that excludes nasty functions like exponentials and logarithms and such ðŸ˜€ "Expressable by a polynomial or a quotient of two polinomials, and the quotient/sum of things made in that fashion, as long as it's finite" lol

Originally posted by TheMaster37 To the last question i know the answer immedeately. Some irrationals are no root of any FINITE polynomial, actually there are more numbers wich aren't ðŸ™‚

Correct. These are the transcendentals. What does this imply about our question?

Originally posted by royalchicken Prove or disprove the existence of a continuous differentiable function f:R->R that is nowhere linear such that if x is rational, f(x) is also, and if x is irrational, f(x) is also.