Series expansion of $x$ in terms of $\sin(\frac{x}{n})$ I am looking at expanding $y = x$ for $ 0 < x < \pi$ in terms of sine functions of the type $\sin(\frac{x}{n})$ where $n \in \mathbb N$. This looks a lot like the Fourier series but I could not use it as an inspiration to solve this problem. I am also interested in showing if the series $\sum_{n=1}^{\infty} a_n \sin(\frac{x}{n})$ converges uniformly to $x$.
 A: Hint
For a given $n$, compute
$$\Phi_n=\int_0^\pi \Bigg[x-\sum_{k=1}^{n} a_k \sin \left(\frac{x}{k}\right)\Bigg]^2\, dx$$ which is simple since, expanding and computing, we have
$$\Phi_n=\frac{\pi ^3}{3}-2\sum_{k=1}^{n} a_k k \left(k \sin \left(\frac{\pi }{k}\right)-\pi  \cos \left(\frac{\pi}{k}\right)\right)+$$
$$\frac 14\sum_{k=1}^{n} a^2_k  \left(2 \pi -k \sin \left(\frac{2 \pi }{k}\right)\right)+$$ $$2\sum_{k=1}^{n-1}\sum_{l=k+1}^{n}a_k a_l \frac{k l \left(l \cos \left(\frac{\pi }{k}\right) \sin \left(\frac{\pi
   }{l}\right)-k \sin \left(\frac{\pi }{k}\right) \cos \left(\frac{\pi
   }{l}\right)\right)}{(k-l) (k+l)}$$
Since you want $\Phi_n$ to be minimum , write
$$\frac {\partial \Phi_n}{\partial a_1}=\frac {\partial \Phi_n}{\partial a_2}=\cdots=\frac {\partial \Phi_n}{\partial a_n}=0$$ which is just a linear system of $n$ equations. You will obtain exact expressions for the $a_k$'s.
I shall not write the results, but, to give a taste, $\Phi_3=1.028\times 10^{-7}$, $\Phi_4=3.411\times 10^{-12}$ and  $\Phi_5=3.371\times 10^{-19}$.
