import math # Example 2_1
#To find the tension in the other two Strings
#As Sigma(Fx)=0
F3=80 #units in Newtons
Fx1=F3*math.sin(37*math.pi/180) #units in Newtons
Fy1=F3*math.cos(37*math.pi/180) #units in Newtons
F2=round(Fy1+0) #units in Newtons
F1=round(Fx1+0) #units in Newtons
print "Tension in String 1 is F1=",round(F1)," N\n"
print "Tension in String 2 is F2=",round(F2)," N"
import math # Example 2_2
#To find the tension in the three cords that hold the object
#As Sigma(Fx)=0
theta1=37 #units in degrees
theta2=53 #units in degrees
F1_F2=math.cos(theta2*math.pi/180)/math.cos(theta1*math.pi/180)
#As Sigma(Fy)=0
F3=400 #units in Newtons
F2=round((F3*math.cos(theta1*math.pi/180))/(math.cos(theta1*math.pi/180)**2+math.cos(theta2*math.pi/180)**2)) #units in Newtons
F1=(math.cos(theta2*math.pi/180)/math.cos(theta1*math.pi/180))*F2 #units in Newtons
print "Tension in string 1 is F1=",round(F1)," N\n"
print "Tension in string 2 is F2=",round(F2)," N\n"
#In textbook the Answer for F2 is printed wrong as 320 N But the correct answer is 319 N
import math # Example 2_3
#To find the weight and the Tension in the cords
#As Sigma(Fx)=0
theta1=53 #units in degrees
theta2=37 #units in degrees
F1=100 #units in Newtons
F=F1/math.cos(theta1*math.pi/180) #units in Newtons
W=math.cos(theta2*math.pi/180)*F #units in Newtons
print "The Weight W=",round(W)," N\n"
print "Tension in the chord is F=",round(F)," N"
#In text book the answers are printed wrong as F=167N and W=133N but the correct answers are W=132N and F=166N
import math # Example 2_5
#To find the Tension T in the Supporting Cable
#As Sigma(Fx)=0
theta1=30 #units in degrees
theta2=90-theta1 #units in degrees
H_T=math.sin(theta1*math.pi/180)
W=2000 #Units in Newtons
T=W/math.sin(theta2*math.pi/180) #units in Newtons
H=T*H_T #units in Newtons
print "Tension in the Supporting Cable T=",round(T)," N"
#In textbook The answer is printed wrong as T=2310N but the correct answer is T=2309N
import math # Example 2_6
#To find the forces exerted bythe pedestals on the board
tou=900 #units in Newtons
d1=3 #units in Meters
d2=1.5 #Units in Meters
F1=-(tou*d1)/d2 #Units in Newtons
F2=tou-F1 #units in Newtons
print "The First Force F1=",round(F1)," N\n"
print "The Second Force F2=",round(F2)," N\n"
import math # Example 2_7
#To find tension in the supporting cable and Components of the force exerted by the hinge
F1=50 #units in Newtons
d1=0.7 #units in meters
F2=100 #units in Newtons
d2=1.4 #units in meters
d3=1 #units in meters
theta2=53 #units in degrees
T=round(((F1*d1)+(F2*d2))/(d3*math.cos(theta2*math.pi/180))) #units in Newtons
theta1=37 #units in degrees
H=math.cos(theta1*math.pi/180)*T #units in Newtons
V=F1+F2-(math.cos(theta2*math.pi/180)*T) #units in Newtons
print "Tension T=",round(T)," N\n"
print "H=",round(H)," N\n"
print "V=",round(V,2)," N"
#In text book the answer is printed wrong as H=234N but the correct answer is H=232N
import math # Example 2_8
#To find the tension in the Muscle and the Component Forces at elbow
F1=65 #units in Newtons
d1=0.1 #units in Meters
F2=20 #Units in Newtons
d2=0.35 #units in meters
theta1=20 #units in degrees
d3=0.035 #units in Meters
Tm=((F1*d1)+(F2*d2))/(math.cos(theta1*math.pi/180)*d3) #units in Newtons
V=F1+F2-(Tm*math.cos(theta1*math.pi/180))
H=Tm*math.sin(theta1*math.pi/180)
print "Tension T=",round(Tm)," N\n"
print "H=",round(H)," N\n"
print "V=",round(V)," N"
import math # Example 2_9
#To find the forces at the wall and the ground
theta1=53 #units in degrees
d1=3 #units in meters
F1=200 #units in Newtons
d2=4 #units in Meters
F2=400 #units in Newtons
theta2=37 #units in degrees
d3=6 #units in meters
P=((math.cos(theta1*math.pi/180)*d1*F1)+(math.cos(theta1*math.pi/180)*d2*F2))/(math.cos(theta2*math.pi/180)*d3) #units in Newtons
H=P #units in Newtons
V=F1+F2 #units in Newtons
print "Force P=",round(P)," N\n"
print "Force V=",round(V)," N\n"
print "Force H=",round(H)," N"
#In text book the answer is printed wrong as P=H=275N but the correct answer is P=H=276N