1
$\begingroup$

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.

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

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.

$\endgroup$
1
  • $\begingroup$ For kicks, define it as conways base 13 function everywhere else. $\endgroup$
    – PyRulez
    Nov 26 '15 at 22:50
5
$\begingroup$

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

$\endgroup$
5
$\begingroup$

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

$\endgroup$
4
$\begingroup$

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

$\endgroup$
5
  • $\begingroup$ should work for any, not only for square roots ... $\endgroup$
    – z100
    Nov 26 '15 at 19:51
  • $\begingroup$ @oops, algebraic of course. $\endgroup$
    – user65203
    Nov 26 '15 at 21:06
  • $\begingroup$ More generally, all algebraic numbers evaluate to $0$ for some polynomial function. $\endgroup$
    – user65203
    Nov 26 '15 at 21:06
  • $\begingroup$ @YvesDaoust, what you say is ambiguous (in English!). Better to say, “Every algebraic number evaluates to $0$ for some polynomial function”. $\endgroup$
    – Lubin
    Nov 26 '15 at 22:04
  • $\begingroup$ @Lubin: I agree. $\endgroup$
    – user65203
    Nov 27 '15 at 10:21
2
$\begingroup$

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.

$\endgroup$
1
1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ I meant a situation about any function of rationals mapped from independent irrational variable numbers, $\endgroup$
    – Narasimham
    Nov 27 '15 at 9:12
0
$\begingroup$

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).

$\endgroup$
1
0
$\begingroup$

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...

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.