2
$\begingroup$
  • Give an example of a continuous function $f:R\rightarrow R$ which attains each of its values exactly three times.

Ed.: answered by the duplicate above

  • Does there exist a continuous function $f:R\rightarrow R$ which attains each of its values exactly two times?

Ed.: answered by $f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ twice

$\endgroup$

marked as duplicate by Thomas Andrews, Andrew D. Hwang, Adam Hughes, Gabriel Romon, Martin Sleziak Aug 12 '14 at 18:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ math.stackexchange.com/questions/730692/… $\endgroup$ – Seth Aug 12 '14 at 17:52
  • 2
    $\begingroup$ I think this is a duplicate. $\endgroup$ – Git Gud Aug 12 '14 at 17:52
  • $\begingroup$ math.stackexchange.com/questions/735842/… $\endgroup$ – Seth Aug 12 '14 at 17:53
  • 1
    $\begingroup$ It is not an exact duplicate, because the other question do not ask to exhibit a function with the property that any value in the image is took three times. $\endgroup$ – Jack D'Aurizio Aug 12 '14 at 18:21
  • 1
    $\begingroup$ Neither it is a duplicate of the other question, it is just both of them. It would have some sense to merge the three questions into this topic. $\endgroup$ – Jack D'Aurizio Aug 12 '14 at 22:41
4
$\begingroup$

$$f(x)=2\left\lfloor\frac{x}{3\pi}\right\rfloor-\cos\left(3\pi\left\{\frac{x}{3\pi}\right\}\right)\tag{1}$$ is a differentiable function that attains any real value in exaclty three points, whose graphics is the following one:

$\hskip2in$enter image description here

If in $(1)$ you replace "$3$" with the positive odd integer $2m+1$, you get a $C^1$-function that attains any real value in exactly $2m+1$ points. You can also take:

$$f(x) = T_{2m+1}\left(x-2\left\lceil\frac{x-1}{2}\right\rceil\right)+2\left\lceil\frac{x-1}{2}\right\rceil,$$

where $T_{2m+1}$ is the $(2m+1)$-th Chebyshev polynomial of the first kind. This is a $C^1(\mathbb{R})$ function, too.


You cannot have a continuous function $g$ that takes any value in $g(\mathbb{R})$ exactly twice. Such function cannot be monotonic, hence must have a point $x_0$ of local maximum/minimum and another point $x_1\neq x_0$ for which $g(x_1)=g(x_0)$. Then, by continuity, there exists a constant $G$ sufficiently close to $g(x_0)$ but different from $g(x_0)$ such that there are two points $y_1,y_2$ in a neighbourhood of $x_0$ (because $x_0$ is a maximum/minimum), and at least one point $y_3$ in a neighbourhood of $x_1$ such that $$ g(y_1)=g(y_2)=g(y_3)=G,$$ contradiction.

$\endgroup$
  • 1
    $\begingroup$ Very nice example :-) $\endgroup$ – idm Aug 12 '14 at 18:23
  • $\begingroup$ Are you sure you want those curly brackets in the argument of the cosine? $\endgroup$ – Miguel Angel Alarcon Bustos Oct 22 '17 at 16:51
  • $\begingroup$ @MiguelAngelAlarconBustos: I am pretty sure. Why do they bother you? $\endgroup$ – Jack D'Aurizio Oct 22 '17 at 17:17
  • $\begingroup$ Well, because it would be just $\cos(x)$ so they don't play a very important role there (unless they mean something different from what I am thinking). And I was trying to plot it on matplotlib and it wasn't continuous $\endgroup$ – Miguel Angel Alarcon Bustos Oct 22 '17 at 17:29

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