Chapter 20:Projectiles

Example 20.4, Page no.423

In [1]:
import math
#variable declaration
alpha=30    #angle of projection with the horizontal in degree
u=40        #velocity of projection in m/s
g=9.8       #gravity in m/s**2

#calculation
t=(2*u*math.sin(alpha*math.pi/180)/g)

#Result
print"t=",round(t,2),"s"
t= 4.08 s

Example 20.5, Page no.423

In [2]:
import math
#variable declaration
alpha=25    #angle of projection with the horizontal in degree
u=15        #velocity of projection in m/s
g=9.8       #gravity in m/s**2

#calculation
R=((u**2)*(math.sin((2*alpha)*math.pi/180))/g)

#Result
print"R=",round(R,1),"m"
R= 17.6 m

Example 20.6, Page no.424

In [4]:
import math
#variable declaration
alpha=45    #angle of projection with the horizontal in degree
u=100       #velocity of projection in m/s
g=9.8       #gravity in m/s**2

#calculation
H=((u**2)*math.sin((alpha*math.pi)/180)**2/(2*g))

#Result
print"H=",round(H,1),"m"
H= 255.1 m

Example 20.23, Page no.439

In [5]:
import math
#variable declaration
alpha=35    #angle of projection with the horizontal in degree
beta=15     #inclination of the plane in degree
u=10        #velocity of projection in m/s
g=9.8       #gravity in m/s**2

#calculation
t_1=(2*u*math.sin((alpha-beta)*math.pi/180)/(g*math.cos(beta*math.pi/180)))
t_2=(2*u*math.sin((alpha+beta)*math.pi/180)/(g*math.cos(beta*math.pi/180)))

#Result
print"Time of flight when the ball is projected upwards, t_1=",round(t_1,2),"s"
print"Time of flight when the ball is projected downwards, t_2=",round(t_2,2),"s"
Time of flight when the ball is projected upwards, t_1= 0.72 s
Time of flight when the ball is projected downwards, t_2= 1.62 s

Example 20.24, Page no.441

In [6]:
import math
#variable declaration
alpha=55    #angle of projection with the horizontal in degree
beta=20     #angle of plane in degree
u=30        #velocity of projection in m/s
g=9.8       #gravity in m/s**2
pi=180      #pi in degree

#calculation
alpha=(pi/4)+(beta/2)
R=(u**2*(math.sin(((2*alpha)-beta)*math.pi/180)-math.sin(beta*math.pi/180))/(g*math.cos(beta*math.pi/180)**2))
t=(2*u*math.sin((alpha-beta)*math.pi/180))/(g*math.cos(beta*math.pi/180))

#Result
print"Maximum Range, alpha=",int(alpha),"degree"
print"Range of the projectile, R=",round(R,2),"m"
print"Time of flight, t=",round(t,2),"s"
Maximum Range, alpha= 55 degree
Range of the projectile, R= 68.43 m
Time of flight, t= 3.74 s
In [ ]: