Sounds

We need to load a special package to play sounds in Mathematica:

<<"Audio`"

The frequency of vibration of a vibrating string  (meaning how many times the string goes up and down in a certain time interval) is given by the equation:

f[L_,T_,ρ_]=(1/(2L))(Sqrt[(T/ρ)])

where the quantities are
L: Length of string,
T: tension of the string,
ρ: linear density of string.

We can visualize the string vibrating with the following mathematical model (I have picked some parameters to get our sketch). The string is pinned down at both ends. Don't worry--you don't have to know where this came from, but you should believe that it represents the motion of a vibrating string.

y[x_,t_,n_]:=Sin[((n π)/L)x]Cos[2π f[L,T,ρ]t]/.L->1/.T->1/.ρ->1

The n gives you the harmonics of the vibration. Here is a plot of two strings, one vibrating (moving up and down) at the fundamental frequency (n=1), and the other vibrating at the second overtone (n=3).

Manipulate[Plot[{y[x,t,1],y[x,t,3]},{x,0,1},PlotRange->{{0,1},{-1.2,1.2}},ImageSize->{500,Automatic},PlotStyle->{Red,Blue}],{t,0,2,0.1}]

A skillful person can make a skipping rope exhibit these harmonics. Try it, it's fun!

The pitch of a note (how high or low the note sounds) is determined by the frequency. The higher the frequency, the higher the pitch.

Let's investigate the frequency by taking derivatives, and interpreting what these dereivatives mean in terms of pitch.

Decreasing the Length of the String

If we decrease the length of the string, by putting our finger on the fret, the pitch of the note will change. You might already know that the pitch will go up, meaning the frequency of vibration of the string will get higher. We can see this mathematically by taking a derivative. We take the derivative with respect to L since what we are interested in is the rate of change of the frequemcy with respect to the length of the string. All other quantities are held fixed when we take the derivative. Notice the prime notation for derivative would be very confusing here!

(d/(d L))[f] = (d/(d L))[(1/(2 L))(Sqrt[(T/ρ)])] 
 =(1/2) (Sqrt[(T/ρ)])(d/(d L))[(1/( L))] 
 =(1/2) (Sqrt[(T/ρ)])(d/(d L))[(L^(-1))] 
 =(1/2) (Sqrt[(T/ρ)])((-1)(L^(-1-1))) 
 =-(1/2) (Sqrt[(T/ρ)])(L^(-2)) 
 =-(1/(2(L^2))) (Sqrt[(T/ρ)])

Let's verify this using Mathematica to take the derivative.

D[f[L,T,ρ],L]

Which is what we got by hand.

OK, now let's think about what this is telling us. Since the rate of change of frequency with respect to the length of the string is less than zero, that means that when we increase the length of the string we decrease the frequency.

Since we are holding T and ρ fixed a constant value during all this, let's look at a plot of the frequency as a function of length of the string for particular values of T and ρ:

Plot[f[L,40,50],{L,0,0.0002},PlotRange->{{0,0.0002},{0,20000}},ImageSize->{500,Automatic},AxesLabel->{"Length","frequency"}]

The graph clearly shows us that increasing the length of the string decreases the frequency. The nice thing about our calculation above involving derivatives is that we knew this without plotting the graph, and we couldn't plot the graph unless we picked specific values for T and ρ.

Here is an example, using Mathematica to play a musical note. When we increase the length of string, we should hear a decrease in the pitch of the sound since the frequency will have decreased.

Show[Waveform[Sinusoid, f[0.001,40,50], 0.5]]

Show[Waveform[Sinusoid, f[2*0.001,40,50], 0.5]]

How cool is that! The plot represents the vibrating string, in some sense.

Increasing the Tension on the String

If we increase the tension on the string, by tightening the string, the pitch of the note will change. You might already know that the pitch will go up, meaning the frequency of vibration of the string will get higher. We can see this mathematically by taking a derivative. We take the derivative with respect to T since what we are interested in is the rate of change of the frequemcy with respect to the tension on the string. All other quantities are held fixed when we take the derivative.

