How to prove the $\sum \sin(2n\pi t)/n$ is equal to $\sum (-1)^{(n-1)/2} \cos(n\pi t)/n$? In 3Blue1Brown's video about Fourier Series, this is left to be proved:
$$
\sum_{n=1,3,5,7,...}^{\infty}\frac{1}{n}\sin(2n\pi t)=\sum_{n=1,3,5,7,...}^{\infty}\frac{(-1)^{(n-1)/2}}{n}\cos(n\pi t)
$$
I understand that left thing came from $\sum c_ne^{in\pi t}$ and the right thing came from $a+\sum b_n \sin(nt)+\sum c_n \cos(nt)$. I tried a lot but still can't prove they are equal.
video:
But what is a Fourier series? From heat flow to circle drawings | DE4
This shows at 23:23, as Challenge 3, with hint: draw the sine waves over [0.25,0.75] which I can't really understand.
 A: Let $f(t)$ be given by 
$$f(t)=\begin{cases}1&,0<t<1/2\\\\-1&,1/2<t<1\end{cases}$$ 
and let $g(t)$ be the even extension of $f(t)$ on $(-1,1)$ so that 
$$g(t)=\begin{cases}1&,-1/2<t<1/2\\\\-1&,1/2<t<1,-1<t<-1/2\end{cases}$$ 
Then, the Fourier coefficients of $g(t)$ are
$$\begin{align}
c_n&=\frac12\left(-\int_{-1}^{-1/2} e^{-in\pi t}\,dt+\int_{-1/2}^{1/2}e^{-in\pi t}\,dt-\int_{1/2}^1e^{-in\pi t}\,dt\right)\\\\
&=\frac{e^{i\pi n/2}}{i\pi n}\left(1-(-1)^n\right)
\end{align}$$
Hence $g(t)$ can be represented on $(-1,1)$ by the Fourier series
$$\begin{align}
g(t)&=\sum_{n=-\infty}^\infty \frac{1-(-1)^n}{i\pi n}e^{i\pi n (t+1/2)}\\\\
&=2\frac\pi\sum_{n=\text{odd}}\frac{e^{i\pi n(t+1/2)}}{i n}\\\\
&=4\frac\pi\sum_{n=1,3,5,\dots}\frac{\sin(n\pi (t+1/2))}{ n}\\\\
&=4\frac\pi\sum_{n=1,3,5,\dots}\frac{\sin(n\pi /2)\cos(n\pi t)}{n}\\\\
&=\frac4\pi\sum_{n=1,3,5,\dots}\frac{(-1)^{(n-1)/2}\cos(n\pi t)}{n}
\end{align}$$
So, on the open interval $(0,1)$ we find that $f(t)$ can be represented by the cosine series 
$$f(t)=\frac4\pi\sum_{n=1,3,5,\dots}\frac{(-1)^{(n-1)/2}\cos(n\pi t)}{n}$$
Given that the sine series of $f(t)$ on $(0,1)$ is $f(t)=\frac4\pi\sum_{n=1,3,5,\dots}\frac{\sin(2\pi nt)}{n}$ we have shown thah
$$\sum_{n=1,3,5,\dots}\frac{\sin(2\pi nt)}{n}=\sum_{n=1,3,5,\dots}\frac{(-1)^{(n-1)/2}\cos(n\pi t)}{n}$$
on $(0,1)$.
A: We use $$\tanh^{-1} z= \sum_{n=0}^{\infty} \frac{z^{2n+1}}{2n+1},~~~\tan^{-1} z= \sum_{n=0}^{\infty}(-1)^n \frac{z^{2n+1}}{2n+1}.$$
$$S_1=\sum_{n=0}^{\infty}\frac {\sin[2(2n+1)\pi x]}{2n+1}= \Im \sum_{n=0}^{\infty}\frac {(e^{2i\pi x})^{2n+1}}{2n+1} =\Im [\tanh^{-1}e^{2i\pi x}]$$
$$S_2=\sum_{n=0}^{\infty} (-1)^n \frac {\cos[(2n+1)\pi x]}{2n+1}= \Re \sum_{n=0}^{\infty} (-1)^n\frac {(e^{i\pi x})^{2n+1}}{2n+1} =\Re [\tan^{-1}e^{i\pi x}]$$
Next,$$\Re\tan^{-1}e^{i\pi x}=\frac{i}{2}\Im\left[ \ln(1-ie^{i\pi x}) -\ln(1+ie^{i\pi x})   \right]=\frac{1}{2} ]\arg(1+ie^{i\pi x})-\arg(1+ie^{i\pi x})$$
$$=-\frac{1}{2}[-\tan^{-1}\frac{\cos \pi x}{1+\sin \pi x}-\tan^{-1} \frac{\cos \pi x}{1-\sin \pi x}]=\frac{1}{2}[\tan^{-1}\frac{1-\tan(\pi x/2)}{1+\tan(\pi x /2)}+\tan^{-1}\frac{1+\tan(\pi x/2)}{1-\tan(\pi x /2)}]=\frac{\pi}{4}$$
Similarly, it can be shown that $$\Im \tanh^{-1} e^{2i\pi x}=\frac{\pi}{4}$$
Hence $$S_1=S_2=\frac{\pi}{4}, ~ 0 <x<1$$.
