<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m0039">

  <name>Fourier Series</name>

  <metadata>
  <md:version>2.19</md:version>
  <md:created>2000/07/21</md:created>
  <md:revised>2004/08/17 22:07:27.213 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="dhj">
      <md:firstname>Don</md:firstname>
      
      <md:surname>Johnson</md:surname>
      <md:email>dhj@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="rha">
      <md:firstname>Roy</md:firstname>
      
      <md:surname>Ha</md:surname>
      <md:email>rha@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="dhj">
      <md:firstname>Don</md:firstname>
      
      <md:surname>Johnson</md:surname>
      <md:email>dhj@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="bfite">
      <md:firstname>Benjamin</md:firstname>
      
      <md:surname>Fite</md:surname>
      <md:email>bfite@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Euler</md:keyword>
    <md:keyword>Fourier coefficients</md:keyword>
    <md:keyword>Fourier series</md:keyword>
    <md:keyword>frequency</md:keyword>
    <md:keyword>Gauss</md:keyword>
    <md:keyword>orthogonality</md:keyword>
    <md:keyword>sinusoid</md:keyword>
    <md:keyword>square wave</md:keyword>
  </md:keywordlist>

  <md:abstract>Signals can be composed by a superposition of an infinite number
of sine and cosine functions.  The coefficients of the superposition
depend on the signal being represented and are equivalent to knowing
the function itself.
</md:abstract>
</metadata>

  <content>
    <para id="p01">
      In <cnxn document="m0008" target="swsuper" strength="9">Signal
      Decomposition</cnxn>, we have shown that we could express the
      square wave as a superposition of pulses. This superposition
      does not generalize well to other periodic signals: How can a
      superposition of pulses equal a smooth signal like a sinusoid?
      Because of the importance of sinusoids to linear systems, you
      might wonder whether they could be added together to represent a
      large number of periodic signals. You would be right and in good
      company as well.
      <link src="http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Euler.html">Euler</link> 

      and 
      <link src="http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Guass.html">Gauss</link>

      in particular worried about this problem, and 
      <link src="http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Fourier.html">Fourier</link> 

      got the credit even though tough mathematical issues were not
      settled until later. They worked on what is now known as the
      Fourier series.  
    </para>

    <para id="p02"> 
      Let 
      <m:math>
	<m:apply>
	  <m:ci type="fn">s</m:ci>
	  <m:ci>t</m:ci>
	</m:apply>
      </m:math> 
      have period 
      <m:math>
	<m:ci>T</m:ci>
      </m:math>.       
      We want to show that periodic signals, even those that have
      constant-valued segments like a square wave, can be expressed as
      sum of <term>harmonically</term> related sine waves.

      <equation id="sine">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">s</m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
              <m:ci>
                <m:msub>
                  <m:mi>a</m:mi>
                  <m:mn>0</m:mn>
                </m:msub>
              </m:ci>
              <m:apply>
                <m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:infinity/></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>a</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
              </m:apply>	      
              <m:apply>
                <m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:infinity/></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>b</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
              </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> 
      </equation>

      The family of functions called <term>basis functions</term>
      <m:math>
	<m:set>
	  <m:apply>
	    <m:cos/>
            <m:apply>
              <m:divide/>
	      <m:apply>
		<m:times/>
		<m:cn>2</m:cn>
		<m:pi/>
		<m:ci>k</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	      <m:ci>T</m:ci>
            </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:sin/>
            <m:apply>
              <m:divide/>
	      <m:apply>
		<m:times/>
		<m:cn>2</m:cn>
		<m:pi/>
		<m:ci>k</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	      <m:ci>T</m:ci>
            </m:apply>
	  </m:apply>
	</m:set>
      </m:math>
      form the foundation of the Fourier series. No matter what the
      periodic signal might be, these functions are always present and
      form the representation's building blocks. They do depend on the
      signal's period
      <m:math>
	<m:ci>T</m:ci>
      </m:math>, 
      and are indexed by
      <m:math>
	<m:ci>k</m:ci>
      </m:math>. 
      The frequency of each term is
      <m:math>
	<m:apply>
	  <m:divide/>
	  <m:ci>k</m:ci>
	  <m:ci>T</m:ci>
	</m:apply>
      </m:math>.  
      For
      <m:math>
	<m:apply>
	  <m:eq/>
          <m:ci>k</m:ci>
          <m:cn>0</m:cn>
	</m:apply>
      </m:math>, 
      the frequency is zero and the corresponding term
      <m:math>
	<m:ci>
	  <m:msub>
	    <m:mi>a</m:mi>
            <m:mn>0</m:mn>
	  </m:msub>
	</m:ci>
      </m:math>
      is a constant. The basic frequency
      <m:math>
	<m:apply>
	  <m:divide/>
          <m:cn>1</m:cn>
          <m:ci>T</m:ci>
	</m:apply>
      </m:math>
      is called the <term>fundamental frequency</term> because all other
      terms have frequencies that are integer multiples of it. These
      higher frequency terms are called <term>harmonics</term>: The term
      at frequency
      <m:math>
	<m:apply>
	  <m:divide/>
          <m:cn>1</m:cn>
          <m:ci>T</m:ci>
	</m:apply>
      </m:math>      
      is the fundamental and the first harmonic,
      <m:math>
	<m:apply>
	  <m:divide/>
          <m:cn>2</m:cn>
          <m:ci>T</m:ci>
	</m:apply>
      </m:math>
      the second harmonic, etc. Thus, larger values of the series
      index correspond to higher harmonic-frequency sinusoids. The
      <term>Fourier coefficients</term>,
      <m:math>
	<m:ci>
	  <m:msub>
	    <m:mi>a</m:mi>
            <m:mi>k</m:mi>
	  </m:msub>
	</m:ci>
      </m:math>
      and
      <m:math>
	<m:ci>
	  <m:msub>
	    <m:mi>b</m:mi>
            <m:mi>k</m:mi>
	  </m:msub>
	</m:ci>
      </m:math>,      
      depend on the signal's waveform. Because frequency is linked to
      index, the coefficients implicitly depend on frequency.  

      <note type="Key point"> 
	Assuming we know the period, knowing the Fourier coefficients
	is equivalent to knowing the signal.
      </note>
    </para>

    <para id="para1"> 
      Assume for the moment that the Fourier series works. To find the
      Fourier coefficients, we note the following
      <term>orthogonality</term> properties of sinusoids.

      <equation id="orthogonality">
	<m:math display="block">
	  <m:apply>
	    <m:forall/>
	    <m:bvar><m:ci>k</m:ci></m:bvar>
	    <m:bvar><m:ci>l</m:ci></m:bvar>
	    <m:condition>
	      <m:apply>
		<m:in/>
		<m:ci>k</m:ci>
		<m:integers/>
	      </m:apply>
	    </m:condition>
	    <m:condition>
	      <m:apply>
		<m:in/>
		<m:ci>l</m:ci>
		<m:integers/>
	      </m:apply>
	    </m:condition>		    
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit><m:ci>T</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci> 
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:cos/>
		    <m:apply> 
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>l</m:ci> 
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>
      
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:int/>
	      <m:bvar><m:ci>t</m:ci></m:bvar>
	      <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>T</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci> 
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>l</m:ci> 
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:piecewise>
	      <m:piece>
		<m:apply>
		  <m:divide/>
		  <m:ci>T</m:ci>
		  <m:ci>2</m:ci>
		</m:apply>
		<m:condition>
		  <m:apply>
		    <m:and/>
		    <m:apply>
		      <m:eq/>
		      <m:ci>k</m:ci>
		      <m:ci>l</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:neq/>
		      <m:ci>k</m:ci>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:neq/>
		      <m:ci>l</m:ci>
		      <m:cn>0</m:cn>
		    </m:apply>
		  </m:apply>
		</m:condition>
	      </m:piece>
	      <m:piece>
		<m:cn>0</m:cn>
		<m:apply>
		  <m:or/>
		  <m:apply>
		    <m:neq/>
		    <m:ci>k</m:ci>
		    <m:ci>l</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:eq/>
		    <m:ci>k</m:ci>
		    <m:cn>0</m:cn>
		    <m:ci>l</m:ci>
		  </m:apply>
		</m:apply>
	      </m:piece>
	    </m:piecewise>
	  </m:apply>
	</m:math>
      
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:int/>
	      <m:bvar><m:ci>t</m:ci></m:bvar>
	      <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>T</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:cos/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci> 
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:cos/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>l</m:ci> 
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:piecewise>
	      <m:piece>
		<m:apply>
		  <m:divide/>
		  <m:ci>T</m:ci>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:condition>
		  <m:apply>
		    <m:and/>
		    <m:apply>
		      <m:eq/>
		      <m:ci>k</m:ci>
		      <m:cn>l</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:neq/>
		      <m:ci>k</m:ci>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:neq/>
		      <m:ci>l</m:ci>
		      <m:cn>0</m:cn>
		    </m:apply>
		  </m:apply>
		</m:condition>
	      </m:piece>
	      <m:piece>
		<m:ci>T</m:ci>
		<m:apply>
		  <m:eq/>
		  <m:ci>k</m:ci>
		  <m:cn>0</m:cn>
		  <m:ci>l</m:ci>
		</m:apply>
	      </m:piece>
	      <m:piece>
		<m:cn>0</m:cn>
		<m:apply>
		  <m:neq/>
		  <m:ci>k</m:ci>
		  <m:ci>l</m:ci>
		</m:apply>
	      </m:piece>
	    </m:piecewise>
	  </m:apply>
	</m:math>

      These orthogonality relations follow from the following
      important trigonometric identities.
      
	<equation id="trigident">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:sin/>
		  <m:ci>α</m:ci>
		</m:apply>
		<m:apply>
		  <m:sin/>
		  <m:ci>β</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:minus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:plus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:cos/>
		  <m:ci>α</m:ci>
		</m:apply>
		<m:apply>
		  <m:cos/>
		  <m:ci>β</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:plus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:minus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:sin/>
		  <m:ci>α</m:ci>
		</m:apply>
		<m:apply>
		  <m:cos/>
		  <m:ci>β</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:plus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:minus/>
		      <m:ci>α</m:ci> 
		      <m:ci>β</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>

      These identities allow you to substitute a sum of sines and/or
      cosines for a product of them.  Each term in the sum can be
      integrating by noticing one of two important properties of
      sinusoids.
      <list id="triglist">
	<item>
	  The integral of a sinusoid over an
	  <emphasis>integer</emphasis> number of periods equals zero.
	</item>
	<item>
	  The integral of the <emphasis>square</emphasis> of a
	  unit-amplitude sinusoid over a period
	  <m:math><m:ci>T</m:ci></m:math> equals
	  <m:math>
	    <m:apply><m:divide/>
	      <m:ci>T</m:ci> <m:cn>2</m:cn>
	    </m:apply>
	  </m:math>.
	</item>
      </list>
    </para>

    <para id="fsterms">
      To use these, let's multiply the Fourier series for a signal
      (<m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">s</m:ci>
	    <m:ci>t</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:plus/>
	    <m:ci>
	      <m:msub>
		<m:mi>a</m:mi>
		<m:mn>0</m:mn>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>k</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit><m:infinity/></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>a</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:cos/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>k</m:ci></m:bvar>
	      <m:lowlimit><m:cn>1</m:cn></m:lowlimit>
	      <m:uplimit><m:infinity/></m:uplimit>
	      <m:apply><m:times/>
		<m:ci><m:msub>
		    <m:mi>b</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>) 
      by      
      <m:math>
	<m:apply>
	  <m:cos/>
	  <m:apply>
	    <m:divide/>
	    <m:apply>
	      <m:times/>
	      <m:cn>2</m:cn>
	      <m:pi/>
	      <m:ci>l</m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	    <m:ci>T</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
      and integrate.  The idea is that, because integration is linear,
      the integration will sift out all but the term involving
      <m:math>
	<m:ci><m:msub>
	    <m:mi>a</m:mi>
	    <m:mi>l</m:mi>
	  </m:msub></m:ci>
      </m:math>. 

      <equation id="eqn4">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:int/>
	      <m:bvar><m:ci>t</m:ci></m:bvar>
	      <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
	      <m:uplimit><m:ci>T</m:ci></m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn">s</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:cos/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>l</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit><m:ci>T</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>a</m:mi>
		      <m:mn>0</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>l</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:infinity/></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>a</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:int/>
		    <m:bvar><m:ci>t</m:ci></m:bvar>
		    <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		    <m:uplimit><m:ci>T</m:ci></m:uplimit>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:cos/>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>k</m:ci>
			    <m:ci>t</m:ci>
			  </m:apply>
			  <m:ci>T</m:ci>
			</m:apply>
		      </m:apply>
		      <m:apply>
			<m:cos/>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>l</m:ci>
			    <m:ci>t</m:ci>
			  </m:apply>
			  <m:ci>T</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:lowlimit><m:cn>1</m:cn></m:lowlimit>
		<m:uplimit><m:infinity/></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>b</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:int/>
		    <m:bvar><m:ci>t</m:ci></m:bvar>
		    <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		    <m:uplimit><m:ci>T</m:ci></m:uplimit>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:sin/>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>k</m:ci>
			    <m:ci>t</m:ci>
			  </m:apply>
			  <m:ci>T</m:ci>
			</m:apply>
		      </m:apply>
		      <m:apply>
			<m:cos/>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>l</m:ci>
			    <m:ci>t</m:ci>
			  </m:apply>
			  <m:ci>T</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

      The first and third terms are zero; in the second, the only
      non-zero term in the sum results when the indices
      <m:math>
	<m:ci>k</m:ci>
      </m:math>
      and
      <m:math>
	<m:ci>l</m:ci>
      </m:math>
      are equal (but not zero), in which case we obtain   
      <m:math>
	<m:apply>
	  <m:divide/>
	  <m:apply>
	    <m:times/>
	    <m:ci><m:msub>
		<m:mi>a</m:mi>
		<m:mi>l</m:mi>
	      </m:msub></m:ci>
	    <m:ci>T</m:ci>
	  </m:apply>
	  <m:cn>2</m:cn>
	</m:apply>
      </m:math>. 
      If 
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>k</m:ci>
	  <m:cn>0</m:cn>
	  <m:ci>l</m:ci>
	</m:apply>
      </m:math>, 
      we obtain 
      <m:math>
	<m:apply>
	  <m:times/>
	  <m:ci><m:msub>
	      <m:mi>a</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	  <m:ci>T</m:ci>
	</m:apply>
      </m:math>.
      Consequently, 
      
      <m:math display="block">
	<m:apply>
	  <m:forall/>
	  <m:bvar><m:ci>l</m:ci></m:bvar>
	  <m:condition>
	    <m:apply>
	      <m:neq/>
	      <m:ci>l</m:ci>
	      <m:mn>0</m:mn>
	    </m:apply>
	  </m:condition>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub>
		<m:mi>a</m:mi>
		<m:mi>l</m:mi>
	      </m:msub>
	    </m:ci> 
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>2</m:cn>
		<m:ci>T</m:ci>
	      </m:apply>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit><m:ci>T</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">s</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:cos/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>l</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      
      All of the Fourier coefficients can be found similarly.

      <equation id="coefficients">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub>
		<m:mi>a</m:mi>
		<m:mn>0</m:mn>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:ci>T</m:ci>
	      </m:apply>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit><m:ci>T</m:ci></m:uplimit>
		<m:apply>
		  <m:ci type="fn">s</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

	<m:math display="block">
	  <m:apply>
	    <m:forall/>
	  <m:bvar><m:ci>k</m:ci></m:bvar>
	    <m:condition>
	      <m:apply>
		<m:neq/>
		<m:ci>k</m:ci>
		<m:mn>0</m:mn>
	      </m:apply>
	    </m:condition>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>a</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci> 
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>2</m:cn>
		  <m:ci>T</m:ci>
		</m:apply>
		<m:apply>
		  <m:int/>
		  <m:bvar><m:ci>t</m:ci></m:bvar>
		  <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		  <m:uplimit><m:ci>T</m:ci></m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn">s</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:cos/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:ci>k</m:ci>
			  <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub>
		<m:mi>b</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci> 
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>2</m:cn>
		<m:ci>T</m:ci>
	      </m:apply>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit><m:ci>T</m:ci></m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">s</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
    </para>

    <exercise id="exer1">
      <problem>
	<para id="probpara1">
	  The expression for 	  
	  <m:math>
	    <m:ci><m:msub>
		<m:mi>a</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	  </m:math>
	  is referred to as the <emphasis>average value</emphasis> of 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">s</m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	  </m:math>. 
	  Why?
	</para>
      </problem>
      <solution>
	<para id="solpara1">
	  The average of a set of numbers is the sum divided by the
	  number of terms.  Viewing signal integration as the limit of
	  a Riemann sum, the integral corresponds to the average.
	</para>
      </solution>
    </exercise>


    <example id="squarewave">
      <para id="sqwaveex1">
	Finding the Fourier series coefficients for the square wave is
	very simple.
	<m:math>
	  <m:apply><m:ci type="fn">
	      <m:msub><m:mi>sq</m:mi><m:mi>T</m:mi></m:msub></m:ci>
	    <m:ci>t</m:ci>
	  </m:apply>
	</m:math>.
	Mathematically, this signal can be expressed as

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:ci type="fn">
		<m:msub><m:mi>sq</m:mi><m:mi>T</m:mi></m:msub></m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	    <m:piecewise>
	      <m:piece>
		<m:cn>1</m:cn>
		<m:apply><m:leq/>
		  <m:cn>0</m:cn>
		  <m:apply><m:lt/>
		    <m:ci>t</m:ci>
		    <m:apply><m:divide/><m:ci>T</m:ci><m:cn>2</m:cn></m:apply>
		  </m:apply>
		</m:apply>
	      </m:piece>
	      <m:piece>
		<m:apply><m:minus/><m:cn>1</m:cn></m:apply>
		<m:apply><m:leq/>
		  <m:apply><m:divide/><m:ci>T</m:ci><m:cn>2</m:cn></m:apply>
		  <m:apply><m:lt/>
		    <m:ci>t</m:ci>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:piece>
	    </m:piecewise>
	  </m:apply>
	</m:math>

	The expressions for the Fourier coefficients have the common form
	
	<equation id="fouriercoefficients">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:vector>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
		<m:ci>
		  <m:msub>
		    <m:mi>b</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
	      </m:vector>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>2</m:cn>
		    <m:ci>T</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:int/>
		    <m:bvar><m:ci>t</m:ci></m:bvar>
		    <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		    <m:uplimit>
		      <m:apply>
			<m:divide/>
			<m:ci>T</m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:uplimit>
		    <m:vector>
		      <m:apply><m:cos/>
                       <m:apply><m:divide/>
			<m:apply><m:times/>
			  <m:cn>2</m:cn> <m:pi/> <m:ci>k</m:ci> <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		       </m:apply>
                      </m:apply>
		      <m:apply><m:sin/>
                       <m:apply><m:divide/>
			<m:apply><m:times/>
			  <m:cn>2</m:cn> <m:pi/> <m:ci>k</m:ci> <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		       </m:apply>
                     </m:apply>
		    </m:vector>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>2</m:cn>
		    <m:ci>T</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:int/>
		    <m:bvar><m:ci>t</m:ci></m:bvar>
		    <m:lowlimit>
		      <m:apply>
			<m:divide/>
			<m:ci>T</m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:lowlimit>
		    <m:uplimit><m:ci>T</m:ci></m:uplimit>
		    <m:vector>
		      <m:apply><m:cos/>
                       <m:apply><m:divide/>
			<m:apply><m:times/>
			  <m:cn>2</m:cn> <m:pi/> <m:ci>k</m:ci> <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		       </m:apply>
                      </m:apply>
		      <m:apply><m:sin/>
                       <m:apply><m:divide/>
			<m:apply><m:times/>
			  <m:cn>2</m:cn> <m:pi/> <m:ci>k</m:ci> <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
                     </m:apply>
		    </m:vector>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	The cosine coefficients
	<m:math>
	  <m:ci>
	    <m:msub>
	      <m:mi>a</m:mi>
	      <m:mi>k</m:mi>
	    </m:msub>
	  </m:ci>
	</m:math>
	are all zero, and the sine coefficients are

	<equation id="sinecoefficients">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>b</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:piecewise>
		<m:piece>
		  <m:apply>
		    <m:divide/>
		    <m:cn>4</m:cn>
		    <m:apply>
		      <m:times/>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:mtext>k is odd</m:mtext>
		</m:piece>
		<m:piece>
		  <m:cn>0</m:cn>
		  <m:mtext>k is even</m:mtext>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
	</equation>

	Thus, the Fourier series for the square wave is

	<equation id="fourierseriessquarewave">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">sq</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:condition>
		  <m:apply>
		    <m:in/>
		    <m:ci>k</m:ci>
		    <m:set>
		      <m:cn>1</m:cn>
		      <m:cn>3</m:cn>
		      <m:ci>…</m:ci>
		    </m:set>
		  </m:apply>
		</m:condition>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>4</m:cn>
		    <m:apply>
		      <m:times/>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	Consequently, the square wave equals a sum of sinusoids, but
	only those having frequencies equal to odd multiples of the
	fundamental frequency
	<m:math>
	  <m:apply>
	    <m:divide/>
	    <m:cn>1</m:cn>
	    <m:ci>T</m:ci>
	  </m:apply>
	</m:math>.  The coefficients decay slowly as the frequency
	index <m:math><m:ci>k</m:ci></m:math> increases.  This index
	corresponds to the <m:math><m:ci>k</m:ci></m:math>-th harmonic
	of the signal's period.
      </para>
    </example>


    <example id="ex1">
      <para id="para1warp">
	Let's find the Fourier series representation for the half-wave
	rectified sinusoid.

	<equation id="eqn1">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply> 
		<m:ci type="fn">s</m:ci> 
		<m:ci>t</m:ci>
	      </m:apply>
	      <m:piecewise>
		<m:piece>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>t</m:ci> 
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:leq/>
		    <m:cn>0</m:cn>
		    <m:apply>
		      <m:lt/>
		      <m:ci>t</m:ci>
		      <m:apply>
			<m:divide/>
			<m:ci>T</m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:piece>
		<m:piece>
		  <m:cn>0</m:cn>
		  <m:apply>
		    <m:leq/>
		    <m:apply>
		      <m:divide/>
		      <m:ci>T</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:lt/>
		      <m:ci>t</m:ci>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
	</equation>
	
	Begin with the sine terms in the series; to find 
	<m:math>
	  <m:ci>
	    <m:msub> 
	      <m:mi>b</m:mi> 
	      <m:mi>k</m:mi> 
	    </m:msub>
	  </m:ci>
	</m:math>
	we must calculate the integral

	<equation id="eqn2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>b</m:mi>
		  <m:mi>k</m:mi>
		</m:msub> 
	      </m:ci>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>2</m:cn>
		  <m:ci>T</m:ci>
		</m:apply>
		<m:apply>
		  <m:int/>
		  <m:bvar><m:ci>t</m:ci></m:bvar>
		  <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:ci>T</m:ci>
		      <m:cn>2</m:cn>     
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:sin/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:sin/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:cn>k</m:cn>
			  <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	Using our trigonometric identities turns our integral of a product of
	sinusoids into a sum of integrals of individual sinusoids,
	which are much easier to evaluate.

	<equation id="solvingeqn2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:divide/>
		    <m:ci>T</m:ci>    
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:cn>k</m:cn>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:int/>
		  <m:bvar><m:ci>t</m:ci></m:bvar>
		  <m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:ci>T</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:cos/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:apply>
			    <m:minus/>
			    <m:ci>k</m:ci>
			    <m:cn>1</m:cn>
			  </m:apply>
			  <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:cos/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:apply><m:plus/>
			    <m:ci>k</m:ci>
			    <m:cn>1</m:cn>
			  </m:apply>
			  <m:ci>t</m:ci>
			</m:apply>
			<m:ci>T</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:piecewise>
		<m:piece>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:cn>2</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:eq/>
		    <m:ci>k</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:piece>
		<m:otherwise><m:cn>0</m:cn></m:otherwise>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
	</equation>

	Thus,
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>b</m:mi>
		  <m:mn>1</m:mn>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:cn>2</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci><m:msub>
		  <m:mi>b</m:mi>
		  <m:mn>2</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>b</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	      <m:ci>…</m:ci>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:math>
      </para>
      
      <para id="para2">
	On to the cosine terms. The average value, which corresponds
	to
	<m:math>
	  <m:ci><m:msub>
	      <m:mi>a</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:math>, 
	equals
	<m:math>
	  <m:apply>
	    <m:divide/>
	    <m:cn>1</m:cn>
	    <m:pi/>
	  </m:apply>
	</m:math>.	
	The remainder of the cosine coefficients are easy to find, but
	yield the complicated result

	<equation id="result">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>a</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:piecewise>
		<m:piece>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:apply>
			<m:divide/>
			<m:cn>2</m:cn>
			<m:pi/>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:divide/>
		      <m:cn>1</m:cn>
		      <m:apply>
			<m:minus/>
			<m:apply>
			  <m:power/>
			  <m:ci>k</m:ci>
			  <m:cn>2</m:cn>
			</m:apply>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:in/>
		    <m:ci>k</m:ci>
		    <m:set>
		      <m:cn>2</m:cn>
		      <m:cn>4</m:cn>
		      <m:ci>…</m:ci>
		    </m:set>
		  </m:apply>
		</m:piece>
		<m:piece>
		  <m:cn>0</m:cn>
		  <m:mtext>k is odd</m:mtext>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
	</equation>
      </para>

      <para id="para3">
	Thus, the Fourier series for the half-wave rectified sinusoid
	has non-zero terms for the average, the fundamental, and the
	even harmonics.
     </para>
    </example>

  </content>
</document>
