In [1]:

```
# Importing module
import math
# Variable declaration
a=100 # Constant acceleration of the inter stellar space in m/s²
# Calculation
# Since there are no nearby stars to exert gravitational force on him and the small spaceship exerts negligible gravitational attraction on him, the net force acting on the astronaut, once he is out of the spaceship, is zero.
# By the first law of motion the acceleration of the astronaut is zero.
# Result
print("The acceleration of the astranaunt =",0,"m/s²")
```

In [2]:

```
# Importing module
import math
# Variable declaration
m=0.04 # Mass of the bullet in kg
u=90 # Speedof the bullet in m/s
s=60 # Thickness of the wooden block at which the bullet stops in cms
# Calculation
s=s*10**-2
a=u**2/(2*s) # Retardation of the bullet in m/s²
F=m*a # Retarding force in N
# Result
print("The average resistive force exerted by the block on the bullet =",F,"N")
```

In [3]:

```
# Importing module
import sympy
# Variable declaration
g = sympy.symbols('g')
m = sympy.symbols('m')
u = sympy.symbols('u')
ut = sympy.symbols('ut')
t = sympy.symbols('t')
gt = sympy.symbols('gt')
# Calculation
# The motion of a particle of mass m is given as follows
y = ut + (gt**2)/2
# Differentiating the equation of motion with respect to time t we get,
v = u + gt
# Again differentiating the above equation with respect to time t we get,
a = g
F = m*a # Force aciting on the particle
# Thus the given equation describes the motion of a particle under acceleration due to gravity and y is the position coordinate in the direction of g.
# Result
print("Force acting on the particle, F = ",F)
```

In [4]:

```
# Importing module
import math
# Variable declaration
m=0.15 # Mass of the ball in kg
u=12 # Initial speed of the ball in m/s
# Calculation
Delta_v=u-(-u) # Change in velocity= Final velocity-Initial velocity
I=m*Delta_v
# Result
print("The impulse in the direction from the batsman to the bowler =",round(I,1),"Ns")
```

In [5]:

```
# Importing module
import math
# Variable declaration
θ=30
# Calculation
# Consider the force (or impulse) on the ball due to the wall using the second law, and then use the third law to answer
# Case(a)
# Let u be the speed of each ball before and after collision with the wall, and m the mass of each ball.
# Let us consider, initial momentum in x direction, P_x_in = mu and final momentum in x direction,P_x_fi = - mu
# Let us consider, initial momentum in y direction, P_y_in = 0 and final momentum in y direction,P_y_fi = 0
# Impulse is the change in momentum vector. Therefore,
# x-component of impulse = 2mu and y-component of impulse = 0
# Impulse and force are in the same direction. Clearly, the force on the ball due to the wall is normal to the wall, along the negative x-direction.
# Using Newtons third law of motion, the force on the wall due to the ball is normal to the wall along the positive x-direction.
# Case(b)
# Let u be the speed of each ball before and after collision with the wall, and m the mass of each ball.
# Let us consider, initial momentum in x direction, P_x_in = mu cos 30° and final momentum in x direction,P_x_fi = -mu cos 30°
# Let us consider, initial momentum in y direction, P_y_in = mu sin 30° and final momentum in y direction,P_y_fi = mu sin 30°
# x-component of impulse = 2mucos30 and y-component of impulse = 0
# Using Newtons third law, the force on the wall due to the ball is normal to the wall along the positive x direction.
# The ratio of the magnitudes of the impulses imparted to the balls in (a) and (b) is 2mu/2mu cos 30°= 1/cos 30°
r=1/math.cos(math.radians(θ))
# Result
print("(i) The direction of impulse (and force) is the same in both case and is normal to the wall along the negative x direction")
print("(ii)The ratio of the magnitudes of the impulses imparted to the ball in two cases =",round(r,1))
```

In [6]:

```
# Importing module
import math
# Variable declaration
m=6 # The amount of mass suspended in kg
l=2 # Length of the rope in m
F=50 # The Force applied at the mid-point of the rope in the horizontal direction in N
g=10 # Acceleration due to gravity
# Calculation
T2=m*g
T1cosθ=T2
T2sinθ=F
tanθ=T2sinθ/T1cosθ
θ=math.degrees(math.atan(tanθ))
# Result
print("The angle that the rope makes with the vertical in equilibrium =",round(θ,0),"°")
```

In [7]:

