Intermediate value theorem with continuous function Let $f: [0,1] \rightarrow \mathbb{R}$ be continuous with $f(0)=f(1)$. If $h \in (0,\frac{1}{2})$ is not of the form $\frac{1}{n}$, there does not necessarily exist $|x-y|=h$ satisfying $f(x)=f(y)$. Provide an example that illustrates this using $h=\frac{2}{5}$

I'm thinking I need to use some kind of modification to a sin function to get this to work. Not sure how to come up with an explicit formula, though. I could just draw a picture, but I want to find some explicit formula so I can show that it's true.
If you accept a piecewise function as an explicit formula, then the function in the figure below works.
A modified $\sin$ function could work, but I think it would be easier to reason using a piecewise linear function. Try defining a function like the one below. The $x$-intercepts are specifically chosen to be $0, \frac16, \frac13,\frac12,\frac23,\frac56,1$. What has to be true about $|x-y|$ if $f(x)=f(y)$? (If you really want to use $\sin$, then modify your $\sin$ function so that it has $x$-intercepts at the same places as this function. That should also work.)