Assignment 7 -- Solutions

14.  Calculations for exercise 14 on page 145:  We set  up a vector (matrix) for the response intensities using a List command and normalize them to the reference Intensity (Subscript[I, ref]).  Then we generate the the response R in decibels.  Finally we plot the results with the ListPlot command.  The horizontal axis gives the  number of the harmonic assuming the fundamental is 100 Hz.

resonator=List[1*10^-4,4*10^-4,8*10^-4,2*10^-3,3*10^-4,2*10^-3,9*10^-4,5*10^-4,2*10^-4,1*10^-4]
normr=1./10^-6
normres=normr resonator
R=10 Log10[normres]
ListPlot[%,PlotRange->{10.,40.}]

15.  Here we borrow the code used to simulate a string plucked at the midpoint and also one plucked at a point one quarter of the way from a fixed end.  For plucking at the midpoint we use α = 2 and for the 1/4 L case we use α = 4. I do the midpoint case first and include all the animation code as well so you can see what the string is doing.  The Table command below creates the list of relative amplitudes which fall off exactly as 1/(n^2)  for the midpoint case, but not for the other case.  The book calls these relative amplitudes, relative intensities.  Note that for the midpoint case the even harmonics are very small numbers or essentially zeroes.  For the 1/4L pluck, the 4th and 8th harmonics are missing.  I have set the velocity equal to 100 m/s to guarantee that the fundamental frequency is 100 Hz, but we don’t really need that  information for this exercise other than to know that it is true.  After calculating the relative amplitudes, I convert them to db so that I can see the effect of the resonator from exercise 14 by just adding the two results together.  String plus resonator are the last plots for each case.  If you compare the string plus resonator db plots for the two cases, you will see that the odd harmonics are exactly the same for the two cases!  However, the situation is very different with respect to the even harmonics.  There are no even harmonics for the midpoint pluck, and the 4th and 8th harmonics are missing for the 1/4L case.  A final comment is please don’t try to run both animations at the same time.  The value of alpha will be set to the last cell evaluated which means that you can easily be misled since both animations will always show the same result since alpha can only have one value at a time.

t=.;
α=2.;
L=0.5;
v=100.;
relint=Table[Abs[4α^2 Sin[n Pi/α]/(α-1)/(2Pi^2 n^2)],{n,1,10}]
norm= 1/Extract[relint,{1}]
norm  relint
ListPlot[%,PlotRange-> {0.,1.1}]
db=10Log10[norm relint]
ListPlot[%,PlotRange->{-30.,0.1}]
stringplusresonator=db+R
ListPlot[%,PlotRange->{0.,30.}]
Animate[Plot[Sum[2 α^2 Sin[n Pi/α]/(α-1)/(2Pi^2 n^2) (Sin[n Pi/L(x-v t)]+Sin[n Pi/L(x+v t)]),{n,1,30}],{x,0,.5},PlotRange->{-1.0,1.0},PlotStyle->RGBColor[1,0,0]],{t,0,.01,.0001}]

t=.;
α=4.;
L=0.5;
v=100.;
relint=Table[Abs[4α^2 Sin[n Pi/α]/(α-1)/(2Pi^2 n^2)],{n,1,10}]
norm = 1/Extract[relint,{1}];
norm relint
ListPlot[%,PlotRange-> {0.,1.1}]
db=10Log10[norm relint]
ListPlot[%,PlotRange->{-30.,0.1}]
stringplusresonator=db+R
ListPlot[%,PlotRange->{0.,30.}]
Animate[Plot[Sum[2 α^2 Sin[n Pi/α]/(α-1)/(2Pi^2 n^2) (Sin[n Pi/L(x-v t)]+Sin[n Pi/L(x+v t)]),{n,1,30}],{x,0,.5},PlotRange->{-1.0,1.0},PlotStyle->RGBColor[1,0,0]],{t,0,.01,.0001}]