Prove $\sin(\sqrt x)$ is not periodic.

My wrong assumption was non-periodicity is due to the injectivity of the square root, but, then this would work for any positive real number, but it doesn't, and $\sin(x^2)$ isn't periodic either, so injectivity fails.

I find this example more interesting because it is defined on the interval $[0,+\infty)$ so it can't be periodic on the interval $(-\infty,0).$

On the other hand, $\;\sin\left(\sqrt{x}\right)\;=\sin\left(\sqrt{x+\tau}\right)$ seems hopeless.

How does composition behave in general when talking about periodicity?

Our assistant said the answer lays in irrationality in examples of this kind:
$\sin\left(\sqrt{2}x\right),$

but it seems clumsy, incomplete and too intuitive to claim there is no common multiple halfway the solution...

At some point I get some expression I don't know what to do with.

Also, what does almost periodic in English mean?

Are constants, signum, Dirichlet's and Moebius function almost periodic? as far as I'm concerned, they don't have the least period? Or does it refer to floor and ceiling?
['https://math.stackexchange.com/questions/3428999', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/721644/']
Hint: Consider at what points $\sin(\sqrt x)$ is equal to $0$. If the function were periodic, could those points get further and further apart?
Let $f$ be periodic with period $T$. Then for $f(g(u))$ to be periodic with period $U$, we need

$$g(u+U)=g(u)+kT$$ for some integer constant $k$.

Now if

$$h(u):=g(u)-kT\frac uU,$$

$$h(u+U)=g(u+U)-kT\frac{u+U}U=g(u)+kT-kT\frac{u+U}U=h(u)$$ and $h$ is periodic.

Finally, $g$ must be of the form

$$g(u)=kT\frac uU+h(u)$$ where $h$ is periodic of period $U$.

---

E.g. let $f(x)=\{x\}$, which is periodic with period $1$ and let us choose $h(x)=\sin(x)$ (period $2\pi$). We also choose $k=2$ and get

$$g(x)=\frac x\pi+\sin(x).$$

This gives us a nice psychedelic function.

[![enter image description here](https://i.stack.imgur.com/YLZZs.png)](https://i.stack.imgur.com/YLZZs.png)