```
# Importing module
import math
# Variable declaration
u=.15 # The co-efficient of static friction between the box and the trains floor
g=10 # Acceleration due to gravity
# Calculation
# Since the acceleration of the box is due to the static friction, ma = f ≤ μN = μmg, i.e. a ≤ μg
a_max=u*g
# Result
print("The maximum acceleration of the train =",a_max,"m/s²")
```

In [8]:

```
# Importing module
import math
# Variable declaration
m=4 # Mass in kg
θ=15 # Angle of inclination of the plane with the horizontal
# Calculation
# Resolving the weight mg along the two directions shown, we have mgsin θ = fs, mgcosθ=N
# As θ increases, the self-adjusting frictional force fs increases until at θ = θ max,
# fs achieves its maximum value, max_f = μ s N
# Therefore, tan θ max = μ or θ_max = (tan)^-1 μ
tanθ=math.tan(math.radians(θ))
# Result
print("The coefficient of static friction between the block and the surface =",round(tanθ,2))
```

In [9]:

```
# Importing module
import math
# Variable declaration
m1=20 # Mass of the block in kg
m2=3 # Mass of the block in kg
g=10 # Acceleration due to gravity
u_k=0.04 # The coefficient of kinetic friction between the trolley and the surface
# Calculation
N=m1*g
f_k=u_k*N
# Applying second law to motion of the block , 30-T = 3a
# Applying the second law to motion of the trolley, T-fk = 20a.
a=22/23
T=(20*a)+f_k
# Result
print("The acceleration of the block and trolley system =",round(a,2),"m/s²")
print("The tension on the string =",round(T,1),"N")
```

In [10]:

```
# Importing module
import math
# Variable declaration
v=18 # Speed of the cycle in km/h
R=3 # Radius of the circular turn in m
µ_s=0.1 # Coefficient of static friction between the tyre and the road
g=9.8 # Acceleration due to gravity in m/s²
# Calculation
v=v*(5/18) # Speed of the cycle in m/s
v_sq=pow(v,2)
#The condition for the cyclist not to slip is given b, v2 ≤ μ_sRg
μ_sRg=μ_s*R*g
# Result
if v_sq < μ_sRg:
print("The cyclist will not slip while taking the circular turn.")
else:
print("The cyclist will slip while taking the circular turn.")
```

In [11]:

```
# Importing module
import math
# Variable declaration
R=300 # Radius of the circulas race track in m
θ=15 # Angle at which the road banked in degree
u=0.2 # The coefficient of friction between the wheels of a race-car and the road
g=9.8 # Acceleration due to gravity
# Calculation
#(a)
v_o=math.sqrt(R*g*(math.tan(math.radians(θ))))
#(b)
v_max=math.sqrt(R*g*(u+(math.tan(math.radians(θ))))/(1-u*math.tan(math.radians(θ))))
# Result
print("The optimum speed of the race-car to avoid wear and tear on its tyres =",round(v_o,1),"m/s")
print("The maximum permissible speed to avoid slipping =",round(v_max,1),"m/s")
```

In [12]:

```
# Importing module
import math
# Variable declaration
m1=2 # Mass of the wooden block in kg
m2=25 # Mass of the iron cylinder in kg
a=0.1
g=10 # Acceleration due to gravity
# Calculation
#(a)
# The block is at rest on the floor. Its free-body has two forces on the block, the force of gravitational attraction by the earth and the normal force R of the floor on the block.
# By the First Law, the net force on the block must be zero, hence
e1=m1*g # The force of gravitational attraction by the earth
R=e1 # The normal force of the floor on the block
#(b)
# The system (block + cylinder) accelerates downwards with 0.1 m/s².The free-body diagram of the system shows two forces on the system : the force of gravity due to the earth; and the normal force R′ by the floor.
e2=(m1+m2)*g # The force of gravitational attraction by the earth
R_prim=e2-(m1+m2)*a # The normal force of the floor on the block
# Result
print("(a) The action of the block is equal to",R,"N and directed vertically downwards.")
print("(b) The action of the system on the floor is equal to",R_prim,"N vertically downward.")
print("For(a):")
print("(i) The force of gravity",e1,"N on the block by the earth (action);the force of gravity on the earth by the block (reaction)",R,"N directed upwards.")
print("(ii) The force on the floor by the block (action); the force on the block by the floor (reaction).")
print("For(b):")
print("(i) The force of gravity",e2,"N on the system by the earth (action);the force of gravity on the earth by the system (reaction), equal to 270 N, directed upwards.")
print("(ii) the force on the floor by the system (action); the force on the system by the floor (reaction).")
```