Many problems in physics can be made clearer by considering the symmetry involved. This is particularly true in quantum mechanics, that uses waves as an integral part of particle dynamics. In this posting we will explore how symmetries in repeating wave functions affect their Fourier series.
Contents:
 Animation on symmetry
 Screw symmetry
 Functions of only even harmonics (twice repeating symmetry)
 Even symmetry
 Odd symmetry
 Odd/even symmetries, a question of phase
 Scrambled phases  the human ear
 Summary
Animation on symmetry
The animation below demonstrates the symmetries of repeating functions. Click on the buttons to choose the function and the symmetry to be checked for in that function. The animation also illustrates two different methods for checking the symmetries: the function as a whole and a pointbypoint method. In the paragraphs following the animation, we discuss each of the symmetries in detail. You might wish to refer back to the animation as you are reading about each type of symmetry.
This animation shows the process of checking for the various symmetries with a number of functions.
To slow the animation down in the "whole" mode, repeatedly click on "step" for a stepbystep rendition.

Screw Symmetry
A sine function  A crazy function with screw symmetry  A square wave has screw symmetry around its average value (in blue).  A triangle wave has screw symmetry around its average value (in blue). 
f(θ) = sin θ  f(θ) = A_{1}cos(θ + φ_{1}) + A_{3}cos(3θ + φ_{3}) + A_{5}cos(5θ + φ_{5}) + ...  f(θ) = ½ + (2/π)sin θ + (2/3π)sin 3θ + (2/5π)sin 5θ + ...  f(θ) = ½ + (4/π^{2})cos θ + (4/9π^{2})cos 3θ + (4/25π^{2})cos 5θ + ... 
Math: why only odd harmonics exist for functions with screw symmetry 

