I recently saw the following puzzle somewhere:

Find a continuous, surjective function $f:\mathbb R\mapsto\mathbb R$ that takes on each of its values exactly three times.

Or, more technically stated,

Find a continuous, surjective function $f:\mathbb R\mapsto\mathbb R$, such that for all $y\in\mathbb R$, there exist exactly three real solutions $x$ to the equation $f(x)=y$.

My solution to this puzzle was the function $$f(x)=\sin^2 \frac{3\pi(x-\lfloor x\rfloor)}{2}+\lfloor x\rfloor$$ Since then, I've thought of a few variations on this puzzle, none of which I have been able to solve:

  • Can a function $g:\mathbb R\mapsto \mathbb R^2$ satisfy these requirements? What about a function $h:\mathbb R^2\mapsto \mathbb R$?
  • What function $f$ satisfies the original puzzle, and is also $C^\infty$?
  • $\begingroup$ See math.stackexchange.com/questions/1030585/… which is itself a duplicate. $\endgroup$ – Gerry Myerson Dec 28 '17 at 18:28
  • $\begingroup$ @Nilknarf: It would be a good idea to highlight your actual questions. $\endgroup$ – celtschk Dec 28 '17 at 19:01
  • $\begingroup$ There's a smooth example in achille hui's answer to the linked question. $\endgroup$ – Hans Lundmark Dec 29 '17 at 12:26
  • $\begingroup$ I didn't say this question is a duplicate. I said that that question was a duplicate, so people would know to trace back to see whether there's anything at either question of interest here. $\endgroup$ – Gerry Myerson Dec 29 '17 at 14:16
  • $\begingroup$ Regarding your first question, there is no such $h$, because if $h(x)\neq h(y)$ then by the intermediate value theorem every value between $h(x)$ and $h(y)$ is attained along every path from $x$ to $y$. I.e. every intermediate value is attained infinitely many times. $\endgroup$ – Yly Dec 29 '17 at 16:21

Starting from the following idea:

$$g(x)=\sin x + \frac{2}{3\pi}x$$

g(x) plot

we can adjust the constant for x in such way that

$$f(x)=\sin x + Kx$$

fullfills the given condition.

The value of K can be easily found imposing that:

$$\begin{cases}(\sin x)'=\cos x=-K\\ Kx=-\sin x\end{cases}$$

$$\implies tanx=x \implies x\approx4.49340945790906 \quad K=-\cos x \approx 0.21723362821123...$$

f(x) plot

enter image description here

| cite | improve this answer | |
  • $\begingroup$ Doesn't work. This function has 4 zeroes. $\endgroup$ – Franklin Pezzuti Dyer Dec 28 '17 at 18:33
  • 2
    $\begingroup$ @gimusi: the correct constant is not $\frac{2}{3\pi}$ but $0.21723362821122\ldots$. The graphs of $\sin(x)$ and $-\frac{2}{3\pi}x$ are not tangent. $\endgroup$ – Jack D'Aurizio Dec 28 '17 at 18:39
  • 1
    $\begingroup$ If I understand it correctly, it should be the $K$ from the simultaneous solution of $\sin x+Kx=0$ and $\cos x+K=0$ on $x$ and $K$ with the smallest possible positive value for $x$. Alternatively, the largest $K$ so that both equations have a simultaneous solution. $\endgroup$ – celtschk Dec 28 '17 at 19:18
  • 1
    $\begingroup$ Very nice, gimusi. My apologies if you disliked my edits, I was not sure you would come back and finish this your own way, as you now have. In case of interest: I suspect a similar type of thing, just different $K,$ might give each value exactly five times. $\endgroup$ – Will Jagy Dec 28 '17 at 21:34
  • 1
    $\begingroup$ @WillJagy well done! $\endgroup$ – user Dec 28 '17 at 22:52

I like Jack's description, draw a fixed sine curve and find tangent lines through the origin. In this case, I am finding a tangent point with $2 \pi < x < \frac{5 \pi}{2}.$ Under the circumstances, the slope $K$ comes out positive, with $K \approx 0.128374554, $ solution of $$K \left( 2 \pi + \arccos K \right) = \sqrt {1 - K^2}$$ The $x$ value for the tangent is about $7.725251838,$ just below $\frac{5 \pi}{2} \approx 7.853981635$$

enter image description here

This time, we get each value assumed by the function five times, the function being $\sin x - K x.$

enter image description here

Alright, I widened out to include $\pm 14,$ and clicked so it shows the roots and critical points. It says there are critical points at $x \approx \pm 14.008$

enter image description here

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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