I am looking for a solid example that such a function that its derivatives can always be found by taking derivatives component-wisely in its Fourier series. A function with finitely many Fourier terms is qualified. But I am looking for a function whose Fourier series contains infinitely many terms. When infinite sum comes into play, the situation becomes more tricky.
I have a candidate, Gaussian $f(x) = e^{-x^2}$ in $\mathbb{R}$. Is it possible to find a $f$ which is also periodic?
If you want just an example, here is one: Consider the series $$s(x):=\sum_{k=0}^\infty {1\over 2^k}\>\cos(k\, x)\ .$$ Differentiating termwise we obtain the series $$-\sum_{k=1}^\infty{k\over 2^k}\>\sin(k\, x)\ .$$ This second series is uniformly convergent on ${\mathbb R}$; therefore its sum is equal to $s'(x)$ for all $x\in{\mathbb R}$.
In this simple example the given series $s(x)$ can actually be summed explicitly, using $\cos(k\,x)={1\over2}(e^{ikx}+e^{-ikx})$. After simplifying one obtains $$s(x)={4-2\cos x\over 5-4\cos x}=:f(x)\qquad(x\in{\mathbb R})\ ;$$ therefore the given series is the Fourier series of this $f$.