(d/(d T))[f] = (d/(d T))[(1/(2 L))(Sqrt[(T/ρ)])] 
 =(1/(2L))(1/(Sqrt[ρ]))(d/(d T))[(Sqrt[T])] 
 =(1/(2L)) (1/(Sqrt[ρ]))(d/(d L))[(T^(1/2))] 
 =(1/(2L)) (1/(Sqrt[ρ]))(((1/2))(T^(1/2-1))) 
 =(1/(4L))(1/(Sqrt[ρ]))(T^(-1/2)) 
 =(1/(4L)) (1/(Sqrt[ρ]))  (1/(Sqrt[T]))
=(1/(4L))(1/(Sqrt[ρ T]))

Let's verify this using Mathematica to take the derivative.

D[f[L,T,ρ],T]

Which is what we got by hand.

OK, now let's think about what this is telling us. Since the rate of change of frequency with respect to the tension on the string is greater than zero, that means that when we increase the length of the string we increase the frequency.

Since we are holding L and ρ fixed a constant value during all this, let's look at a plot of the frequency as a function of tension on the string for particular values of L and ρ:

Plot[f[0.0002,T,50],{T,0,40},PlotRange->{{0,40},{0,2500}},ImageSize->{500,Automatic},AxesLabel->{"Tension","frequency"}]

The graph clearly shows us that increasing the tension on the string increases the frequency.

Here is an example, using Mathematica to play a musical note. When we increase the tension on the string, we should hear an increase in the pitch of the sound since the frequency will have increased.

Show[Waveform[Sinusoid, f[0.001,40,50], 0.5]]

Show[Waveform[Sinusoid, f[0.001,2*40,50], 0.5]]

Alright! We understand what's going on! We Rock!

Increasing the Linear Density of the String (switch to another string)

If we switch to a string with higher density ρ, the pitch of the note will change. You might already know that the pitch will go down, meaning the frequency of vibration of the string will get lower. We can see this mathematically by taking a derivative. We take the derivative with respect to ρ since what we are interested in is the rate of change of the frequemcy with respect to the density of the string. All other quantities are held fixed when we take the derivative.

(d/(d ρ))[f] = (d/(d ρ))[(1/(2 L))(Sqrt[(T/ρ)])] 
 =(1/(2 L))(Sqrt[T])(d/(d T))[(ρ^(-1/2))] 
 =(1/(2 L))(Sqrt[T])(-(1/2))(ρ^(-1/2-1))
 =-(1/(4 L))(Sqrt[T])(ρ^(-3/2))
=-(1/(4 L))((Sqrt[T])/(ρ^(3/2)))

Let's verify this using Mathematica to take the derivative.

D[f[L,T,ρ],ρ]

Which is what we got by hand.

OK, now let's think about what this is telling us. Since the rate of change of frequency with respect to the density of the string is less than zero, that means that when we increase the density of the string we decrease the frequency.

Since we are holding T and L fixed at a constant value during all this, let's look at a plot of the frequency as a function of tension on the string for particular values of T and L:

Plot[f[0.0002,40,ρ],{ρ,0,50},PlotRange->{{0,50},{0,15000}},ImageSize->{500,Automatic},AxesLabel->{"Density of String","frequency"}]

The graph clearly shows us that increasing the density of the string decreases the frequency.

Here is an example, using Mathematica to play a musical note. When we increase the density of the string, we should hear a decrease in the pitch of the sound since the frequency will have decreased.

Show[Waveform[Sinusoid, f[0.001,40,50], 0.5]]

Show[Waveform[Sinusoid, f[0.001,40,2*50], 0.5]]

References and Further Resources

Here are some internet links (click on them--they are active) that describe vibrating strings in more detail:

http://www.bsharp.org/physics/stuff/guitar.html

http://www.kettering.edu/~drussell/Demos/string/Fixed.html

If you enjoyed this topic, you might want to take UMM's Physics of Sound and Music course.