Waveform Homework
Preliminaries
Basic information
This document is a Sage Worksheet. It uses the Sage mathematical language to execute code to do a variety of mathematical tasks. Each section of the worksheet is called a "cell". Each cell starts with a light gray bar and some input. For example, this cell's input starts with a command "%md" that tells Sage to treat this cell as a "markdown" cell, meaning that you can type and format text in cells like this. The output of the cell—marked with a green bar along the left margin—will be the result of "evaluating" the cell. For a markdown cell, the output will be nicely formatted text. (Markdown is like a simpler version of HTML. Notice for example the dashes in the previous line; they are nicely formatted in the output, but use cryptic HTML codes in the input.) For a Sage cell, the output will be the result of a calculation or a plot.
You can show/hide the input/output by clicking the arrows in the left margin next to the line numbers.
The next cell is a Sage cell. Put your cursor somewhere in there with the "2+2" and hit Shift-Enter to evaluate the cell.
For a Sage cell (unlike a markdown cell) the input is preceeded by a light gray bar with a section that turns blue once the cell is evaluated. The output is just the answer to the calculation. Try evaluating the next cell:
Homework questions
Answer the questions below by filling in the cells you are instructed to complete. (Some of those cells will involve Sage code and other will involve typing full sentence responses.) Your document will be auto-saved as you go along, but if you want to be safe, hit the green "Save" button in the toolbar before you close the document. There is nothing to submit; when the due date arrives, CoCalc will automatically "collect" this file and send it back to me for grading."
Question 1
Recall that a square wave is a sum of sine waves with odd freqencies and amplitudes that are the reciprocals of those frequencies. Plot a sum of sine waves with all whole number frequencies (up to 7 Hz) with amplitudes that are the reciprocals of those frequencies. (You don't need to make the plot as fancy as it was in the earlier worksheet. For example, you don't need to plot all the component sine waves in the same plot. Just plot the sum.)
Question 2
We've seen this waveform before. What did we call it?
Type your answer here (in between the double asterisks).
Question 3
Here's one period of an idealized version of the waveform you approximated in the question above:
In other words, this is only one piece of a periodic function that looks like this:
Below is the code to run a Fourier analysis on the above waveform. Be sure to evaluate all the cells below exactly once. If, for some reason, you need to evaluate the cells again, be sure to start with the first cell below and evaluate all of them in order.
Ignoring the small little bar above zero, explain the pattern of bars you see above. In other words, explain the frequencies and amplitudes. Are these what you expected to see?
Type your answer here (in between the double asterisks).
Question 4
Plot the sum of two sine waves, one with a frequency of 50 Hz and the other with a frequency of 54 Hz.
Question 5
If we listened to this tone, what fundamental frequency would we hear?
Type your answer here (in between the double asterisks).
Question 6
If we listened to this tone, what beat frequency would we hear?
Type your answer here (in between the double asterisks).