TITLE: A curious identity on $\sum _{n=0}^{\infty } \frac{(-1)^n \cos \left(2 \pi \sqrt{2 n+1}\right)}{\sqrt{2 n+1}}$
QUESTION [6 upvotes]: How to prove
$$\sum _{n=0}^{\infty } \frac{(-1)^n \cos \left(2 \pi  \sqrt{2 n+1}\right)}{\sqrt{2 n+1}}=\sqrt{2} \sum _{n=0}^{\infty } \frac{(-1)^n \cos \left(\frac{2 \pi }{{2 n+1}}+\frac{\pi }{4}\right)}{\sqrt{2 n+1}}$$
I collected it from a blog which offers no proof. Also I've never met series of this type before (so I don't know where to start). Any help will be appreciated.

REPLY [2 votes]: For information about such sums
Let $r_2(n)$ be the number of representations of $n=0,1,2,\ldots$ in the form 
$$
A^2+B^2=n,
$$ 
where $A,B$ integers. Then
$$
r_2(0)=1\textrm{, }r_2(n)=4\sum_{d|n,d-odd}(-1)^{(d-1)/2}.
$$
The Gauss circle problem (conjecture) states that if 
$$
R(x)=\frac{1}{x^{1/4}}\left(\sum_{n\leq x}r_{2}(n)-\pi x\right),
$$
then $\forall \epsilon>0$
$$
R(x)=O(x^{\epsilon})\textrm{, }x\rightarrow+\infty.
$$
This is equivalent to show: If
$$
S_{N_1}(x)=\sum_{n(2l-1)\leq N_1}\frac{(-1)^{l-1}\cos \left(2\pi\sqrt{n(2l-1)x}+\frac{\pi}{4}\right)}{(n(2l-1))^{3/4}}=
$$
\begin{equation}
=\sum^{N_1}_{n=1}\frac{r_2(n)\cos\left(2\pi\sqrt{nx}+\frac{\pi}{4}\right)}{n^{3/4}},
\end{equation}
then
$$
\lim_{N_1\rightarrow\infty}S_{N_1}(x)=O\left(x^{\epsilon}\right)\textrm{, }\forall\epsilon>0\textrm{, }x\rightarrow+\infty
$$
see here
However the problem needs more research.