I would like to know how define and compute the Mellin transform (see the definition of previous integral transform in the Wikipedia's article) of $\cos\left(2\pi\frac{k}{n}x\right)$. My genuine problem is consider the Möbius function expressed as $$\mu(n)=\sum_{\substack{(k,n)=1\\1\leq k\leq n}}\cos\left(2\pi\frac{k}{n}\right),$$ then I am interested in calculate the Mellin transform of the following related function, here thus $n\geq 1$ is a fixed integer, $$f_{n}(x)=\sum_{\substack{(k,n)=1\\1\leq k\leq n}}\cos\left(2\pi\frac{k}{n}x\right)$$ as $$\left\{ \mathcal{M} f_n\right\}(s)=\sum_{\substack{(k,n)=1\\1\leq k\leq n}}\int_0^\infty x^{s-1}\cos\left(2\pi\frac{k}{n}x\right)dx,$$ using that this integral transform is linear.
Question 1. Can you explain how get easily the Mellin transform of one of the summands, thus $$\int_0^\infty x^{s-1}\cos\left(2\pi\frac{k}{n}x\right)dx?$$ Where is defined the integral transform? (I say where is defined the result.)
After,
Question 2. Can you state the more simplified form (if there are simplifications to get the sum) for $$\left\{ \mathcal{M} f_n\right\}(s)?$$ Thanks in advance.