The separated solutions of a boundary problem come one sine or cosine at a time, but an initial temperature profile or the starting shape of a string is rarely a single wave. To use those solutions we need to know how much of each mode a given function contains. This lesson measures functions with an integral inner product, finds each amount by an orthogonal projection, and shows that the resulting partial sums are the best approximations in the mean-square sense, with Parseval’s identity accounting for the whole squared size of the function.
Key terms
Orthogonality of sines and cosines
Definition Fix . For real functions and that are piecewise continuous on , the inner product and the norm are
and and are orthogonal when . Write for , so that , and for . All of these functions have period , and they are mutually orthogonal. For ,
and for all and . The squared norms are
for . For two cosines or two sines, a product-to-sum identity turns the product into cosines with angular frequencies and , and a cosine whose frequency is a nonzero integer multiple of integrates to zero over . A sine times a cosine is an odd function, so its integral over the symmetric interval is zero. The identities and give the squared norm .
In plain words Orthogonal here is a statement about an integral, not about graphs meeting at right angles. Over a full period the product of two different modes is positive and negative in amounts that cancel exactly.
Example On , where , the identity gives
Nothing about the two graphs is perpendicular. At , for example, they cross with slopes and . The orthogonality comes from the integral alone. In the same way gives , which is .
Fourier coefficients
Definition The Fourier coefficients of a function that is piecewise continuous on are
for and
for . In the notation above, and . The factor comes from orthogonality. Suppose is a finite combination. Taking the inner product with for some removes every term but one and leaves , so . In the same way . The constant has the larger squared norm , so and the constant amplitude is . This is why the series below begins with , and why one formula serves every . Some books call the constant amplitude itself and put in its formula. Either convention works as long as the coefficient formulas and the series are kept together.
Symmetry saves work. If is odd, every is zero and is times the integral of over . If is even, every is zero and is times the integral of over .
In plain words Each coefficient measures how strongly lines up with one mode, divided by the squared length of that mode. A coefficient can be negative, which means that mode enters with its sign reversed.
Example Take the sawtooth, on repeated with period , so . The function is odd, so for every . Integration by parts with and gives a boundary term and a remaining integral of over , which is zero. Since ,
The first three are , and . The signs alternate and the sizes shrink like .
Fourier series
Definition The Fourier series of a function that is piecewise continuous on is
with the coefficients defined above. Its th partial sum keeps the terms with . Every term has period , so the series describes the -periodic extension of , the function on the whole line that repeats the values of on . The sign only attaches the series to . It does not claim that the series converges, or that its sum is . Where it converges and to what is a separate question, which the next lesson answers for piecewise smooth functions.
In plain words The series is a recipe for rebuilding a periodic function from a constant together with cosines and sines whose angular frequencies are , , and so on.
Example For the sawtooth of the previous section,
on , a series that begins . At the even terms vanish and the odd terms give . That is twice Leibniz’s series for , so the sum is , the value of the sawtooth there. At every term is zero, while the sawtooth jumps there from down to .
Orthogonal projection
Definition Let be the set of trigonometric polynomials of degree at most with period , the functions
with real constants and . The orthogonal projection of a piecewise continuous onto is the function in for which the residual is orthogonal to every element of , or equivalently to and to and for . It is unique. If two members of had this property, their difference would lie in and be orthogonal to itself, so it would have norm zero, and the only trigonometric polynomial with norm zero is the zero function. Because the basis is orthogonal, the projection is found one direction at a time. The amplitude of each basis function is , which is for the constant, for and for . Hence
the th partial sum of the Fourier series. The spaces are nested, , so a projection with more modes keeps all the old amplitudes and adds new ones.
In plain words Dropping a perpendicular from a point to a plane gives the nearest point of the plane, and the leftover piece has no component along the plane. Here the plane is the span of the first few modes, and the Fourier partial sum is the foot of the perpendicular.
Example For the sawtooth and , the projection is , since . The residual is odd, so it is orthogonal to and to , and
Best mean-square approximation
Definition Let be piecewise continuous on and let . The mean-square error of a trigonometric polynomial in is
which is . The partial sum is the best mean-square approximation of in , meaning for every other in . The reason is the Pythagorean theorem. The residual is orthogonal to , which lies in , so
and the last term is positive unless . The smallest error is
Since an error is never negative, this gives Bessel’s inequality for every . Because , the smallest error can only decrease as grows. All of this concerns the integral of the squared error. It does not say that makes the largest pointwise error as small as possible.
In plain words With the same modes available, no other choice of amplitudes gives a smaller total squared error. Moving any amplitude away from its Fourier value adds a positive amount to the error.
Example Approximate on by . Over this interval the integrals of , and are , and , so expanding the square gives
The minimum is at , which is exactly , and the smallest error is , about percent of . The largest pointwise error tells a different story. At the approximation is while , so the largest gap on is still , just as it was for .
Parseval’s identity
Definition If is piecewise continuous on , then
The same holds for every square-integrable , with the integral taken in the Lebesgue sense. By the formula for the smallest error, the identity is equivalent to as , so the partial sums converge to in the mean-square sense. It expresses the completeness of the sines and cosines. Bessel’s inequality becomes an equality in the limit, and a piecewise continuous function whose Fourier coefficients are all zero vanishes at every point where it is continuous. The identity says nothing about single points. Changing at finitely many points changes no integral, so it changes no coefficient and neither side of the identity, and mean-square convergence alone does not decide the sum of the series at any particular point.
In plain words The total squared size of the function is shared out among the modes, with nothing missing once every mode is counted. A partial sum accounts for part of it, and the part it misses is its mean-square error divided by .
Example For the sawtooth on the left side is , and the only nonzero coefficients have . Parseval’s identity gives
With one mode the coefficients account for out of . The missing is the error from the previous section divided by .
Check yourself
- Find the Fourier coefficients on of , and check Parseval’s identity for this function.
Show the answer
The function already lies in , so its projection onto is itself and its Fourier series is the function itself. The constant term equals , so , not . The formula agrees, since . The other nonzero coefficients are and , and all the rest are zero. The right side of Parseval’s identity is . On the left, the cross terms of the square integrate to zero by orthogonality, so
- Find the Fourier series of on . Then find its best mean-square approximation of the form and the smallest mean-square error.
Show the answer
The function is even, so every is zero, and . For , integration by parts gives a boundary term that vanishes at both ends, and then
This is for odd and for even , so
The best approximation is the projection , so , and . With , the smallest error is
- Use Parseval’s identity for on to find the sum of over the odd . What goes wrong if the constant term is entered as instead of ?
Show the answer
The left side is . On the right, and for odd , so
and the sum is . With in place of , the sum of the squares would have to equal , which is impossible for a sum of squares. The factor is there because the constant function has squared norm , twice that of every sine and cosine.