Exercise: Sawtooth Redone With Exponential Basis Functions: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
(Intermediate progress)
No edit summary
Line 104: Line 104:
<br />
<br />
==Solution Graphs==
==Solution Graphs==
I modified the Matlab code used in the [[Exercise: Sawtooth Wave Fourier Transform]] to generate the solution graphs using the equation found above instead of the previously found solution. This code can be found here: [[Sawtooth2 Matlab Code]]. It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method.
I modified the Matlab code used in the [[Exercise: Sawtooth Wave Fourier Transform]] to generate the solution graphs using the equation found above instead of the previously found solution. This code can be found here: [[Sawtooth2 Matlab Code]]. It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method. Note that the "terms" mentioned in the titles of the graphs should now be interpreted as the sum of the nth and -nth terms.
<br />
<br />


Line 116: Line 116:


<br />
<br />

==Analytical Comparison of Two Solutions==
To convince myself that the two solutions are actually the same, I performed the following analysis. Let <math>t_n</math> be the nth term of the solution found on this page. Then for <math>n\neq 0</math>,

<br />
<center>

<math>t_n+t_{-n}=\frac{1}{-j2\pi n}e^{j2\pi nt}+\frac{1}{-j2\pi (-n)}e^{j2\pi (-n)t}</math>

<br />

<math>=\frac{1}{-j2\pi n} (\cos 2\pi nt+j\sin 2\pi nt)-\frac{1}{-j2\i n}\left(\cos(-2\pi nt)+j\sin(-2\pi nt)\right)</math>

<br />

<math>=\frac{1}{-j2\pi n}\left(\cos 2\pi nt+j\sin 2\pi nt-\cos 2\pi nt+j\sin 2\pi nt \right)</math>

<br />

<math>=\frac{1}{-j2\pi n}\left(2j\sin 2\pi nt\right)</math>

<br />

<math>=-\frac{1}{\pi n}\sin 2\pi nt</math>

</center>

Revision as of 18:01, 19 January 2010

Author

John Hawkins

Problem Statement

Find the Fourier Tranform with exponential basis functions of the sawtooth wave given by the equation



Note that this is the same function solved in Exercise: Sawtooth Wave Fourier Transform, but solved differently to compare the two methods.

Solution

The goal of this method is to find the coefficients such that



In class we showed not only that this was possible, but also that



Noting again that our period for this function is and that an obvious choice for is zero, we proceed:



Again, the case when needs to be considered separately. In this case,



For , the above integral is solved easiest using integration by parts. So letting



we have




But



So



Therefore,



Solution Graphs

I modified the Matlab code used in the Exercise: Sawtooth Wave Fourier Transform to generate the solution graphs using the equation found above instead of the previously found solution. This code can be found here: Sawtooth2 Matlab Code. It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method. Note that the "terms" mentioned in the titles of the graphs should now be interpreted as the sum of the nth and -nth terms.

Sawtooth2 First 100 Terms.jpg


Sawtooth2 First n Terms.jpg


Sawtooth2 Error.jpg


Analytical Comparison of Two Solutions

To convince myself that the two solutions are actually the same, I performed the following analysis. Let be the nth term of the solution found on this page. Then for ,



Failed to parse (unknown function "\i"): {\displaystyle =\frac{1}{-j2\pi n} (\cos 2\pi nt+j\sin 2\pi nt)-\frac{1}{-j2\i n}\left(\cos(-2\pi nt)+j\sin(-2\pi nt)\right)}