We start with the standard formula for the coefficients of the cosine terms:
In the second term of the third line above, we use
and also we replace θ with θ+2π (the function repeats itself every 2π radians) so that f(θ − π) becomes f(θ + π). The limits of integration of the second term then become θ+π = π to θ+π = 2π which is equivalent to θ=0 to θ=π. Examining the factor in brackets on the last line, we get: In the first line, we use the standard relation for cos(a + b) = cos a cos b − sin a sin b. In the second line we use the fact that sin nπ = 0. Also we use the fact that cos nθ changes from −1 to +1 and back to −1 and to +1, etc as n increases from 1, 2, 3, 4, .... . This oscillating value of cos nθ makes the expression above zero for even n's. We can repeat this procedure for the b_{n}'s and get very similar results. The only difference is that we need to use the relation sin(a + b) = sin a cos b + cos a sin b. We get a similar oscillating expression that ends up making all the b_{n}'s zero for even n's, just like before. 
In the last row in the table above, we show the Fourier series of each function. The Fourier series of functions with screw symmetry have only odd harmonics. The table above confirms this. The mathematical explanation of why there are only odd harmonics is at the right. The nonmathematical explanation is that sines and cosines of even harmonics (n = 2, 4, 6, 8, ...) do not have screw symmetry, while odd harmonics (n = 1, 3, 5, 7, ...) do have screw symmetry. It only makes sense that a screw symmetric function would be decomposed into a sum of screw symmetric sinusoids, i.e. into only odd harmonic sinusoids.
Screw symmetry is unaffected by horizontal shifting
A
little playing around with these functions will also show that shifting
functions with screw symmetry to the right or left does not affect
their screw symmetry. That is, shifting horizontally does not affect screw symmetry. If
for all θ, then substituting θ = θ'+ε in for θ yields f(θ' + ε) = −f(θ' + ε − π) . After all, shifting only interchanges the
sine and cosine amplitudes inside each harmonic, i.e. changes the phase
of each harmonic, as discussed in an earlier posting. It does not change one harmonic into another.
That is, a function with only odd harmonics will still only
contain odd harmonics after shifting it horizontally and will therefore still have screw symmetry.
Another way to see this is to understand that checking for screw symmetry only involves a right shift and flip and has nothing to do with the x = 0 point. Thus moving a function relative to the x = 0 point will have no effect on whether it has screw symmetry.
Functions
having only odd harmonics have screw symmetry.
The
inverse of screw symmetry functions having only odd harmonics is also
true: that a function with only odd harmonics will have screw
symmetry. We can see this by noting that odd harmonics are
sinusoids of the forms sinnx and cosnx where n is odd (i.e. n = 1, 3, 5, 7, ...). We graphed the sine case where n=1 above and the n=1
sine and cosine cases are covered in the animation above (where we show
that both have screw symmetry). It is also true that sinnx and cosnx for other odd n's also have screw symmetry. (sinnx and cosnx for other even n's
have twice repeating symmetry discussed next.) It is also true that
sums of functions with screw symmetry have screw symmetry as shown
below. Since a Fourier series having only odd harmonics will be a sum
of a bunch of screw symmetric terms, it follows that the whole function
will have screw symmetry.
Math showing that when we add two functions each having screw symmetry, their sum also has screw symmetry. 
sum(θ) = f(θ) + g(θ) = −f(θ − π) − g(θ − π) = −{f(θ − π) + g(θ − π)} = −sum(θ − π) 
This type of symmetry repeats the same pattern twice every cycle, i.e. twice every 2π radians, or once every π radians. It is similar to the screw symmetry, discussed above, but without the flipping. 
Functions of only even harmonics ... twice repeating symmetry
Functions with twice repeating symmetry only contain even harmonics
You might ask whether some functions only have even harmonics.
The answer is yes, they exist and we saw one such example in the interactive table in the previous posting under the title "full wave" function (referring to the waveform of the electrical signal from a full wave rectifier). I'll refer to the symmetry displayed here as "twice repeating symmetry" and it is illustrated with the frogs at the right. This occurs if the pattern in the first half cycle is reproduced in the second half cycle, i.e. if
The full wave function is shown below along with its Fourier series. Note that the Fourier series contains only even harmonics. Using almost the same steps as in the math box above but with the new relationship in it, one can show that functions with this twice repeating symmetry have only even harmonics.
Full wave function (signal from a full wave rectifier) is an example of twice repeating symmetry. 
f(θ) = 2/π − (4/3π)cos 2θ − (4/15π)cos 4θ − (4/35π)cos 6θ + ... 
Recasting a twice repeating function to eliminate the duality
As was pointed out in the previous posting, and as plotted at the left, the full wave function exactly repeats itself every π radians. Since all of our Fourier series equations are based on the assumption that a function repeats every 2π radians, we need to recast this function so that it cycles every 2π radians. We show this in the table below along with the new Fourier series which now includes every possible term (as opposed to only the even terms). Generally speaking, all functions that contain only even harmonics repeat themselves every π radians and usually need to be recast so that they repeat themselves every 2π radians. This process does not seem so arbitrary when the function varies with distance and/or time. See the table below for the recasting of functions of time.
Original functions  After recasting  Explanations 
Original function with a generic angle as its variable

Recasting of function with generic angle variable

We substitute θ/2 in for θ. This rescales the horizontal axis, but does not affect the vertical axis or scale. This recasting does not affect the amplitude of the harmonics, but does change the n^{th} harmonic into the n^{th}/2 harmonic. That is, the fourth harmonic becomes the second harmonic, etc. The solutions of the indefinite integrals are from Wolfram Mathematica but alternatively could be done using equations for the product of a sine and cosine function: sinα cosβ=½[sin(α+β)+sin(α−β)]. Note that over the interval 0 to 2π, sin θ/2 does not change sign, so that in the second case, the integration can be done in one chunk, over the entire interval at once. Note also that the two results have the same amplitude for each harmonic, although because the old 4th harmonic is the new second harmonic, we need to multiply the new n by 2 in the final equation to keep the amplitude the same. 

 
Original function with time as its variable

Recasting of function with time as its variable 
This is a physical waveform as a function of time. The function is y=sinωt where ω is the angular frequency of a physical process. Originally we designate the period T to be from t = 0 to t=2π/ω as we might for regular sinusoids. This period proves to be twice as large as it should be. That is, the function repeats itself inside this period. So we pick a new period of T=π/ω as shown on the second graph. To find the coefficients a_{n}, we integrate over the interval t=0 to t=T=π/ω. We limit our math to showing that the calculations of the coefficients a_{n} are equivalent to the starting equations of that done above with θ as the argument (with the final substitution of θ in for ωt or 2ωt respectively for the two cases). 


