TITLE: "Bad" Fourier Series derivation
QUESTION [8 upvotes]: Let $f(\theta)$ $2\pi$-periodic such that $f(\theta)=e^{\theta}$ for $-\pi<0<\pi$, and $$e^{\theta}=\sum_{n=-\infty}^{\infty}c_{n}e^{in\theta}\,\,\, \mathrm{for}\,\, |\theta|<\pi $$
it's  Fourier series. If we formally differentiate this equation, we obtain
$$e^{\theta}=\sum_{n=-\infty}^{\infty}inc_{n}e^{in\theta}. $$
But this implies  $c_{n}=inc_{n}$ or $(1-in)c_{n}=0$, so, $c_{n}=0\,\forall n\in\mathbb{Z}$. This is obviously wrong.
Where is the mistake?
The only thing that I could contest is the derivative of $f$. I know a theorem saying that a sufficient condition is $f$ continuous and piecewise smooth, and $f$ is not continous. But it don't implies that I can't derivate term by term.

REPLY [6 votes]: You have to think in terms of distributional derivatives, because in this sense you can switch series and derivative. Think $f$ as defined on the 1-torus. Then the distributional derivative of $f$ it is not $f$ itself, but $f-(e^\pi-e^{-\pi})\delta_{[\pi]}$, where $\delta_{[\pi]}$ is the delta Dirac in the point $[\pi]$ of the 1-torus. So, in distributional sense: $$\sum_{n=-\infty}^\infty inc_ne_n = f'=f-(e^\pi-e^{-\pi})\delta_{[\pi]}=\sum_{n=-\infty}^\infty c_ne_n - (e^\pi-e^{-\pi})\delta_{[\pi]}$$
i.e.:
$$\sum_{n=-\infty}^\infty (in-1)c_ne_n=-(e^\pi-e^{-\pi})\delta_{[\pi]}=-(e^\pi-e^{-\pi})\sum_{n=-\infty}^\infty e^{in\pi}e_n \\ = -(e^\pi-e^{-\pi})\sum_{n=-\infty}^\infty \frac{(-1)^n}{2\pi}e_n.$$
Then:
$$\forall n\in \mathbb{Z}, (in-1)c_n=-\frac{(-1)^{n}}{2\pi}(e^\pi-e^{-\pi})$$
i.e.:
$$\forall n\in\mathbb{Z}, c_n=\frac{(-1)^{n}(e^\pi-e^{-\pi})}{2\pi(1-in)}.$$