Divergent series $\sum _{n=1}^{\infty } \frac{1}{\sqrt{k}} \cos (kx)$ Working in the series above and using maclaurin euler formula i get
$$\sum _{n=1}^{\infty } \frac{\sqrt{2 \pi } \sqrt{\frac{2 \pi  n}{x \sqrt{\frac{4 \pi ^2 n^2}{x^2}-1}}+1}}{\sqrt[4]{x^2-4 \pi ^2 n^2}}+\frac{\sqrt{\frac{\pi }{2}}}{\sqrt{x}}=\sum _{n=1}^{\infty } \frac{1}{\sqrt{k}} \cos (k x)$$
but series diverge , it maybe something wrong?

I am not sure that your approach will get you the result.
This is my hint. The given series does not converge if $x$ is a integer multiple of $2\pi$, i.e $x=2\pi m$ with $m\in\mathbb{Z}$ because 
$$\sum _{k=1}^{\infty } \frac{\cos (k 2\pi m)}{\sqrt{k}} =\sum _{k=1}^{\infty } \frac{1}{\sqrt{k}}=+\infty$$
Otherwise, note that (see Prove $\frac{1}{2} + \cos(x) + \cos(2x) + \dots+ \cos(nx) = \frac{\sin(n+\frac{1}{2})x}{2\sin(\frac{1}{2}x)}$ for $x \neq 0, \pm 2\pi, \pm 4\pi,\dots$)
$$\sum_{k=1}^n\cos(kx)= \frac{\sin((2n+1)x/2)}{2\sin(x/2)}-\frac{1}{2}$$
and use Dirichlet's Test.