Understanding twice repeating symmetry through an inversion of the recasting process
The inverse of this recasting allows us to understand this symmetry better. If we take any repeating function that is not twice repeating and does not have screw symmetry (thus having both even and odd harmonics), and substitute 2θ in for θ, we will have the function repeating twice every 2π radians, meaning that we now have a function with twice repeating symmetry. At the same time, all the terms of the Fourier series will have their sinusoidal arguments affected in the following way:
 cos nθ will become cos 2nθ
 sin nθ will become sin 2nθ
 Since 2n is always an even number, we will have only even harmonics.
 This procedure illustrates that all twice repeating functions can be considered to be a general function with both even and odd harmonics with an incorrectly chosen period. It is also one way to understand that there will be only even harmonics.
Breaking a function into a screw symmetric function and a twice repeating function
In the following math block we show that any arbitrary repeating function f(θ) can be split into a screw symmetric function g(θ) and a twice repeating function h(θ).
We take the original function f(θ), split it into two half pieces, and also add and subtract a new factor ½f(θ − π)  
We rearrange the terms as shown and call the first block g(θ) and the second block h(θ).  
In this line we show that g(θ) = −g(θ − π) showing that g(θ) has screw symmetry. We use the fact that the functions repeat every 2π so that f(θ) = f(θ − 2π).  
In this line we show that h(θ) = h(θ − π) showing that h(θ) has twice repeating symmetry. 
An alternate way to view this, which makes it obvious, is that given a function represented by its Fourier series, we can clearly separate the odd harmonics from the even harmonics and end up with a sum of a screw symmetric function and a function with twice repeating symmetry:
In the line above I have used the fact that to allow me to include the constant term in the summation over even harmonics, treating the constant term as the zeroth harmonic. This also has the added bonus of making the screw symmetric function more simply compliant with the concept of screw symmetry, without the need to flip the function about the average value. Instead, we now flip around the x axis as specified by . The average value is part of the twice repeating function, i.e. that having only even harmonics (which now includes the zeroth harmonic).
Even symmetry
Even symmetry means that the function on the left side of the y axis is the mirror image of the function on the right side, as is illustrated in the cheerleader cartoon to the right. The functions of the interactive table in the last posting with even symmetry are the triangle wave, the full wave, and the pulse train. These are shown below, along with their Fourier series. You might want to play with the animation at the beginning of this posting to understand this type of symmetry from a more visual sense. 

Triangle wave  Full wave  pulse train  Cosine function 
f(θ) = 1/2 − (4/π^{2}) cosθ − (4/9π^{2}) cos3θ − (4/25π^{2}) cos5θ − .... 
f(θ) = 2/π − (4/3π) cos2θ
− (4/15π) cos4θ − (4/35π) cos6θ − .... 
f(θ) = τ/2π +
(τ/π) sinc τ/2 cosθ
+ (τ/π) sinc2τ/2 cos2θ + (τ/π) sinc3τ/2 cos3θ + .... 
f(θ) = cosθ 
Functions of even symmetry only contain cosine terms We have also included a cosine function for comparison. Note that the Fourier series of each of these even symmetry functions only contains cosine terms. Note that all the above functions can be flipped around the y axis without change. Mathematically we can specify this symmetry as . (3)The mathematical explanation of why this is true is shown in the box at the right. A simple explanation is that an even symmetry function is naturally decomposed into even symmetry sinusoids, i.e. into cosine functions. 

Odd symmetry 
 
Odd symmetry means that the function on the left side of the y axis is negative the mirror image of the function on the right side. That is, it is a flipped mirror image, as is illustrated by the cartoon at the right. The functions of the interactive table in the last posting with odd symmetry are the square wave, the sine wave, the sawtooth, and the half circle function. Three of these are shown below with their Fourier series. 
Square wave  Sawtooth  Sine wave 
f(θ) = 1/2 + (2/π) sinθ + (2/3π) sin3θ + (2/5π) sin5θ + ....  f(θ) = 1/2 − (1/π) sinθ − (1/2π) sin2θ − (1/3π) sin3θ − ....  f(θ) = sinθ 
 

