<?xml version="1.0" encoding="utf-8"?>
<!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="m0061"> 

  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fourier Series Example</name>

  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.10</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2000/08/10</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2007/07/27 15:24:13.566 GMT-5</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="rainking">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Doug</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Daniels</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">ddaniels888@gmail.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">coefficients</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">example</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fourier</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Series</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">This module provides an example of the Fourier Series representation of a half-wave rectified sinusoid.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">

    <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="ex1">
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1">
	Let's find the Fourier series representation for the half-wave
	rectified sinusoid.
	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" 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 xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" 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: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 key to evaluating such integrals is the classic
	trigonometric identities.

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn3">
	  <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>
	
	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn4">
	  <m:math>
	    <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>
	</equation>
	
	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn5">
	  <m:math>
	    <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>
	</equation>

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

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="solvingeqn2"><m:math>
	    <m:apply>
	      <m:eq/>
		<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: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: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: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:piece>
		  <m:cn>0</m:cn>
		  <m:set>
		    <m:bvar><m:ci>k</m:ci></m:bvar>
		    <m:condition>
		      <m:apply><m:and/>
			<m:apply><m:geq/>
			  <m:ci>k</m:ci>
			  <m:cn>2</m:cn>
			</m:apply>
			<m:apply><m:in/>
			  <m:ci>k</m:ci>
			  <m:naturalnumbers/>
			</m:apply>
		      </m:apply>
		    </m:condition>
		  </m:set>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
	</equation>

	Thus,

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="pluginforb1">
	  <m:math>
	    <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>
	</equation>


	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="pluginforb2">
	  <m:math>
	    <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>
	</equation>
	</para>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" 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 xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" 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 xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" 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. Plotting the Fourier coefficients reveals at
	what component frequencies the half-wave rectified sinusoid
	has energy ( <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fourierfig" strength="9"/> ).
	Furthermore, this figure shows what the Fourier series sum
	looks like with these coefficients as we add more and more
	terms. Presumably, you now believe more in the Fourier series.
      </para>

      <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fourierfig" orient="vertical">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fourier Series Spectrum of a Half-Wave Rectified Sine Wave</name>
	<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="subfig1">
	  <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="spectrum2.png"/>
	</subfigure>
	<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="subfig2">
	  <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="fourier1.png"/>
	</subfigure>
	<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The Fourier series spectrum of a half-wave rectified
	  sinusoid is shown in the upper portion. The index indicates
	  the multiple of the fundamental frequency at which the
	  signal has energy.  The cumulative effect of adding terms to
	  the Fourier series for the half-wave rectified sine wave is
	  shown in the bottom portion.  The dashed line is the actual
	  signal, with the solid line showing the finite series
	  approximation to the indicated number of terms
	  <m:math>
	    <m:ci>k</m:ci>
	  </m:math>
	</caption>
      </figure>
    </example>

  </content>
</document>
