Chapter 14:Sound

Ex14.1:pg-623

In [1]:
  #Example 14_1
import math  
  #To find the speed of sound in neon
gama=1.66         #units in Constant
r=8314        #Units in J/Kmol
t=273         #Units in K
m=20.18    #Units in Kg/Kmol
v=math.sqrt((gama*r*t)/m)        #Units in meters/sec
print "The speed of the sound in neon is v=",round(v)," meters/sec"
The speed of the sound in neon is v= 432.0  meters/sec

Ex14.2:pg-625

In [2]:
  #Example 14_2
import math  
  #To find the sound level of a sound wave
i1=10**-5      #Units in W/meter**2
i2=10**-12       #Units in W/meter**2
level=10*math.log10(i1/i2)      #units in dB
print "The sound level of the sound wave is=",round(level)," dB"
The sound level of the sound wave is= 70.0  dB

Ex14.3:pg-625

In [5]:
  #Example 14_3
import math 
  #To find the intensity of sound
level=3.5   #Units in dB
i2=10**-12    #Units in W/meter**2
i=10**(level+math.log10(i2))     #Units in W/meter**2
print "The intensity of sound is I="
print i
print "W/meter**2"
The intensity of sound is I=
3.16227766017e-09
W/meter**2

Ex14.4:pg-626

In [6]:
  #Example 14_4
import math
  
  #To find how far it has to be moved before the sound becomes weak
lamda=70   #units in cm
lamda1=0.5*lamda     #Units in cm
print "The distance it has to be moved is=",round(lamda)," cm"
The distance it has to be moved is= 70.0  cm

Ex14.5:pg-627

In [1]:
  #Example 14_5
import math 
  
  #To find the frequency heard and the receding
f=500    #Units in Hz
vw=340.0       #Units in meters/sec
dist=20      #Units in meters/sec
f1=f*(vw/(vw-dist))    #Units in Hz
print "The frequency we hear is f=",round(f1)," Hz\n"
f1=f*(vw/(vw+dist))    #Units in Hz
print "The frequency of the receding is f=",round(f1)," Hz\n"
The frequency we hear is f= 531.0  Hz

The frequency of the receding is f= 472.0  Hz

Ex14.6:pg-628

In [2]:
  #Example 14_6
import math  
  #To find the difference between the frequency of wave reaching the officer and the car
fo=10**10       #Units in Hz
vw=3*10.0**8        #Units in meters/sec
vc=25     #Units in meters/sec
f1=fo*((vw+vc)/(vw-vc))         #Units in Hz
f1=f1-10**10         #Units in Hertz
print "The difference between the both frequencies is=",round(f1)," Hz"
  #In text book answer printed wrong as 1670 Hz correct answer is 1666 Hz
The difference between the both frequencies is= 1667.0  Hz