Does Fourier cosine series converge in $L^2$ sense? Let $\phi(x)=\begin{cases}0, 0<x<1\\ 1, 1<x<3 \end{cases}$
We have that its Fourier cosine series is given by 
$\phi(x)=\begin{cases}0, 0<x<1\\ \frac{2}{3}+\sum_{m=1}^{\infty}\frac{-2\sin(m\pi/3)}{m\pi}\cos(\frac{m\pi x}{3}), 1<x<3 \end{cases}$.
Does it converge to $\phi$ in the $L^2$ sense? Why?
We have that if  $0<x<1$, then $\phi(x)$ converges to zero in $L^2$
sense.
If $1<x<3,$ then we should verify that $$\displaystyle\int_1^3\left\vert 1-\frac{2}{3}-\frac{2}{\pi}\sum_{m=1}^\infty\frac{\sin(m\pi/3)}{m}\cos(\frac{m\pi x}{3}) \right\vert^2dx\to 0 \text{ when } m\to\infty\\ \iff\displaystyle\int_1^3\left\vert \frac{1}{3}-\frac{2}{\pi}\sum_{m=1}^\infty\frac{\sin(m\pi/3)}{m}\cos(\frac{m\pi x}{3}) \right\vert^2dx\to 0 \text{ when } m\to\infty$$
Am I correct so far ?
Any hint please on how should I continue from here?

edit: I had a typo in the definition of Fourier series, it's 2/3 instead of 4/3. Sorry.
edit 2: I found the following result which is equivalent to prove $L^2$ convergence. If $\{x_n\}$ are the eigenfunctions of symmetric boundary conditions of the problem and $\vert f\vert$ is finite, then $\Vert f-\sum{A_nx_n}\Vert\to0$ when  $N\to\infty$
The problem is I just have the series and not a problem with boundary conditions,etc. 
What  do I do then ?? :(
 A: The statement of this question is strange. You wrote "We have that its Fourier cosine series is given by
$$\phi(x)=\begin{cases}0, 0<x<1\\ \frac{2}{3}+\sum_{m=1}^{\infty}\frac{-2\sin(m\pi/3)}{m\pi}\cos(\frac{m\pi x}{3}), 1<x<3"\end{cases}$$
Why do you set $\phi$ equal to this, and why do you have cases? Why not just write that the Fourier cosine series of $\phi$ on $[0,3]$ is
$$\tag 1 \frac{2}{3}+\sum_{m=1}^{\infty}\frac{-2\sin(m\pi/3)}{m\pi}\cos(\frac{m\pi x}{3})?$$
The basic question appears to be: Does $(1)$ converge to $\phi$ in $L^2[0,3]?$ The answer is yes. Now you wrote that this series, restricted to $[0,1],$ converges to $0$ in $L^2[0,1],$ but I'm not sure where you're getting that from.
The very well known general result here is this: Suppose $f\in L^2[0,T].$ Define the Fourier cosine coefficients $c_n$ of $f$ as follows:
$$c_0 = \frac{1}{T}\int_0^T f(x),\,\,c_n=\frac{2}{T}\int_0^T f(x)\cos(n\pi x/T)\, dx,\,\, n=1,2,\dots $$
Then the series $\sum_{n=0}^{\infty}c_n\cos(n\pi x/T)$ converges to $f$ in the $L^2[0,T]$ norm. I.e.,
$$\lim_{N\to \infty}\,\int_0^T |f(x)-\sum_{n=0}^{N}c_n\cos(n\pi x/T)|^2\, dx =0.$$
That proves the answer to your question is yes. Are you familiar with the general result?
