# 11: Vibrations in Strings¶

## Example number 1, Page number 371¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
#given Y=10sinmath.pi(0.01x-2t)
#by comparing with Y=Asin(kx-omegat) we get
A=10;     #amplitude(cm)
omega=2*math.pi;
k=0.01*math.pi;      #wavelength constant

#Calculation
f=omega/(2*math.pi);        #frequency(Hz)
lamda=2*math.pi/k;          #wavelength(cm)

#Result
print "amplitude is",A,"cm"
print "frequency is",int(f),"Hz"
print "wavelength is",lamda,"cm"

amplitude is 10 cm
frequency is 1 Hz
wavelength is 200.0 cm


## Example number 2, Page number 371¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
f=550;       #frequency(Hz)
A=0.01;      #amplitude(cm)
v=330;       #wave velocity(m/sec)

#Calculation
omega=2*math.pi*f;     #angular frequency
k=omega/v;             #wavelength constant
#along negative axis displacement y=Asin(kx+omegat) substitute the values

#Result
print "along negative axis displacement y=",A,"sin(",int(k*3/math.pi),"*math.pi/3 x +",int(omega/math.pi),"t)"

along negative axis displacement y= 0.01 sin( 10 *math.pi/3 x + 1100 t)


## Example number 3, Page number 371¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
l=2;          #length(m)
m=0.6;       #mass(kg)
T=500;        #tension(N)

#Calculation
mew=m/l;      #linear density(kg/m)
v=math.sqrt(T/mew);       #wave velocity(m/s)

#Result
print "wave velocity is",round(v,2),"m/s"

wave velocity is 40.82 m/s


## Example number 4, Page number 372¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
x=10;       #stationary wave point
t=1;        #assume
y1=5*math.sin(((2*math.pi*t)-(2*x))*math.pi/180);          #transverse wave
y2=5*math.sin(((2*math.pi*t)+(2*x))*math.pi/180);          #transverse wave

#Calculation
y=y1+y2;        #amplitude(units)

#Result
print "amplitude is",round(y,3),"units"
print "answer given in the book is wrong"

amplitude is 1.028 units
answer given in the book is wrong


## Example number 5, Page number 372¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
l=1;                  #length(m)
rho=7930;             #density(kg/m**3)
T=10**4;              #tension(N)

#Calculation
mew=math.pi*r**2*rho/l;       #string linear density(kg/m)
v=math.sqrt(T/mew);           #wave velocity(m/s)
f1=v/(2*l);                   #fundamental frequency(Hz)
f2=2*f1;                      #frequency of 1st overtone(Hz)
f3=3*f1;                      #frequency of 2nd overtone(Hz)
lamda1=2*l/1;                 #fundamental wavelength(m)
lamda2=2*l/2;                 #1st overtone wavelength(m)
lamda3=2*l/3;                 #2nd overtone wavelength(m)

#Result
print "string linear density is",round(mew,4),"kg/m"
print "wave velocity is",round(v,2),"m/s"
print "fundamental frequency is",round(f1,2),"Hz"
print "frequency of 1st overtone is",round(f2,2),"Hz"
print "frequency of 2nd overtone is",round(f3,2),"Hz"
print "fundamental wavelength is",int(lamda1),"m"
print "1st overtone wavelength is",int(lamda2),"m"
print "2nd overtone wavelength is",round(lamda3,3),"m"
print "answers in the book varies due to rounding off errors"

string linear density is 0.0249 kg/m
wave velocity is 633.56 m/s
fundamental frequency is 316.78 Hz
frequency of 1st overtone is 633.56 Hz
frequency of 2nd overtone is 950.34 Hz
fundamental wavelength is 2 m
1st overtone wavelength is 1 m
2nd overtone wavelength is 0.667 m
answers in the book varies due to rounding off errors


## Example number 6, Page number 373¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
mew=0.1;      #string linear density(kg/m)
A=0.1;        #amplitude(m)
f=10;         #frequency(Hz)
T=10;        #tension(N)

#Calculation
v=math.sqrt(T/mew);       #wave velocity(m/s)
P=2*math.pi**2*f**2*A**2*v*mew;      #power(watt)

#Result
print "power is",round(P,2),"watts"

power is 19.74 watts


## Example number 7, Page number 373¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
f=500;         #frequency(Hz)
T=500;         #tension(N)
f1=512;        #required frequency(Hz)

#Calculation
T1=T*f1**2/f**2;       #tension in string(N)

#Result
print "tension in string is",round(T1,2),"N"

tension in string is 524.29 N


## Example number 8, Page number 374¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
#given Y=8sin(math.pi*x/30)cos(48*math.pi*t)
#by comparing with Y=2Asin(kx)cos(omegat) we get
A=8/2;     #amplitude(cm)
omega=48*math.pi;
x=5;       #stationary wave point
k=math.pi/30;      #wavelength constant
y1=0;
y2=math.pi;
y3=2*math.pi;

#Calculation
y=2*A*math.sin(math.pi*x/30);      #amplitude at x=5
x1=y1*30/math.pi;                  #first node position(m)
x2=y2*30/math.pi;                  #second node position(m)
x3=y3*30/math.pi;                  #third node position(m)
lamda=2*(x3-x2);                   #wavelength(m)

#Result
print "amplitude at x=5 is",y
print "first node position is",x1,"m"
print "second node position is",x2,"m"
print "third node position is",x3,"m"
print "wavelength is",lamda,"m"
print "component transverse wave equations are y1=",A,"sin math.pi((x/30)-(48*t))"

amplitude at x=5 is 4.0
first node position is 0.0 m
second node position is 30.0 m
third node position is 60.0 m
wavelength is 60.0 m
component transverse wave equations are y1= 4.0 sin math.pi((x/30)-(48*t))