Prove that $\cos\sqrt x$ is not a periodic function. Prove that $\cos\sqrt x$ is not a periodic function.
My solution goes like this:

If $\cos\sqrt x$  is a periodic function , then let $T$ be its period . Now, $\cos\sqrt x=\cos\sqrt {x+T}$  . So, we get, $\sqrt {x+T}\pm\sqrt {x}=2k\pi$. Now, for a particular $k\in\mathbb {Z}$ , this identity is impossible because the left member is a variable continous argument in $x$ , while its right member is a constant. Hence, $\cos\sqrt x$ is not a periodic function.

Is the above solution correct? Is it valid? If not, where is it going wrong?...
 A: The statement is equivalent to:

Find the constant $T≠0$, such that $\cos {\sqrt x}=\cos \sqrt{x+T}$ holds, $\forall x≥0$.

This also implies that, $T>0$.
We claim that, such constant $T≠0$ doesn't exist.
Proof: Let $x=0$. Then you have:
$$\begin{align}&\cos \sqrt T=1\\
\implies &\sqrt T=2πn,\; n\in\mathbb Z^{+}\\
\implies &T=4π^2n^2,\;n\in\mathbb Z^{+}.\end{align}$$
Now, let $x=4π^2$. We obtain:
$$
\begin{align}&\cos 2π=\cos \sqrt {4π^2+T}=1\\
\implies &\cos 2π\sqrt {n^2+1}=1\\
\implies &\sqrt {n^2+1}=k,\;k\in\mathbb Z^{+}\\
\implies &n^2+1=k^2\\
\implies &(k-n)(k+n)=1\\
\implies &n=0 \;\text{or}\; T=0\\
&\text {A contradiction .}\end{align}
$$

Explanation:
Just because you missed a small detail, your proof couldn't work.
You derived the following relationship:
$$\sqrt {x+T}\pm\sqrt {x}=2kπ,\,k\in\mathbb Z$$
Then, that's correct and you are right.
But observe that, this doesn't imply us, you can consider $2πk$ as a constant for a particular $k\in\mathbb Z$.
This implies that,

For all $x≥0$, does there always exist $k\in\mathbb Z^{+}$ and an independent non-zero constant $T$, such that:
$$
\begin{align}\sqrt {x+T}\pm\sqrt {x}&=2k\pi,k\in\mathbb Z\end{align}
$$
holds $?$

In other words, you can also understand this statement as follows:
If $\cos \sqrt x=\cos \sqrt{x+T}$, then
$$\sqrt {x+T}\pm\sqrt {x}=2\pi k,\,k\in\mathbb Z$$
holds, for some $k\in\mathbb Z$.
Therefore, we cannot say that the right-hand side should be a constant even for a particular $k\in\mathbb Z$.
For instance, you can take
$$\cos 2π=\cos 4π=1$$
This implies,
$$4π-2π=2π×\color {red}{1}$$
or
$$4π+2π=2π×\color {red}{3}$$
Now take,
$$\cos 2π=\cos 6π=1$$
This yields,
$$6π-2π=2π×\color {red}{2}$$
or
$$6π+2π=2π×\color {red}{4}$$
We see that,  since $k$ is not a constant, we cannot consider the right-hand side as a constant for any particular $k\in\mathbb Z$.
A: The idea is essentially correct but you should make it more precise (also, it is false that $\cos(a)=\cos(b)$ iff the variables differ by a multiple of $2\pi$).
Suppose that $T>0$ is (one of) the periods of $f(x):=\cos(\sqrt{x})$. Then
$$
\forall x \in \mathbf{R}, \quad f(x)=f(x+T). \quad \quad (\star)
$$
Now, $\cos(a)=\cos(b)$ if and only if there exists $k \in \mathbf{Z}$ such that $a+b=2k\pi$ or $a-b=2k\pi$.
Pick $x_0 \in \mathbf{R}$ such that $0<|\sqrt{x+T}-\sqrt{x}|<2\pi$ for all $x\to x_0$, which is possible since $\sqrt{x+T}-\sqrt{x}\to 0$ as $x\to \infty$.
Pick some $x_\star\ge x_0$ such that $\sqrt{x_\star}+\sqrt{x_\star+T}$ is not a multiple of $2\pi$ (which is possible simply because it attains uncountably many values, while the multiple of $2\pi$ are countably many).
For such choice of $x_\star$, we have by construction that $\sqrt{x_\star+T}+\sqrt{x_\star}$ is not a multiple of $2\pi$ and, in addition, $0<\sqrt{x_\star+T}-\sqrt{x_\star}<2\pi$ (hence also $\sqrt{x_\star+T}-\sqrt{x_\star}$ cannot be a multiple of $2\pi$).
It follows that $f(x_\star) \neq f(x_\star+T)$, which contradicts $(\star)$.
