# 8: Damped and Forced Oscillations¶

## Example number 1, Page number 300¶

In [22]:
#importing modules
import math
from __future__ import division

#Variable declaration
k=10**4;     #Force constant(dyne/cm)
x=5;         #displacement(cm)
m=100;       #mass(gm)
R=100;       #resistance(dyne/cm)
At=1;      #amplitude(cm)
A0=5;      #amplitude(cm)

#Calculation
E=(1/2)*k*x**2;   #restoration energy(erg)
v=1/(2*math.pi)*math.sqrt(k/m)  #frequency(Hz)
b=R/(2*m);
t=math.log(A0/At)/b;      #time taken for reduction of amplitude(sec)

#Result
print "restoration energy is",int(E),"erg"
print "frequency is",int(v*math.pi),"/math.pi Hz"
print "time taken for reduction of amplitude is",round(t,2),"sec"

restoration energy is 125000 erg
frequency is 5 /math.pi Hz
time taken for reduction of amplitude is 3.22 sec


## Example number 2, Page number 301¶

In [25]:
#importing modules
import math
from __future__ import division

#Variable declaration
new=300;         #frequency(Hz)
EbyE0=1/10;      #ratio of energy
Q=5*10**4;       #Q factor

#Calculation
tbytow=math.log(1/EbyE0);
tow=Q/(2*math.pi*new);
t=tbytow*tow;      #time taken(sec)

#Result
print "time taken is",round(t,2),"sec"
print "answer in the book varies due to rounding off errors"

time taken is 61.08 sec
answer in the book varies due to rounding off errors


## Example number 3, Page number 301¶

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration
Q=2.2*10**3;       #Q value of sonometer wire
new=210;           #frequency(Hz)

#Calculation
tow=Q/(2*math.pi*new);     #torque(Nm)
t=4*tow;           #time taken(sec)

#Result
print "time taken is",int(t),"sec"
print "procedure followed in the book is wrong"

time taken is 6 sec
procedure followed in the book is wrong


## Example number 4, Page number 302¶

In [33]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=0.5;     #mass(kg)
g=9.8;     #acceleration due to gravity(m/sec**2)
x=0.05;    #displacement(m)

#Calculation
k=m*g/x;
omega0=math.sqrt(k/m);    #angular velocity
T=50*2*math.pi/omega0;       #time taken for 50 oscillations(sec)
b=math.log(4)/T;      #damping factor(N/m)
R=2*b*m;     #resistance(ohm)
Q=m*omega0/R;     #Q-factor

#Result
print "damping factor is",round(b,4),"N/m"
print "Q-factor is",round(Q,1)
print "answer given in the book is wrong"

damping factor is 0.0618 N/m
Q-factor is 113.3
answer given in the book is wrong


## Example number 5, Page number 302¶

In [38]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=1;     #mass(gm)
R=10;     #damping constant
E=50;     #energy(J)
E0=200;   #energy(J)
new=200;    #frequency(Hz)

#Calculation
b=R/(2*m);
t=math.log(E0/E)/(2*b);     #time taken(sec)
n=new*t;          #number of oscillations

#Result
print "number of oscillations is",round(n,2)
print "answer in the book varies due to rounding off errors"

number of oscillations is 27.73
answer in the book varies due to rounding off errors


## Example number 6, Page number 303¶

In [49]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=0.3;     #mass(kg)
new=2;    #frequency(Hz)
Q=60;     #Q-factor

#Calculation
omega=2*math.pi*new;   #angular velocity
R=m*omega/Q;       #mechanical resistance(m/sec)
b=R/m;       #damping constant
k=4*(math.pi**2)*m;    #spring constant(N/cm)

#Result
print "mechanical resistance is",round(R,4),"m/sec"
print "damping constant is",round(b,3)
print "spring constant",round(k,2),"N/cm"
print "answer for spring constant given in the book is wrong"

mechanical resistance is 0.0628 m/sec
damping constant is 0.209
spring constant 11.84 N/cm
answer for spring constant given in the book is wrong