. (4)
Functions
with a nonzero
average, are flipped about their average value, shown in blue above.
Technically, these do not meet the mathematical definition of
odd symmetry just given; however, the nonzero average value only
affects the a_{0} coefficient and can be subtracted out for the purpose of this discussion.
Functions of odd symmetry only have sine terms
Note that with the caveat of flipping about the average value, all the
functions above have odd symmetry and also have only sine terms in
their Fourier expansion. Observe the animation at the beginning of this posting to understand odd symmetry visually.
The mathematical explanation of why odd symmetric functions have zero cosine terms is shown in the box at
the right. A simple nonmathematical explanation is that an odd
symmetry function is naturally
decomposed into odd symmetry sinusoids, i.e. into sine functions.
Even/odd symmetries, a question of phase
The mix of sine and cosine terms is affected by horizontal shifting of a function
In the last posting, we discussed the issue of phase and the interrelationship of sine and cosine terms. Each harmonic can be expressed as an amplitude and phase, OR as a sine term plus a cosine term. Each amplitude can be split between a sine term and a cosine term. If we shift the function in the horizontal direction, then the amplitude, A_{n}, of each harmonic stays the same, but the phase, φ_{n}, of each changes. When viewed as sine and cosine terms, shifting horizontally changes the sinetocosine mix. The above discussion supports this. We see that the square wave above, as pictured there, has odd symmetry and because of this, it only has sine terms. If we were to shift it by π/2 to the left it would be symmetrically placed around the x axis and would have even symmetry and therefore only have cosine terms. So shifting changes the mix of sine and cosine terms as discussed in the last posting.
Phases of functions of even symmetry and functions of odd symmetry
Using φ_{n} = arctan2(y, x) = arctan2(−b_{n}, a_{n}) from the posting on "sines, cosines, and phases", Equation 12b, we see that even symmetric functions which have no sine terms (the b_{n}'s = 0) have a phase given by φ_{n} = arctan2(0, a_{n}) = 0 or π radians, depending on whether a_{n} is positive or negative. Similarly, odd symmetric functions, which have no cosine terms (the a_{n}'s = 0) have a phase given by φ_{n} = arctan2(−b_{n},0) = −π/2 or π/2 radians depending on whether b_{n} is positive or negative.
A general function can be broken into an even symmetry function plus and odd symmetry function
Any function can be written as a sum of an even symmetry function plus an odd symmetry function. This is mathematically demonstrated in the box at the right. This is an application of the idea from the posting on "sines, cosines, and phases" that any sinusoidal function can be broken into a sine plus a cosine of the same argument. In this case, we would break up the Fourier series of our general function into pure sine terms and pure cosine terms, separating these into two Fourier series. The first would have odd symmetry while the second would have even symmetry.
Scrambled phases  the human ear
The human ear is very sensitive to the harmonic content of sounds. This allows us to distinguish a concert A played by a violin from the same note played by a flute. At the same time, the ear is not sensitive to the phases of the harmonics. That is to say, if we change the relative phase, i.e. the timing, of the second harmonic relative to the fundamental, the human ear will not notice any change. This is not to say that we are totally insensitive to all aspects of phase. Indeed, the relative timing of sound reaching the left ear relative to that reaching the right ear is one factor involved in our perception of the directionality of sound. The following box demonstrates the insensitivity to the harmonic phases of sound by allowing a viewer to listen to two sounds, both with the same harmonic content, but with differing phases of the harmonics. Because of this difference, the graphs of the sound functions versus time look distinctly different, but the sounds in the two audio clips will sound identical.
I might also point out that, while the human ear is insensitive to harmonic phase, digital electronics such as computers are very sensitive to harmonic phases. This is because digital systems generally operate on pulses, i.e. the spikes in waveforms, and harmonic phases greatly affect these spikes. As you can see in the example below, the spikes in the two waveforms below are very different.

 
The two waveforms above show the acoustical pressure versus time for
two different sounds that happen to have the same amplitudes of their
fundamental and harmonics, but with different phases. The graphs show
two cycles of each waveform that repeat many, many times.
The equations for each graph are shown below the graphs where ω=2πf=2π2kHz.
Note the minus signs of the harmonic terms in the equation on the
right. These minus signs represent 180 degree phase differences
between the fundamental
and the higher harmonics. Click on the two icons below to hear the two sounds for yourself. You will be surprised how similar they sound. 



Summary

Copyright P. Ceperley 2009
LAST POSTING: How good is a Fourier series of a function at reproducing the original function 