#importing modules
import math
from __future__ import division
#Variable declaration
l=1; #bar length(m)
R=0.01/2; #radius(m)
V=3560; #wave velocity(m/sec)
x=3.0112;
#Calculation
k=R/2; #geometric radius(m)
fL=V/(2*l); #fundamental frequency of longitudinal vibrations(Hz)
fT=math.pi*V*k*x**2/(8*(l**2)); #fundamental frequency of transverse vibrations(Hz)
#Result
print "fundamental frequency of longitudinal vibrations is",fL,"Hz"
print "fundamental frequency of transverse vibrations is",round(fT,3),"Hz"
print "answer in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
C=5050; #sound velocity(m/sec)
rho=7700; #steel density(kg/m**3)
#Calculation
Y=C**2*rho; #youngs modulus(N/m**2)
#Result
print "youngs modulus is",round(Y/10**11,2),"*10**11 N/m**2"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
l=1; #bar length(m)
R=0.004; #radius(m)
C=3560; #wave velocity(m/sec)
x=3.0112;
#Calculation
k=R/2; #geometric radius(m)
f1=math.pi*C*k*x**2/(8*(l**2)); #fundamental frequency of transverse mode of vibration(Hz)
f2=math.pi*C*k*5**2/(8*(l**2)); #first overtone of transverse mode of vibration(Hz)
#Result
print "fundamental frequency of transverse vibrations is",round(f1,2),"Hz"
print "first overtone of transverse vibrations is",round(f2,1),"Hz"
print "answer for first overtone in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
l=0.2; #bar length(m)
C=4990; #wave velocity(m/sec)
x=3.0112;
f1=250; #frequency(Hz)
#Calculation
a=f1*8*(l**2)*math.sqrt(12)/(math.pi*C*(x**2)); #value of a(m)
#Result
print "value of a is",round(a,5),"m"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
Y=21*10**10; #youngs modulus(N/m**2)
rho=8800; #nickel density(kg/m**3)
R=0.01; #radius(m)
#Calculation
k=R/2; #geometric radius(m)
C=math.sqrt(Y/rho); #sound velocity(m/sec)
f=C/(2*math.pi*k); #frequency(Hz)
#Result
print "frequency is",round(f/10**6,3),"MHz"