import math
#Given
#Variable declaration
L=3*1000 #Length in mm
W=25*1000 #Point load in N
I=1e8 #Moment of Inertia in mm^4
E=2.1e5 #Young's modulus in N/sq.mm
#Calculation
#case(i):Slope of the cantilever at the free end
thetaB=round((W*(L**2))/(2*E*I),6)
#case(ii):Deflection at the free end
yB=round((W*L**3)/(E*I*3),2)
#Result
print "Slope at the free end =",thetaB,"rad"
print "Deflection at the free end =",yB,"mm"
import math
#Given
#Variable declaration
L=3*1000 #Length in mm
W=50*1000 #Point load in N
a=2*1000 #Distance between the load and fixed end in mm
I=1e8 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in N/sq.mm
#Calculation
#case(i):Slope at the free end
thetaB=(W*(a**2))/(2*E*I)
#case(ii):Deflection at the free end
yB=round(((W*a**3)/(E*I*3))+((W*(a**2))/(2*E*I)*(L-a)),2)
#Result
print "Slope at the free end =",thetaB,"rad"
print "Deflection at the free end =",yB,"mm"
import math
#Given
#Variable declaration
L=2.5*1000 #Length in mm
w=16.4 #Uniformly distributed load in kN/m
I=7.95e7 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in N/sq.mm
#Calculation
W=w*L #Total load in N
yB=round((W*L**3)/(E*I*8),3) #Deflection at the free end in mm
#Result
print "Deflection at the free end =",yB,"mm"
#Given
#Variable declaration
b=120 #Width in mm
d=200 #Depth in mm
L_star=2.5 #Length in m
L=2.5*1000 #Length in mm
yB=5 #Deflection at free end in mm
E=2e5 #Young's modulus in N/sq.mm
#Calculation
I=(b*d**3)/12 #Moment of Inertia in mm^4
w=(yB*8*E*I)/(L**3*L_star)/1e3 #Uniformly distributed load in N/m
#Result
print "Uniformly distributed load =",w,"kN/m"
import math
#Given
#Variable declaration
L=3*1000 #Length in mm
w=10 #Uniformly distributed load in N/mm
a=2*1000 #Length of Uniformly distributed load from fixed end in mm
I=1e8 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in N/sq.mm
#Calculation
#case(i):Slope at the free end
thetaB=str((w*(a**3))/(6*E*I))[:7]
#case(ii):Deflection at the free end
yB=round(((w*a**4)/(E*I*8))+((w*(a**3))/(6*E*I)*(L-a)),2)
#Result
print "Slope at the free end =",thetaB,"rad"
print "Deflection at the free end =",yB,"mm"
import math
#Given
#Variable declaration
L=3*1000 #Length in mm
w=10 #Uniformly distributed load in N/mm
a=2*1000 #Length of Uniformly distributed load from fixed end in mm
I=1e8 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in N/sq.mm
#Calculation
#case(i):Slope at the free end
thetaB=round(((w*(L**3))/(6*E*I))-((w*((L-a)**3))/(6*E*I)),6)
#case(ii):Deflection at the free end
yB=round(((w*L**4)/(E*I*8))-(((w*(L-a)**4)/(8*E*I))+((w*(L-a)**3)/(6*E*I)*a)),4)
#Result
print "Slope at the free end =",thetaB,"rad"
print "Deflection at the free end =",yB,"mm"
import math
#Given
#Variable declaration
L=4*1000 #Length in mm
w=50 #load at fixed end in N/mm
I=1e8 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in N/sq.mm
#Calculation
#case(i):Slope at the free end
thetaB=round(-(w*(L**3))/(24*E*I),5)
#case(ii):Deflection at the free end
yB=round((w*L**4)/(E*I*30),2)
#Result
print "Slope at the free end =",-thetaB,"rad"
print "Deflection at the free end =",yB,"mm"