Solution (source code)

= Solution

Write the translated <Fourier series> in the convention $a_0^{(g)}/2+\sum_{n\geq1}(a_n^{(g)}\cos k_nx+b_n^{(g)}\sin k_nx)$. Comparing with (i) gives
$$
\boxed{a_0^{(g)}=0,\qquad a_n^{(g)}=-b_n\sin\frac{2\pi n\ell}{L},\qquad
b_n^{(g)}=b_n\cos\frac{2\pi n\ell}{L}}.
$$
The minus sign in the <cosine> coefficient records translation in the positive $x$ direction.