The above is an exercise in Beginning Functional Analysis by Saxe. I approach the problem by extending an arbitrary function symmetrically to $-\pi$ and arguing via the convergence of the classical Fourier Series. However, I can’t avoid the need for an initial term $\frac{1}{\sqrt{\pi}}$. I have found this initial term included in one or two places online, but this evidence is tentative.
I am aware of an answered question with regard to the analogous sine series, but to infer that it directly applies is to assume the answer is likewise analogous.
The following is a self-adjoint eigenfunction problem: $$ -y''=\lambda y,\;\;\; y'(0)=y'(\pi)=0. $$ The eigenfunctions of this problem form an orthogonal basis of $L^2[0,\pi]$. The un-normalized eigenfunctions are $$ 1,\cos(x),\cos(2x),\cos(3x),\cdots. $$ So the normalized eigenfunctions form a complete orthonormal basis of $L^2[0,\pi]$: $$ \frac{1}{\sqrt{\pi}},\sqrt{\frac{2}{\pi}}\cos(nx),\;\;\; n=1,2,3,\cdot. $$ The problem $-y''=\lambda y$ with $y(0)=y(\pi)=0$ gives the usual $\sin$ basis $$ \sqrt{\frac{2}{\pi}}\sin(nx),\;\;\; n=1,2,3,4,\cdots. $$