I have to calculate sums of the following forms $$\sum\limits_{k=1}^nP(k)f_m(kx),$$ where $P\in\mathbb{R}[X]$ and $f_m(x)=\sin^m(x)$ or $f_m(x)=\cos^m(x)$.
This problem comes from consideration of some physical systems on which I am working on now.
I am looking for some references and possible methods of computation of these kind of sums. I found many papers about relations between such sums for $P$ being a constant, but no reference for general polynomial. I will be gretaful for any suggestion.