{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 4 : Motion in a Plane"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.1 , page : 69"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Therefore,the boy should hold his umbrella in the vertical plane at an angle of about 19.0 ° with the vertical towards the east. \n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable delcaration\n",
"\n",
"v_r=35 # Velocity vector of the rain which falls vertically in m/s \n",
"v_w=12 # Velocity vector of the wind blowing in east to west direction in m/s\n",
"\n",
"# Calculation\n",
"\n",
"R=math.sqrt(v_r**2+v_w**2) # The magnitude of the resultant vector \n",
"tanθ=v_w/v_r\n",
"θ=math.degrees(math.atan(tanθ)) # The direction that R makes with the vertical \n",
"\n",
"# Result\n",
"\n",
"print(\"Therefore,the boy should hold his umbrella in the vertical plane at an angle of about\",round(θ,0),\"° with the vertical towards the east. \")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.2 , page : 71 "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The magnitude of thr resultant vector is given by the equation, R = square root(A²+ B²+ 2ABcosθ)\n",
"The direction of the resultant vector is given by the equation, tanθ = SN/(OP+PN) = Bsinθ/(A +Bcosθ)\n"
]
}
],
"source": [
"# Calculation\n",
"\n",
"# Let OP and OQ represent the two vectors A and B making an angle θ.\n",
"# Then, using the parallelogram method of vector addition, OS represents the resultant vector R such that R = A + B \n",
"# SN is normal to OP and PM is normal to OS.\n",
"# From the geometry of the figure, OS2 = ON2 + SN2 but ON = OP + PN = A + Bcosθ\n",
"# SN = Bsin θ and OS² = (A + Bcosθ )² + (Bsinθ )² or, R² = A² + B² + 2ABcosθ\n",
"# .i.e R = square root(A²+ B²+ 2ABcosθ) \n",
"# In ΔOSN, SN = OSsin α = Rsin α , and in ΔPSN, SN = PSsinθ = Bsinθ\n",
"# Therefore, Rsinα = Bsinθ ..............eqn 1\n",
"# Similarly, PM = Asinα = Bsinβ .........eqn 2\n",
"# From eqns 1 and 2 we get,\n",
"# sin α = (B/R) sin θ or tanθ = SN/(OP+PN) = Bsinθ/(A +Bcosθ)\n",
"\n",
"# Result\n",
"\n",
"print(\"The magnitude of thr resultant vector is given by the equation, R = square root(A²+ B²+ 2ABcosθ)\")\n",
"print(\"The direction of the resultant vector is given by the equation, tanθ = SN/(OP+PN) = Bsinθ/(A +Bcosθ)\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.3 , page : 72 "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The magnitude of the resultant vector = 22.0 km/h\n",
"The direction of the resultant vector = 23.4 °\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"v_b=25 # Velocity of the motor boat racing towards north in km/h\n",
"v_c=10 # Velocity of the water current in the direction of 60° east of south in km/h\n",
"θ=60 # The angle in degree\n",
"\n",
"# Calculation\n",
"\n",
"# Using the parallelogram method of vector addition we can obtain the resultant vector\n",
"# We can obtain the magnitude of resultant vector using the Law of cosine \n",
"R=math.sqrt(v_b**2+v_c**2+(2*v_b*v_c*(math.cos(math.radians(2*θ)))))\n",
"# We can obtain the direction of resultant vector using the Law of sines \n",
"sinφ=(v_c*math.sin(math.radians(θ)))/R\n",
"φ=math.degrees(math.asin(sinφ))\n",
"\n",
"# Result\n",
"\n",
"print(\"The magnitude of the resultant vector =\",round(R,0),\"km/h\")\n",
"print(\"The direction of the resultant vector =\",round(φ,1),\"°\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.4 , page : 75 "
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) The velocity vector, v(t) = 3.0i+4.0tj m/s\n",
" The acceleration vector, a(t) = 4.0j m/s²\n",
"(b) Magnitude of v(t) at t=1 s = 5.0 m/s\n",
" Direction of v(t) at t=1 s = 53.0 ° with x-axis\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"t=1 # Time in s\n",
"\n",
"# Calculation\n",
"\n",
"# The position vector of the particle is r(t)=3.0ti+2.0t²j+5.0k\n",
"# On differentiating r(t) with respect to t we get the velocity vector, v(t)=3.0i+4.0tj\n",
"# On differentiating v(t) with respect to t we get the acceleration vector, a(t)=4.0j\n",
"V_x=3 # X component of v(t)\n",
"V_y=4 # Y component of v(t)\n",
"V=math.sqrt(V_x**2 + V_y**2)\n",
"tanθ=V_y/V_x\n",
"θ=math.degrees(math.atan(tanθ)) \n",
"\n",
"# Result\n",
"\n",
"print(\"(a) The velocity vector, v(t) = 3.0i+4.0tj m/s\")\n",
"print(\" The acceleration vector, a(t) = 4.0j m/s²\")\n",
"print(\"(b) Magnitude of v(t) at t=1 s =\",V,\"m/s\")\n",
"print(\" Direction of v(t) at t=1 s =\",round(θ,0),\"° with x-axis\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.5 , page : 76 "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) The y-coordinate of the particle at the instant its x-coordinate is 84 m = 36.0 m\n",
"(b) Speed of the particle at the instant its x-coordinate is 84 m = 26.0 m/s\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import sympy\n",
"\n",
"# Variable declaration\n",
"\n",
"x=84 # X component of the position vector in m\n",
"t= sympy.symbols('t')\n",
"\n",
"# Calculation\n",
"\n",
"# Velocity vector is given as, v(t)= 5.0i m/s\n",
"# Acceleration vector is given as, a(t)= 3.0i+2.0j m/s²\n",
"# By the equation r(t)=v(t)+(a(t)t²)/2 we get the positon vector of the particle as follows\n",
"# r(t) = 5.0ti + 1.5t²i + 1.0t²j\n",
"t=round((max(sympy.solve(1.5*t**2 + 5*t -x,t))),0)\n",
"y=1.0*t**2\n",
"# Now the velocity vector can be obtained by differentiating r(t) with respect to t \n",
"# Then we get, v(t) = 5.0i +3ti+2tj m/s\n",
"v_x=5.0+3*t # X component of v(t) at time = t\n",
"v_y=2*t # Y component of v(t) at time = t\n",
"V=math.sqrt(v_x**2 + v_y**2)\n",
"\n",
"# Result\n",
"\n",
"print(\"(a) The y-coordinate of the particle at the instant its x-coordinate is 84 m =\",y,\"m\")\n",
"print(\"(b) Speed of the particle at the instant its x-coordinate is 84 m =\",round(V,0),\"m/s\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.6 , page : 76 "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Therefore, the woman should hold her umbrella at an angle of about 19.0 ° with the vertical towards the west.\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"v_r=35 # Velocity vector of the rain which falls vertically in m/s\n",
"v_b=12 # Velocity vector of the bicycle riding in east to west direction in m/s\n",
"\n",
"# Calculation\n",
"\n",
"v_rb=v_r - v_b\n",
"tanθ=v_b/v_r\n",
"θ=math.degrees(math.atan(tanθ)) \n",
"\n",
"# Result\n",
"\n",
"print(\"Therefore, the woman should hold her umbrella at an angle of about\",round(θ,0),\"° with the vertical towards the west.\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.7 , page : 78 "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"For a projectile launched with velocity v_0 at an angle θ_0 , the range is given by, R = (v_0²sin2θ_0)/g\n",
"Now,for angles,(45°+α ) and (45°- α ), 2θ_0 is (90° + 2α) and (90° - 2α), respectively.\n",
"The values of sin (90° + 2 α ) and sin (90° - 2α) are the same, equal to that of cos 2α.\n",
"Therefore, ranges are equal for elevations which exceed or fall short of 45° by equal amounts α.\n"
]
}
],
"source": [
"# Variable declaration\n",
"\n",
"v_0=1 # For convenience, velocity at whch the projectile launched is assumed to be unity \n",
"θ_0=1 # For convenience, angle at whch the projectile launched in degree is assumed to be unity\n",
"\n",
"# Result\n",
"\n",
"print(\"For a projectile launched with velocity v_0 at an angle θ_0 , the range is given by, R = (v_0²sin2θ_0)/g\")\n",
"print(\"Now,for angles,(45°+α ) and (45°- α ), 2θ_0 is (90° + 2α) and (90° - 2α), respectively.\")\n",
"print(\"The values of sin (90° + 2 α ) and sin (90° - 2α) are the same, equal to that of cos 2α.\")\n",
"print(\"Therefore, ranges are equal for elevations which exceed or fall short of 45° by equal amounts α.\") \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.8 , page : 78 "
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The time taken by the stone to reach the ground = 10.0 s\n",
"The speed with which the stone hits the ground = 99.0 m/s\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"# We choose the origin of the x-,and y- axis at the edge of the cliff and t = 0 s at the instant the stone is thrown\n",
"# Choose the positive direction of x-axis to be along the initial velocity and the positive direction of y-axis to be the vertically upward direction\n",
"# The equations of motion are : x(t)=x_0 = v_0xt and y(t) = y_0+v_0yt+(1/2)a_y(t^2)\n",
"\n",
"g=9.8 # Acceleration due to gravity\n",
"x_0=0\n",
"y_0=0\n",
"v_oy=0\n",
"a_y=g\n",
"v_ox=15\n",
"y_t=490\n",
"\n",
"# Calculation\n",
"\n",
"# The stone hits the ground when y(t) = 490 m ,i.e. 490 = (1/2)(9.8)t\n",
"t=math.sqrt((-y_t*-2)/a_y)\n",
"# The velocity components are v_x = v_ox and v_y = v_oy - g t\n",
"v_x=v_ox\n",
"v_y=v_oy-(g*t)\n",
"V=math.sqrt(v_x**2+v_y**2)\n",
"\n",
"# Result\n",
"\n",
"print(\"The time taken by the stone to reach the ground =\",t,\"s\")\n",
"print(\"The speed with which the stone hits the ground =\",round(V,0),\"m/s\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.9 , page : 79 "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum height = 10.0 m\n",
"The time taken to return to the same level = 2.9 s\n",
"The distance from the thrower to the point where the ball returns to the same level = 69.0 m\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"v_0=28 # The initial velocity of the ball in m/s\n",
"θ=30 # The angle of inclination of the ball above the horizontal in degree\n",
"g=9.8 # Acceleration due to gravity in m/s²\n",
"\n",
"# Calculation\n",
"\n",
"h_m=(v_0*(math.sin(math.radians(θ))))**2/(2*g)\n",
"T_f=(2*v_0*math.sin(math.radians(θ)))/g\n",
"R=((v_0**2)*(math.sin(2*math.radians(θ))))/g \n",
" \n",
"# Result\n",
"\n",
"print(\"The maximum height =\",round(h_m,0),\"m\")\n",
"print(\"The time taken to return to the same level =\",round(T_f,1),\"s\")\n",
"print(\"The distance from the thrower to the point where the ball returns to the same level =\",round(R,0),\"m\") \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.10 , page : 81 "
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) Angular speed = 0.44 rad/s\n",
" Linear speed = 5.3 cm/s\n",
"(b) Since the direction changes continuously, acceleration here is not a constant vector\n",
" Magnitude of acceleration = 2.3 cm/s²\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
" \n",
"R=12 # Radius of the circular groove in cm\n",
"n=7 # Total number of revolutions\n",
"t=100 # Time taken for all 7 revolutions\n",
"\n",
"# Calculation\n",
"\n",
"T=t/n # Time taken for one revolution\n",
"#(a)\n",
"w=2*math.pi/T # Angular speed in rad/s\n",
"v=w*R # Linear speed in cm/s\n",
"a=pow(w,2)*R # Magnitude of acceleration in cm/s²\n",
"\n",
"# Result\n",
"\n",
"print(\"(a) Angular speed =\",round(w,2),\"rad/s\")\n",
"print(\" Linear speed =\",round(v,1),\"cm/s\")\n",
"print(\"(b) Since the direction changes continuously, acceleration here is not a constant vector\")\n",
"print(\" Magnitude of acceleration =\",round(a,1),\"cm/s²\")\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}