{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 7 : Systems of Particles and Rotational Motion"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7.1 , page : 146"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The centre of mass = ( 0.28 m, 0.11 m )\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"# With the x–and y–axes chosen as the coordinates of points O, A and B forming the equilateral triangle are respectively (0,0),(0.5,0),(0.25,0.25√3 ).\n",
"# Let the masses 100 g, 150g and 200g be located at O, A and B be respectively.\n",
"\n",
"m1=100 # Mass of the first particle in g\n",
"m2=150 # Mass of the second particle in g\n",
"m3=200 # Mass of the third particle in g\n",
"x1=0 # x-coordinate of the first particle \n",
"x2=0.5 # x-coordinate of the second particle \n",
"x3=0.25 # x-coordinate of the third particle \n",
"y1=0 # y-coordinate of the first particle \n",
"y2=0 # y-coordinate of the second particle \n",
"y3=0.25 # y-coordinate of the third particle \n",
"\n",
"# Calculation\n",
"\n",
"X=(m1*x1+m2*x2+m3*x3)/(m1+m2+m3)\n",
"Y=(m1*y1+m2*y2+m3*y3)/(m1+m2+m3)\n",
"\n",
"# Result\n",
"\n",
"print(\"The centre of mass = (\",round(X,2),\"m,\",round(Y,2),\"m\",\")\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7.2 , page : 147 "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The centre of mass of a triangular lamina lies on the centroid of the triangle\n"
]
}
],
"source": [
"# The lamina (∆LMN) may be subdivided into narrow strips each parallel to the base (MN). \n",
"# By symmetry each strip has its centre of mass at its midpoint.\n",
"# If we join the midpoint of all the strips we get the median LP.\n",
"# The centre of mass of the triangle as a whole therefore, has to lie on the median LP.\n",
"# Similarly, we can argue that it lies on the median MQ and NR. \n",
"# This means the centre of mass lies on the point of concurrence of the medians, i.e. on the centroid G of the triangle.\n",
"\n",
"# Result\n",
"\n",
"print(\"The centre of mass of a triangular lamina lies on the centroid of the triangle\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7.3 , page : 147 "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The centre of mass = ( 0.83 m, 0.83 m )\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"\n",
"# Variable declaration\n",
"\n",
"# Letus choose the X and Y axes as the coordinates of the vertices of the L-shaped lamina.\n",
"# We can think of the L-shape to consist of 3 squares each of length 1m.\n",
"# The mass of each square is 1kg, since the lamina is uniform.\n",
"# The centres of mass C1, C2 and C3 of the squares are, by symmetry, their geometric centres and have coordinates (1/2,1/2), (3/2,1/2), (1/2,3/2) respectively.\n",
"# We take the masses of the squares to be concentrated at these points.\n",
"# hence the centre of mass of the whole L shape (X, Y) is the centre of mass of these mass points.\n",
"\n",
"\n",
"m1=1\n",
"m2=1\n",
"m3=1\n",
"x1=1/2\n",
"x2=3/2\n",
"x3=1/2\n",
"y1=1/2\n",
"y2=1/2\n",
"y3=3/2\n",
"\n",
"# Calculation\n",
"\n",
"X=(m1*x1+m2*x2+m3*x3)/(m1+m2+m3)\n",
"Y=(m1*y1+m2*y2+m3*y3)/(m1+m2+m3)\n",
"\n",
"# Result\n",
"\n",
"print(\"The centre of mass = (\",round(X,2),\"m,\",round(Y,2),\"m\",\")\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7.4 , page : 152 "
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Scalar product = -25\n",
"Vector product a × b = [ 7 -1 -5]\n",
"Vector product b × a = [-7 1 5]\n"
]
}
],
"source": [
"# Importing module\n",
"\n",
"import math\n",
"import numpy as np\n",
"\n",
"# Variable declaration\n",
"\n",
"a = (3,-4,5) # Vector a\n",
"b = (-2,1,-3) # Vector b\n",
"\n",
"# Calculation\n",
"\n",
"s=sum(p*q for p,q in zip(a,b))\n",
"a1 = np.array([3,-4,5]) \n",
"b1 = np.array([-2,1,-3]) \n",
"v1=np.cross(a1,b1)\n",
"v2=np.cross(b1,a1)\n",
"\n",
"# Result\n",
"\n",
"print(\"Scalar product =\",s)\n",
"print(\"Vector product a × b =\",v1)\n",
"print(\"Vector product b × a =\",v2)"
]
}
],
"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
}