prove $f(x)=\sum_{k=1}^{+\infty}\frac{1}{n}\cos^{n}x\sin(nx)$ is $\mathcal{C}^{1}(\mathbb{R}-\pi\mathbb{Z})$ 
let $f$ be a real valued function of a real variable defined by:
$$f(x)=\sum_{k=1}^{+\infty}\frac{1}{n}\cos^{n}x\sin(nx)$$
  
  
*
  
*Prove that $f(x)$ is $\displaystyle \mathcal{C}^{1}(\mathbb{R}-\pi\mathbb{Z})$ and calculate $\dfrac{df}{dx}$
  


My thoughts:


*

*at points of $\pi\mathbb{Z}$ we have $ \sin(nx)=0$ so there is no problem to set the  infinite series.

*On an interval $[a,b]$ included in $\mathbb{R}\setminus\pi\mathbb{Z}$ we can show that $|\cos x|\leq k$ for some constant $k<1$ which proves the existence of the sum and must be sufficient to apply the term by term derivation theorem series

*The union of all these intervals is $\mathbb{R}\setminus\pi\mathbb{Z}$

 A: Put $f_n(x)=\cos^n x\sin(nx)/n$. Taking on your approach, let $[a,b]$ be an interval not containing any integer multiplie of $\pi$. Then there exists some constant $0<k<1$ such that $|\cos^n x|<k^n$ for all $x\in [a,b]$, hence the series converges absolutely in $[a,b]$. Moreover,
$$f^{'}_n(x)=\cos^{n-1}x(-\sin x)\sin (nx) + \cos^n x(\sin(nx))\cos(nx)$$
So for $a\leq x\leq b$:
$$|f^{'}_n(x)|\leq k^{n-1}+k^n$$
Consequently, the series $\sum_{n=1}^{\infty}f^{'}_n(x)$ converges uniformly on $[a,b]$. By a well known theorem, (theorem 2: term by term differentiation) we deduce that $f(x)$ is differentiable in $[a,b]$ and 
$$f^{'}(x)=\sum_{n=1}^{\infty}f^{'}_n(x)\enspace\forall x\in[a,b]$$
Moreover, as $f^{'}_n(x)$ is continuous for each $n$, the uniform convergence of the derivatives-series ensures the continuity of $f^{'}(x)$. 
Finally, every $x\in\mathbb{R}\backslash\mathbb{Z}\pi$ is in some interval of the form $[a,b]$ as above, and so the proof that $f^{'}(x)$ is continuous on this set is complete. There is probably not an easier expression for $f^{'}(x)$ other than the series $\sum f^{'}_n(x)$ above.
