Sum of series of the form $\sum \frac{(-1)^{m+1}}{2m+1}\sin(\frac{\pi}{2}(2m+1)x)$ I would like to calculate the sum of the series:
\begin{equation}
\sum_{m=M+1}^{\infty}\frac{(-1)^{m+1}}{2m+1}\sin((2m+1)\frac{\pi}{2}x)
\end{equation}
where M is big and finite. 

I searched on the books and found this sum:
\begin{equation}
\sum_{k=1}^{\infty}\frac{(-1)^{k-1}}{2k-1}\sin((2k-1)x)=\frac{1}{2}\ln\tan(\frac{\pi}{4}+\frac{x}{2})
\end{equation}
Now I try to put my question in the above form. Let m-M=n and m=n+M
\begin{equation}
\sum_{n=1}^{\infty} \frac{(-1)^{n+M+1}}{2(n+M)+1}\sin(2(n+M)+1)\frac{\pi}{2}x)
\end{equation}
I do not know how to proceed further. 
 A: Hints:
$\displaystyle f_M(x):=\sum\limits_{n=1}^\infty \frac{x^{n+M+0.5}}{2n+2M+1}$
Derivation and integration gives $\enspace\displaystyle f_M(x)=\frac{1}{2}\int\limits_0^x\frac{t^{M+0.5}}{1-t}dt$ .
Using $\enspace\displaystyle -1=e^{i\pi}\enspace$ and $\enspace\displaystyle\sin x=\frac{e^{ix}-e^{-ix}}{i2}\enspace$ we get 
$\displaystyle \sum\limits_{n=1}^\infty \frac{(-1)^{n+M+1}}{2n+2M+1}\sin((2n+2M+1)\frac{\pi}{2}x)=\frac{f_M(e^{i\pi(1+x)})-f_M(e^{i\pi(1-x)})}{2}$$\displaystyle =\frac{1}{4}\int\limits_{\exp(i\pi(1-x))}^{\exp(i\pi(1+x))}\frac{t^{M+0.5}}{1-t}dt$ 
with
$\displaystyle \int\frac{x^{M+0.5}}{1-x}dx=-2 P_M(x)\sqrt{x}+\ln\frac{1+\sqrt{x}}{1-\sqrt{x}}+C\enspace$ where $\, P_M(x)\, $ is a polynomial of degree $\,M\,$ .
It seems to be (means: I haven't tested e.g. by derivation) that $\enspace\displaystyle P_M(x)=\sum\limits_{k=0}^M \frac{x^k}{2k+1}$ .
Note (1): $\enspace\displaystyle P_\infty(x)=\frac{\tanh^{-1} \sqrt{x}}{\sqrt{x}}=\frac{1}{2\sqrt{x}}\ln\frac{1+\sqrt{x}}{1-\sqrt{x}}$
Note (2): $\,$ Don't forget to care about the value ranges, if you calculate something concrete.
A: Hint:
given
$$
f(x) = \sum\limits_{1\; \le \,k} {{{\left( { - 1} \right)^{\,k + 1} } \over {\left( {2k + 1} \right)}}} \sin \left( {\left( {2k + 1} \right){\pi  \over 2}x} \right)
$$
then
$$
\eqalign{
  & f'(x) = {\pi  \over 2}\sum\limits_{1\; \le \,k} {\left( { - 1} \right)^{\,k + 1} } \cos \left( {\left( {2k + 1} \right){\pi  \over 2}x} \right) =   \cr 
  &  = {\pi  \over 4}\sum\limits_{1\; \le \,k} {\left( { - 1} \right)^{\,k + 1} } \left( {e^{\,i\left( {2k + 1} \right){\pi  \over 2}x}  + e^{\, - i\left( {2k + 1} \right){\pi  \over 2}x} } \right) \cr} 
$$
and 
$$
\eqalign{
  & \sum\limits_{1\; \le \,k\, \le \,n} {\left( { - 1} \right)^{\,k + 1} e^{\,i\left( {2k + 1} \right){\pi  \over 2}x} }  =  - \,e^{\,i{\pi  \over 2}x} \sum\limits_{1\; \le \,k\, \le \,n} {\left( { - e^{\,i\pi x} } \right)^{\,k} }  =   \cr 
  &  =  - \,e^{\,i{\pi  \over 2}x} \left( {\sum\limits_{0\; \le \,k\, \le \,n} {\left( { - e^{\,i\pi x} } \right)^{\,k} }  - 1} \right) =  - \,e^{\,i{\pi  \over 2}x} \left( {{{1 + (-1)^{(n+1)}e^{\,i\pi \left( {n + 1} \right)x} } \over {1 + e^{\,i\pi x} }} - 1} \right) \cr} 
$$
This should help for what concerns summation bounds.
Thereafter you need to integrate. 
