# Initilization of variables
s1=2 # compression of the spring- initial
s2=5 # compression of the spring- final
import math
from scipy.integrate import quad
def integrand(s, a, b):
return 20*s
a=1
b=1
U=quad(integrand, s1, s2, args=(a,b))
# Results
print'The word done in compressing the spring is',round(U[0]),"in-lb"
import math
#Initilization of variables
m=5 #kg
d=6 #m
# as theta1=30 degrees & theta2=10 degrees,
sintheta1=2**-1
sintheta2=0.1736
costheta1=(3**0.5)*2**-1
costheta2=0.9848
u=0.2 #coefficient of friction
g=9.8 #m/s**2
F=70 #N
#Calculations
#Using free body diagram
Na=(m*g*costheta1)-(F*sintheta2) #N
#work done by each force
W=[F*costheta2,-m*g*sintheta1,0,-u*Na*d] #N.m
#Total Work Done
W_tot=W[0]+W[1]+W[2]+W[3] #N.m
#Using resultant
R=F*costheta2-(u*Na)-(m*g*sintheta1) #N
W_d=R*d #N.m (Work Done)
#Result
print'The work done is',round(W_d),"N.m"
import math
#Initilization of variables
m=20 #kg
d=1.5 #m
# as theta=30 degrees,
sintheta=2**-1
u=0.25 #coefficient of friction
g=9.8 #m/s**2
F=130 #N
#Calculations
W=F*d-(m*g*sintheta*d) #N.m
#Result
print'The work done is',round(W),"N.m"
import math
#Initilization of variables
d=6*12**-1 #ft
l=8*12**-1 #ft
l_c=3.2 #in
y=1.82 #in**2
#Calculations
V=1*4**-1*pi*d**2*l #ft**3
#One horizontal inch
h_i=V/l_c #ft**3
#One vertical inch
v_i=100*144 #lb/ft**2
#Then 1.82 in**2 represents
x=y*v_i*h_i #ft-lb
#Result
print'The work capacity is',round(x),"ft-lb"
# The ans in the textbook is incorrect.
import math
#Initilization of variables
speed=90000 #m/h
P=100*1000 #N
#Calculations
Power=P*((speed)/3600) #J/s
#Result
print'The power developed is',round(Power*10**-6,1),"MJ/s"
# Note the unit used.
import math
#Initilization of variables
d=0.6 #m
T_t=800 #N
T_s=180 #N
w=200 #rpm
#Calculations
r=d/2 #m radius
#Torque
M=(T_t-T_s)*r #N.m
#Power
w_new=(2*pi*w)/60 #rad/s
Power=M*(w_new) #W
#Result
print'The power transmitted is',round(Power*10**-3,1),"kW"
# The answer in the book is incorrect
import math
#Initilization of variables
P=25.6 #lb
w=600 #rpm
a=36 #in
b=12 #in
#Calculations
M=P*(((b*2**-1)+a)/12) #lb-ft
w_new=(2*pi*w)/60 #rad/s
Hp=(M*w_new)/550 #hp
#Result
print'The power being transmitted is',round(Hp,1),"hp"
import math
#Initilization of variables
Pout=3.8 #bhp
Pin=4.1 #ihp
#Calculations
Efficiency=round((Pout/Pin)*100) #Percent
#Result
print'The efficiency of the engine is',round(Efficiency),"%"
import math
from scipy.integrate import quad
def integrand(x, a, b):
return -(3/x)
a=1
b=1
U=quad(integrand, 6, 3, args=(a,b))
g=32.2 # ft/s**2
deltaT=((U[0]*32.2*2)/(4*16**-1))**0.5
# Results
print'The speed of the disc will be',round(deltaT,1),"ft/s"
import math
#Initilization of variables
l=2 #m
m=4 #kg
w_1=20 #rpm
w_2=50 #rpm
rev=10 #no of revolution
#Calculations
Io=(3**-1)*(m)*l**2 #kg.m**2
w1=(2*pi*w_1)/60 #rad/s
w2=(2*pi*w_2)/60 #rad/s
theta=2*pi*rev #rad
M=(0.5*Io*(w2**2-w1**2))/theta #N.m
#Result
print'The constant moment required is',round(M,3),"N.m"
# The ans waries in decimal places.
import math
#Initilization of variables
W=1000 #lb
w_w=200 #lb weight of the individual wheel
d_w=2.5 #ft diameter of the wheel
v=22 #ft/s
t=2 #minutes
#Calculations
#T1=Initial Kinetic Energy and T2=Final Kinetic Energy
F=(-0.5*W*32.2**-1*v**2-4*0.5*w_w*32.2**-1*(v**2+0.5*v**2))/(10560) #lb
#Negative sign in the answer tells it oposses the motion
#Result
print'The rolling resistance is',round(F,2),"lb"
import math
#Initilization of variables
W=100 #lb
lo=4 #ft
# as theta=45 degrees
costheta=(2**0.5)**-1
g=32.2 #ft/s**2
l=8/3 #ft
#Calculations
#Taking moment about point O and equating it to zero
alpha=(W*(lo*0.5)*costheta)/((W/g)*(l)*2) #rad/s**2
#Summing forces in the t direction
Ot=(W*costheta)-((W/g)*lo*0.5*alpha) #lb
#Work Done
Work=W*(lo*0.5*costheta) #ft/lb
#Moment of inertia
Io=(3**-1)*(W/g)*(lo**2) #kg-ft**2
#Using the concept for work done=chane in K.E
w=(Work/(0.5*Io))**0.5 #rad/s
#Summing forces along the bar
On=-(-((W/g)*lo*0.5*w**2)-(W*costheta)) #lb
#Result
print'The bearing reaction at O on the rod is',round(On),"lb"
import math
#Initilization of variables
vo=9 #m/s
# as theta=30 degrees,
sintheta=2**-1
g=9.8 #m/s**2
#Calculations
x=((7*10**-1)*vo**2)*(g*sintheta)**-1 #m
#Result
print'The ball will roll',round(x,1),"m up the plane"
#The textbook wrongly mentions the unit of displacement as in
import math
#Initilization of variables
W=322 #lb
F=12 #lb
a=0 #lower limit (where the cyliner starts rolling)
b=pi/2 #Upper Limit (where the cyliner stops rolling)
d=3.2 #ft
g=32.2 #ft/s**2
#Calculations
dR=1.6 #Differential Radius
d_U=2*dR*F #differential work done
#Integration Calculations
#As it is a simple integration we can resort to this
U=d_U*(b-a) #ft-lb
#Determination of K.E
w=sqrt(U/((0.5*(W/g)*(1/(d/2)**2))+((0.5*0.5)*(W/g)*(d/2)**2))) #rad/s
#Result
print'The angular velocity of the cylinder is',round(w,2),"rad/s"
import math
#Initilization of variables
Wa=161 #lb
Wb=193.2 #lb
Wc=322 #lb
v1=5 #ft/s
lc=6 #in
k=6 #lb/ft
l=4 #ft
u=0.2 #coefficient of friction
g=32.2 #ft/s**2
#Calculations
Ib=(2**-1)*(Wb/g)*(2**-1)**2 #Moment of inertia
w1=v1*0.5**-1 #rad/s
T1=(0.5*(Wc/g)*v1**2)+(0.5*Ib*w1**2)+(0.5*(Wa/g)*v1**2) #ft-lb
#Work Done on the system
#The textbook is ambigious on the calculations hence the result is dispalyed directly
U=26.4 #ft-lb
#Velocity Calculations
v=((T1+U)*9**-1)**0.5 #ft/s
#Result
print'The velocity of the block is',round(v,2),"ft/s"
import math
#Initilization of variables
Mm=70 #kg
Mc=45 #kg
R=0.6 #m
g=9.8 #m/s**2
l=5 #m
# as theta=50 degrees,
sintheta=0.77
#Calculations
#T2 calculations except for v term in it as it cannot be declared as a number
T2=68.7 #without the v term in it
v=((g*Mm*l-g*Mc*l*sintheta)/T2)**0.5 #m/s
#Result
print'The speed is',round(v,2),"m/s"
import math
#The textbook has a typo in printing the question number
#Initilization of variables
W1=96.6 #lb
W2=128.8 #lb
v=8 #ft/s
g=32.2 #ft/s**2
# as theta=30 degrees,
sintheta=2**-1
#Calculations
#Initial KE of the system is T1=0
T2=(0.5*(W1/g)*v**2)+(0.5*(W2/g)*(v/2)**2) #ft-lb
#Work Done without s term
U=-(W1*sintheta)+W2*0.5
#S calculations
s=T2*U**-1 #ft
#Result
print'The block attains a speed of 8 ft/s in',round(s,2),"ft (up the plane)"
# Initilization of variables
l=6 #m length of the cable
m=50 #kg mass of the cable
g=9.8 #m/s**2
import math
from scipy.integrate import quad
def integrand(x, a, b):
return 81.7*(6-x)
a=1
b=1
Work=quad(integrand, 0, 6, args=(a,b))
# Results
print'The word done is',round(Work[0]),"N.m"
# The answer in textbook is off by 1 N.m
# Initilization of variables
k=0.044 # spring constant
#x=0.300 #m length of compression from 450 to 150
import math
from scipy.integrate import quad
def integrand(x, a, b):
return 0.5*0.044*x**2
a=1
b=1
W=quad(integrand, 0, 300, args=(a,b))
# Results
print'The word done on the balls is',round(W[0]*10**-5,2),"N.m"
import math
#Initilization of variables
m=10 #kg
d=1.2 #m
g=9.8 #m/s**2
#Calculations
#Initilial KE is zero
#Final KE is(without v^2 term in it)
KE2=(3*4**-1)*10
#Work Done
U=m*g*d #N.m
#Velocity calculations
v=sqrt(U*KE2**-1) #m/s
#Result
print'The velocity is',round(v,2),"m/s"
import math
#Initilization of variables
W=161 #lb
wa=150 #lb
wb=100 #lb
la=2 #ft
lb=4 #ft
#Calculations
#Work Done
T1=wb*lb-wa*la #ft-lb
#Final KE=zero
T2=0 #ft-lb
#Work Done on the system=T2-T1
#Hence the equation becomes
#50x-50x^2+100=0
#where
a=-50
b=50
c=100
#Solution
d=sqrt(b**2-4*a*c)
x1=(-b+d)/(2*a) #ft
x2=(-b-d)/(2*a) #ft
#Result
print'The stretch of the spring is',round(x2),"ft"
#Here even x1 could have been the solution,but the stretch in the string is elongation not compression hence x2 is the valid answer
import math
#Initilization of variables
I=100 #slug-ft**2
w=4 #rad/s
theta=6 #rad
Mc=64.4 #lb
g=32.2 #ft/s**2
#Calculations
vb=2*w #ft/s
vc=0.5*w #ft/s
Mb=(0.5*I*w**2+0.5*(Mc/g)*vc**2+0.5*Mc*theta)/(2*theta-(0.5*vb**2*(1/g))) #lb
#Result
print'The weight of the block B is',round(Mb,1),"lb"
import math
#Initilization of variables
Wa=96.6 #lb
Wb=128.8 #lb
g=32.2 #ft/s**2
I=12 #slug-ft**2
v=16 #ft/s
ratio=3**-1 #ratio of Sb/Sa
r=3#ft
va=6 #ft/s
vb=2 #ft/s
#Calculations
#Work Done without S in it
W=Wa-(ratio*Wb)
#System has zero KE initially and final KE is given by
w=va/r #rad/s
T2=(0.5*(Wa/g)*va**2+0.5*I*w**2+0.5*(Wb/g)*vb**2) #ft-lb
#Distance Calculations
S=T2*W**-1 #ft
#Result
print'The distance through which A falls is',round(S,2),"ft"
import math
#initilization of variables
u=0.25 #coefficient of friction
k=2800 #N/m
x=0.075 #m
g=9.8 #m/s**2
m=7 #kg
# as theta=30 degrees,
sintheta=2**-1
costheta=(3**0.5)*2**-1
#Calculations
#Normal Reaction
N=g*m*costheta #N
#Frictional Force
Fr=u*N #N
#Component of force along the plane
F=g*m*sintheta #N
#Spring work is
W=0.5*k*x*x #N.m
s=(W+Fr*x-F*x)/(F-Fr) #m
S=(s*1000) #mm
#Result
print'The value of S is',round(S),"mm"
import math
#Initilization of variables
m=5 #kg
l=2 #m
k=10000 #N/m
x=0.1 #m
g=9.8 #m/s**2
#Calculations
drop=l+x #m mass drop length
#Work Done by Gravity
Wg=g*m*drop #N.m
#Work Done by Spring
Ws=0.5*k*x**2 #N.m
#Increase in KE is without v**2
KE=0.5*m #kg
#Velocity Calculations
v=sqrt((Wg-Ws)/KE) #m/s
#Result
print'The speed is',round(v,1),"m/s"
import math
#Initilization of variables
l=6 #ft
k=20 #lb/in
x=8 #in
#Calculations
#Work Done by Gravity
Wg=(l*12+x) #in without W
#Work Done by Spring
Ws=0.5*k*x**2 #in-lb
#Change in the kinetic energy is zero
W=Ws/Wg #lb
#Result
print'The weight is',round(W),"lb"
import math
#Initilization of variables
W=8 #lb
#Calculations
#work done by the spring woithout k
Ws=0.5*((9*12**-1)**2-(12**-1)**2)
#Work done by gravity
Wg=W*(10.5*12**-1) #ft-lb
#Change in KE is zero
k=Wg/Ws #lb/ft
#Result
print'The value of k is',round(k,1),"lb/ft"
import math
#Initilization of variables
Wc=100 #lb
r= 1 #ft
F=80 #lb
k=50 #lb/ft
s=6 #in
g=32.2 #ft/s**2
#Calculations
#Work done on the system
U=-0.5*k*(1)+F*(s*12**-1) #ft-lb
#Initial KE is zero
Vo=(U/(0.5*(Wc/g+0.5*(Wc/g)*r)))**0.5 #ft/s
#Result
print'The initial speed is',round(Vo,2),"ft/s"