1

Can any real function of irrational numbers be rational ? If possible, please give examples. Special case $ e^ {\pi i } = -1 $ seems to restrict solutions entirely to complex numbers. The question is right now vague as I do not know how to exclude "obviously derived " examples.

Narasimham
  • 40,495
  • Maybe more interesting to try to find a surjection $\mathbb{R}\setminus\mathbb{Q}\rightarrow\mathbb{Q}$. – catfish Nov 26 '15 at 20:22
  • On the opposite, can you find a continuous function that never maps an irrational to a rational, other than a rational fraction ? –  Nov 26 '15 at 21:27
  • 1
    @YvesDaoust $f(x)=|x|$? – Wojowu Nov 26 '15 at 21:45
  • @Wojowu: all piecewise functional inverses of rational fractions with rational coefficients never map an irrational to a rational. $|x|$ is such a function. –  Nov 26 '15 at 22:51

8 Answers8

10

Sure. Choose any constant function $f : \mathbb R \setminus \mathbb Q \to \mathbb Q$, for example

$$f(x) = 1 \quad\text{ for all } x \in \mathbb R \setminus \mathbb Q$$

If this answer seems flippant, you may want to sharpen the question.

Simon S
  • 26,524
5

The cosine of $\pi$ is -1, a rational number.

Justpassingby
  • 10,029
5

You can construct required function from any real function, rounding the result to finite number of decimals.

z100
  • 530
4

What about $f(x)=x^2$? One has $f(\sqrt2)=2$.

Intelligenti pauca
  • 50,470
  • 4
  • 42
  • 77
2

A well-known example.

Is $m:=\sqrt{2}^{\sqrt{2}}$ rational? If yes, that is your answer.

If no, then $m^\sqrt{2}$ is your answer: $m$ and $\sqrt{2}$ are irrational, but $$ m^\sqrt{2} = \left(\sqrt{2}^\sqrt{2}\right)^\sqrt{2} =\sqrt{2}^{(\sqrt{2}\cdot\sqrt{2})} = \sqrt{2}^2 = 2 $$ is rational.

GEdgar
  • 111,679
1

I don’t understand your question, since it seems to be insufficiently quantified. Do you mean, “Is there a function that takes every irrational number to a rational?”? Or do you mean, “Given an irrational number, is there a function that takes it to a rational image?”? Your example seems to support the second interpretation, in which case I’d suggest the function $f(x)=x/a$, if your given irrational number is $a$.

And you didn’t say what kind of function you were allowing. Any continuous function? Analytic? I can suggest all manner of discontinuous functions that take irrationals to rationals, beyond of course the ultimate in continuity, the constant functions.

Lubin
  • 62,818
0

According to a famous theorem about trascendental numbers for all $\alpha$ real algebraic with $1\ne\alpha\ne0$ the number $\ln \alpha$ is trascendental. Consider the function $f(x)=e^x$ which is a bijection of $\mathbb R$ onto $]0,\infty[$; take now un $r\in$ $\mathbb Q^+ $, for instance $r=7$; there exists x such that $f(x)=7$ but $f(x)=e^x=7\iff x=\ln 7$ hence $x$ is a trascendental number whose image by $f$ is rational.

You have this way infinitely many rational $r$ such that if $x=\ln r$ then $f(x)=r$ where x is irrational (it is trascendental indeed).

Piquito
  • 29,594
0

Several.

f(x) = x - x = 0

f(x) = x / x = 1, for x in R - {0}

f(x) = round(x, 5), where round() rounds a number to the specified quantity of decimal places.

The Dirac delta.

f(x) = 
    1 if x in Q,
    0 if x not in Q

f(x) =The average of the first 10^6 digits of x (in base 10).

And so on...