Fourier Series & Orthogonal Expansions

term-by-term differentiation of a Fourier series

If a function equals an infinite sum of sines and cosines, it is tempting to find its derivative by simply differentiating each term and adding the results — turning cos(n pi x / L) into -(n pi / L) sin(n pi x / L), term by term. Sometimes this is exactly right and wonderfully convenient. But it is the riskiest of the term-by-term operations, because differentiation multiplies each coefficient by n, which amplifies the high harmonics and can wreck convergence that was previously fine.

The working rule: you may differentiate a Fourier series term by term and get the Fourier series of f' provided f is continuous (including across the period, with matching endpoint values) and f' itself is piecewise smooth. The continuity is the crucial gate. Differentiating multiplies the n-th coefficient by a factor proportional to n, so coefficients that decayed like 1/n^2 (fast enough to sum nicely) become coefficients decaying only like 1/n — and if the original f had a jump, its coefficients only decayed like 1/n to begin with, so after differentiation they would not decay at all and the differentiated series diverges. In short, a hidden discontinuity in f (or at the periodic seam) is what poisons term-by-term differentiation.

This caveat is not pedantry; it is the practical reason Fourier methods for differential equations need care. When you propose a Fourier-series solution and substitute it into an equation involving derivatives, you are implicitly differentiating term by term, and the legitimacy of the whole calculation rests on the solution being smooth enough. The safe habit is to check continuity at the endpoints first: a sine series of a function that does not vanish at the ends, or a cosine series whose function has nonzero end-slopes, has a hidden jump in the periodic extension and should not be blindly differentiated.

Differentiating x = 2[ sin x - sin 2x/2 + ... ] term by term gives 2[ cos x - cos 2x + cos 3x - ... ], which does not converge in the ordinary sense — exactly because the sawtooth x has a jump at x = pi, so its derivative is not a nice function there.

A hidden endpoint jump turns a perfectly good series into a divergent one the instant you differentiate it.

Differentiation roughens convergence (each term gains a factor of n), so it is the dangerous direction; integration smooths it (each term gains a factor of 1/n), which is why term-by-term integration is almost always safe and differentiation almost never is without checking continuity.

Also called
differentiating a Fourier series term by term傅里叶级数逐项求导termwise differentiation