import math
from math import sin, cos, tan, radians, pi
#Declaration of Variables
P=10 #N #Force1
Q=8 #N #Force2
alpha=60 #Degrees #Angle Between Two Forces
#Calculations
#Magnitude of Resultant Force
R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N
#Result
print"Magnitude of Resultant Force",round(R,2),"N"
import math
#Declaration of Variables
alpha=60 #Degrees #Angle between Forces
R=20*(3)**0.5
#Let P & Q be the Two forces
#As Two Forces are equal i.e P=Q
#Magnitude of Resultant Force
#R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N
#After Sub values and Furhter simplifying above equations we get
#R=2*P*cos(alpha*2**-1*pi*180**-1)
#Further on Simplifying we get
P=R*((3)**0.5)**-1 #N
#Result
print"Magnitude of Force is",round(P,2),"N"
import math
import numpy as np
#Declaration of Variables
#Case-1
R1=14 #N #Resultant1
alpha1=60 #Degrees #Angle between two forces
#Case-2
R2=(136)**0.5
alpha2=90 #Degrees #Angle between two Forces
#Let P And Q be the two forces
#R=(P**2+Q**2+2*P*Q**cos(alpha))
#Now For case-1,we get Resultant as
#P**2+Q**2+P*Q=196 ............................(1)
#For case-2,we get Resultant as
#P**2+Q**2=136 ...................................(2)
#Subtracting Equation 2 from equation 1 we get
#P*Q=60 .........................................(3)
#Multiplying abovw equation by 2 we get
#2*P*Q=120 .......................................(4)
#Adding equation 4 to equation 2 we get
#P**2+Q**2+2*P*Q=256
#After Further simplifying we get
#P=16-Q ..........................(5)
#Sub value of P in equation 3 we get
#Q**2-16*Q+60=0
a=1
b=-16
c=60
X=b**2-4*a*c
Q1=(-b+X**0.5)*(2*a)**-1
Q2=(-b-X**0.5)*(2*a)**-1
#Now sub value of Q in equation 5 we get
P1=16-Q1
P2=16-Q2
#Result
print"Magnitude of two Forces is:P2",round(P2,2),"N"
print" :Q1",round(Q2,2),"N"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
P=50 #N #Force acting at pt O
Q=100 #N #force acting at pt O
alpha=30 #DEgree #Angle Between Two Forces
#Calculations
#MAgnitude of Resultant
R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N
#Angle Made by resultant with the direction of P
X=(Q*sin(alpha*180**-1*pi)*(P+(Q*cos(alpha*pi*180**-1)))**-1)
theta=np.arctan(X)*(180*pi**-1) #Degrees
#Angle made by resultant with x-axis is
Y=theta+alpha*2**-1 #Degrees
#Result
print"Resultant in the Magnitude is",round(R,2),"N"
print"Resultant in the Direction is",round(Y,2),"Degrees"
import math
#Declaration of Variables
R=1500 #N #REsultant of two Forces
alpha=90 #Degrees #Angle between two Forces
theta=36 #Degrees #Angle Made by Resultant with one Force
#Calculations
#Now From Equation of Direction of Resultant,we get
#tan(theta)=(Q*sin(alpha))*(P+Q*sin(alpha))**-1
#After Further sub values and simplifying we get
#Q=0.726*P .......................................(1)
#Now From Equation of Resultant
#R=(P**2+Q**2+2*P*Q*cos(alpha))
#After sub values and further simplifying we get
#R=1.527*P**2
#Therefore,we get value of P After simplifying above equation
P=(R**2*(1.527)**-1)**0.5
#Sub value of P in equation 1 we get
Q=0.726*P
#Result
print"Magnitude Of Forces:P",round(P,2),"N"
print" :Q",round(Q,2),"N"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
#P+Q=120
R=180 #N #Resultant of two Forces
theta=90 #Degrees #Angle between force and Resultant
#Calculations
#Now From Equation of Direction of Resultant,we get
#Tan(theta)=Q*sin(alpha)*(P+Q*sin(alpha))**-1
#After Further ssub values a in above equation and further simplifying we get
#P=-Q*cos(alpha) ..........(1)
#Now From equation of Resultant we get
#R=(P**2++Q**2+2*P*Q*cos(alpha))**0.5
#After sub values and further simplifying
#Q-P=120 ......................................(1)
#P+Q=270 ......................................(2)
#After Adding above equations i.e equations 1 and 2 we get
Q=390*2**-1 #N
P=270-Q #N
#Value of angle alpha
alpha=np.arccos(-P*Q**-1)*(180*pi**-1) #Degrees
#Result
print"Magnitude of Each Force:P",round(P,2),"N"
print" :Q",round(Q,2),"N"
print"Angle between Two Forces",round(alpha,2),"Degrees"
import math
from math import sin, cos, tan, radians, pi
#Declaration of Variables
W=1000 #N #Weight
#Angles
CAB=30 #Degrees
CBA=CBD=60 #Degrees
ACB=90 #Degrees
#Calculations
#Angle
CAD=30 #Degrees
#In Right-Angle Triangle,Angle ADC
ACD=90-CAD #Degrees
#In Right-Angle Triangle,Angle BDC
#Angle
BCD=90-CBD #Degrees
ACE=180-ACB-90-60 #DEgrees
BCE=180-ACE-ACB #DEGrees
#Applying LAmi's Theorem at Point C
#T1*(sin150)**-1=T2*(sin(120)**-1=1000*sin(90)**-1
#After Further simp;ifying we get
T1=W*sin(150*pi*180**-1) #N
T2=W*sin(120*pi*180**-1) #N
#Result
print"Tension in Chain is:T1",round(T1,2),"N"
print" :T2",round(T2,2),"N"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
W=900 #N #Weight at C
#Length
AC=4 #m
BC=3 #m
AB=5 #m
#Calculations
#In Triangle ABC
X=AC**2+BC**2
Y=AB**2
#Therefore,
#X=Y
#Therefore,
#Triangle ABC is Right Angle Triangle,In Which Angle ACB=90 Degrees
alpha=np.arcsin(BC*AB**-1)*(180*pi**-1)
Beta=90-alpha
#In Right Angle Triangle ADC,
theta1=90-alpha
#In Right Angle Triangle BDC,
theta2=90-Beta
#Now,Angles
ACE=180-theta1
BCE=180-theta2
#Now applying ami's Theorem
#T1*(sin(BCE))**-1=T2*(sin(ACE))**-1=W*(sin(90))**-1
#Tensions in chains
T1=W*sin(BCE*180**-1*pi) #N
T2=W*sin(ACE*180**-1*pi) #N
#Result
print"Tension in Chains are:T1",round(T1,2),"N"
print" :T2",round(T2,2),"N"
#Answer in hte book For T2 is incorrect
import math
from math import sin, cos, tan, radians, pi
#Declaration of Variables
W=15 #N #Weight at Pt C
OAC=FAC=60 #Degrees
CBD=BCF=45 #Degrees
FCA=90-FAC #Degrees
#Calculations
#Using Lami's theorem,
#W*(sin(BCA))**-1=T1*(sin(ACE))**-1=T2*(sin(ACE))**-1
#Angles
BCA=BCF+FCA #Degrees
ACE=180-FCA #Degrees
BCE=180-BCF #Degrees
#Force's in the string AC
T1=W*sin(ACE*180**-1*pi)*(sin(BCA*180**-1*pi))**-1 #N
T2=W*sin(BCE*180**-1*pi)*(sin(BCA*180**-1*pi))**-1 #N
#Result
print"Force's in the string:T1",round(T1,2),"N"
print" :T2",round(T2,2),"N"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
#Forces
P=50 #N
Q=100 #N
alpha=30 #Angle Between Two Forces
theta=15 #Degrees #Angle Made By Force P with x-axis
theta2=alpha+theta #Degrees
#Calculations
#Sum Of COmponents of forces along X-Axis is
H=P*cos(theta*pi*180**-1)+Q*cos(theta2*pi*180**-1) #N
#Sum Of COmponents of forces along Y-Axis is
V=P*sin(theta*pi*180**-1)+Q*sin(theta2*pi*180**-1) #N
#MAgnitude Of Resultant Force is
R=(H**2+V**2)**0.5 #N
#Let Direction Of Resultant Force be beta
#Direction Of Resultant Force is
beta=np.arctan(V*H**-1)*(180*pi**-1) #Degrees
#Result
print"Magnitude of Resultant Force is",round(R,2),"N"
print"Direction of Resultant Force is",round(beta,2),"Degrees"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
#Let 3Forces Be
R1=40 #KN
R2=15 #KN
R3=20 #KN
#Angles Made by respective forces with X-Axis
theta1=60 #Degrees
theta2=120 #Degrees
theta3=240 #Degrees
#Calculations
#Now sum of components of all forces along X-Axis
H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)
#Now sum of components of all forces along Y-Axis
V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)
#MAgnitude of Resultant Force is
R=(H**2+V**2)**0.5 #N
#Direction of Resultant Force is
theta=np.arctan(V*H**-1)*(pi**-1*180)
#Result
print"Magnitude of Resultant Force is",round(R,2),"KN"
print"Direction of Resultant Force is",round(theta,2),"Degrees"
#Declaration of Variables
#Let 3Forces Be
R1=40 #KN
R2=15 #KN
R3=20 #KN
#Angles Made by respective forces with X-Axis
theta1=60 #Degrees
theta2=120 #Degrees
theta3=240 #Degrees
#Calculations
#Now sum of components of all forces along X-Axis
H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)
#Now sum of components of all forces along Y-Axis
V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)
#MAgnitude of Resultant Force is
R=(H**2+V**2)**0.5 #N
#Direction of Resultant Force is
theta=np.arctan(V*H**-1)*(pi**-1*180)
#Result
print"Magnitude of Resultant Force is",round(R,2),"KN"
print"Direction of Resultant Force is",round(theta,2),"Degrees"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
#Let 4 Forces Be
R1=10 #KN
R2=15 #KN
R3=20 #KN
R4=40 #KN
#Angles Made by respective forces with X-Axis
theta1=30 #Degrees
theta2=60 #Degrees
theta3=90 #Degree
theta4=120 #Degrees
#Calculations
#Now sum of components of all forces along X-Axis
H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)+R4*cos(theta4*pi*180**-1)
#Now sum of components of all forces along Y-Axis
V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)+R4*sin(theta4*pi*180**-1)
#MAgnitude of Resultant Force is
R=(H**2+V**2)**0.5 #N
#Direction of Resultant Force is
theta4=np.arctan(V*H**-1)*(pi**-1*180)
theta=180+theta4 #Degrees
#Result
print"Magnitude of Resultant Force is",round(R,2),"KN"
print"Direction of Resultant Force is",round(theta,2),"Degrees"
import math
#Declaration of Variables
L=10 #m #Length of beam
W=200 #N #Pt Load
#Distances
L_AC=4 #m
L_CB=6 #m
#Calculations
#Let R_A & R_B be the forces acting at A & B
#Taking Moment at A
R_B=(W*L_CB)*L**-1 #N
R_A=W-R_B #N
#Result
print"Beam Reactions are:R_A",round(R_A,2),"N"
print" :R_B",round(R_B,2),"N"
import math
from math import sin, cos, tan, radians, pi
import numpy as np
#Declaration of Variables
#Let 4 Forces be
F1=10 #N
F2=20 #N
F3=30 #N
F4=40 #N
#Calculations
#Net Forces in Horizontal direction is
H=F1-F3 #N
#Net Forces in Vertical direction is
V=F2-F4 #N
#Resultant Force is given by
R=(H**2+V**2)**0.5 #N
#Direction of resultant Forces
theta=np.arctan(V*H**-1)*(pi**-1*180) #Degrees
#Since H & V are negative theta lies between 180 & 270
theta2=180+theta #Degrees
#Result
print"Magnitude of Force is",round(R,2),"N"
print"Direction of Force is",round(theta2,2),"Degrees"