Solution (source code)

= Solution

Differentiation of the finite sum involves no convergence issue. The <derivative> has the <Fourier cosine series>
$$
\boxed{f'(x)=\cos x+2\cos2x+3\cos3x}.
$$