Showing the Fourier sine series converges 
The Fourier sine series for $f(x) = x$, $-2 < x < 2$ is 
  $$f(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin \frac{n\pi x}{2}$$
  For each $x$ in the interval to what does the Fourier since series for $f(x)$ converge, can we prove pointwise convergence, convergence in $L^2$, and/or uniform convergence?

Attempted solution - We have 
$$\int_{-2}^{2}x^2 dx = \frac{16}{3} < \infty$$ so the function $f(x) = x$ is in $L^2$ and the Fourier series converges in $L^2$. Now, 
$$\Bigg|\frac{(-1)^{n+1}}{n}\sin \frac{n\pi x}{2}\Bigg| \leq \frac{(-1)^{n+1}}{n}$$ 
Take $M_n = \frac{(-1)^{n+1}}{n}$. Since $\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}$ is convergent then by the Weirstrass M-test the original series is uniformly convergent and thus pointwise convergent. 
Assuming the latter above is correct, can I state that $S_n(f)\to f(x) = x$?
 A: *

*Your proof of convergence in $L^2$ is correct. 

*Let us prove  the pointwise convergenge in the open interval $(-2,2)$.
Consider, for $-2 < x < 2$, 
$$ F(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}e^{ \frac{n\pi x}{2}i}$$ 
If $x\in (-2,2)$, then we have that $\sum_{n=1}^{\infty}(-1)^{n+1}e^{ \frac{n\pi x}{2}i}$ converges. In fact,
$$\sum_{n=1}^{\infty}(-1)^{n+1}e^{ \frac{n\pi x}{2}i}=   
 \left (\frac{e^{ \frac{\pi x}{2}i}}{1+e^{ \frac{\pi x}{2}i}} \right )$$
So, there is $M>0$ such that, for all $N\geqslant 1$,
$$\left | \sum_{n=1}^{N}(-1)^{n+1}e^{ \frac{n\pi x}{2}i}\right| \leqslant M $$
And since, $\{\frac{1}{n}\}_{n\geqslant 1}$ is a non-increasing sequence of real number such that, as $n \to \infty$, $ \frac{1}{n} \to 0$, we can apply Dirichlet's test to conclude that, if $x\in (-2,2)$, then $F(x)$ converges. 
So we have prove that, for all $x\in (-2,2)$, 
$$ F(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}e^{ \frac{n\pi x}{2}i}$$ 
converges pointwisely. 
Now, note that 
$$f(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin \frac{n\pi x}{2}$$
is the imaginary part of $F(x)$. So we have that, for all $x\in (-2,2)$, 
$$f(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin \frac{n\pi x}{2}$$
converges pointwisely. 


*Uniform convergence. Note that 


$$f(x) = \frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin
    \frac{n\pi x}{2}$$ 
does NOT converge uniformly on $(-2,2)$. 
To see it, consider 
$$f_N(x) = \frac{4}{\pi}\sum_{n=1}^{N}\frac{(-1)^{n+1}}{n}\sin
    \frac{n\pi x}{2}$$ 
Note that for all $N \geqslant 1$, $f_N$ is continuous on $[-2,2]$. Note also that $f$ (defined by $f(x)=x$ is also continuous on $[-2,2]$.
From item 2, we know that, for all $x\in (-2,2)$, $f_N(x)$ converges to $f(x)$. However, for $x=-2$, for all $N\geqslant 1$, $f_N(-2)=0$ and $f(-2)=-2$. In a similar way, for $x=2$, for all $N\geqslant 1$, $f_N(2)=0$ and $f(2)=2$.
So $f_N$ does not converge uniformly to $f$ on $(-2,2)$. 
In fact, suppose $f_N$  converges uniformly to $f$ on $(-2,2)$. Then there is $N_0 \in \mathbb{N}$ such that for any $N>N_0$, and any $x \in (-2,2)$,
$$|f_N(x)-f(x)| <1/2$$
In particular, for any $x \in (-2,2)$,
$$|f_{N_0+1}(x)-f(x)| <1/2  \tag{1}$$
But, since $f_{N_0+1}$ is continuous on $[-2,2]$, there is $\delta_1>0$ such that, for all  $x \in (-2,-2+\delta_1)$
$$|f_{N_0+1}(-2)-f_{N_0+1}(x)| <1/2 \tag{2} $$
Since $f$ is continuous on $[-2,2]$, there is $\delta_2>0$ such that, for all  $x \in (-2,-2+\delta_2)$
$$|f(x)-f(-2)| <1/2 \tag {3}$$
Take $\delta = \min\{\delta_1, \delta_2\}$. Combining $(1)$, $(2)$, $(3)$, we have, for all  $x \in (-2,-2+\delta)$
\begin{align*} 2 = &|f_{N_0+1}(-2) - f(-2)| \leqslant \\ & \leqslant  |f_{N_0+1}(-2)- f_{N_0+1}(x)|+ |f_{N_0+1}(x)-f(x)| + |f(x)-f(-2)|< \\ &< (1/2)+ (1/2)+(1/2) =3/2
\end{align*}
Contradiction. So we have proved that $f_N$ does not converge uniformly to $f$ on $(-2,2)$. 
It means the series $$\frac{4}{\pi}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin \frac{n\pi x}{2}$$ does not converge uniformly to $f$ on $(-2,2)$. 
A: Dirichlet's Test proves the series converges. Take $a_n=1/n$ and $b_n=\sin(n\pi x/2)$. Notice that $\sum_{n=1}^N\sin(n\pi x/2)=\csc(\pi x/4)\sin(N\pi x/4)\sin((N+1)\pi x/4)$ (you can prove this by taking the imaginary part of the equivalent sum of $e^{in\pi x/2}$). Now show that this is bounded on $[-2,2]$.
