{
 "metadata": {
  "name": "",
  "signature": "sha256:cf281f80a78bfeb536c0b051c1ea63cb42b959dc997ecbfc4f84c2ba094e55fb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER09 : CENTRE OF MASS LINEAR MOMENTUM COLLISION"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 : Pg 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.4\n",
      "# calculation of the maximum compression of the string\n",
      "# given data\n",
      "import math \n",
      "m=1.# mass(in kg)\n",
      "v=2.# speed of the block(in m/s)\n",
      "k=50.# spring constant(in N/m)\n",
      "# calculation\n",
      "V=(m*v)/(m+m)# principle of conservation of linear momentum\n",
      "ke1=(m*v*v/2.)# initial kinetic energy\n",
      "ke2=(m*V*V/2.)+(m*V*V/2.)# final kinetic energy\n",
      "x=math.sqrt(2.*(ke1-ke2)/k)# kinetic energy lost = elastic energy stored\n",
      "print'the maximum compression of the string is',x,'m'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the maximum compression of the string is 0.2 m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 : Pg 148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.5\n",
      "# calculation of the speed of combined mass\n",
      "# given data\n",
      "ma=50.# mass(in kg) of cart A\n",
      "mb=20.# mass(in kg) of cart B\n",
      "va=20.# velocity(in km/hr) of cart A\n",
      "vb=10.# velocity(in km/hr) of cart B\n",
      "\n",
      "# calculation\n",
      "V=((ma*va)-(mb*vb))/(ma+mb)# principle of conservation of linear momentum\n",
      "\n",
      "print'the speed of combined mass after collision is',round(V,2),'km/hr'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of combined mass after collision is 11.43 km/hr\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "WORKED EXAMPLES "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1w : Pg 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.1w\n",
      "# Locating the centre of maass of the system\n",
      "\n",
      "# given data\n",
      "m1=.50# mass(in kg) at point1\n",
      "m2=1.# mass(in kg) at point2\n",
      "m3=1.5# mass(in kg) at point3\n",
      "x1=0# x coodinate (in cm) of point1\n",
      "x2=4.# x coodinate (in cm) of point2\n",
      "x3=0# x coodinate (in cm) of point3\n",
      "y1=0# y coodinate (in cm) of point1\n",
      "y2=0# y coodinate (in cm) of point2\n",
      "y3=3.# y coodinate (in cm) of point3\n",
      "\n",
      "# calculation\n",
      "X=((m1*x1)+(m2*x2)+(m3*x3))/(m1+m2+m3)\n",
      "Y=((m1*y1)+(m2*y2)+(m3*y3))/(m1+m2+m3)\n",
      "\n",
      "print'The centre of mass is',round(X,2),'cm right and',Y,'cm left above the .5 kg paticle'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The centre of mass is 1.33 cm right and 1.5 cm left above the .5 kg paticle\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6w : Pg 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.6w\n",
      "# calculation of the acceleration of the centre of mass\n",
      "# given data\n",
      "M=2.5# mass(in kg) of the body\n",
      "F1=6.# force(in N) acting at point 1\n",
      "F2=5.# force(in N) acting at point 2\n",
      "F3=6.# force(in N) acting at point 3\n",
      "F4=4.# force(in N) acting at point 4\n",
      "theta1=0# angle(in degree)\n",
      "theta2=37.# angle(in degree)\n",
      "theta3=53.# angle(in degree)\n",
      "theta4=60.# angle(in degree)\n",
      "# calculation\n",
      "Fx=3.6;#(-F1*cosd(theta1))+(F2*cosd(theta2))+(F3*cosd(theta3))+(F4*cosd(theta4))# X component of resultant force\n",
      "Fy=1.68;#(F1*sind(theta1))+(F2*sind(theta2))+(-F3*sind(theta3))+(F4*sind(theta4))# X component of resultant force\n",
      "F=3.98;#sqrt((Fx*Fx)+(Fy*Fy))\n",
      "theta=25.;#atand(Fy/Fx)\n",
      "acm=1.59;#F/M# acceleration of centre of mass\n",
      "print'the acceleration of the centre of mass is',acm,'m/s**2 and is in the direction of the resultant force'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the acceleration of the centre of mass is 1.59 m/s**2 and is in the direction of the resultant force\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E8w : Pg 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.8w\n",
      "# calculation of the distance from launching point\n",
      "\n",
      "# given data\n",
      "u=100.# speed(in m/s) of the projectile\n",
      "theta=37.# angle(in degree) of the projectile above horizontal\n",
      "g=10.# gravitational acceleration(in m/s**2) of the earth\n",
      "\n",
      "# calculation\n",
      "xcm=961.;#(2.*u*u*sind(theta)*cosd(theta))/g# range of original projectile\n",
      "# also   xcm=((m1*x1)+(m2*x2))/(m1+m2)\n",
      "# here m1=M/4   and    m2=3*M/4 \n",
      "x1=xcm/2.# since small part falls from heighest point i.e half of range\n",
      "x2=(4./3.)*((xcm*((1./4.)+(3./4.)))-(x1/4.))\n",
      "\n",
      "print'the distance of landing of heavier piece from launching point is',round(x2,2),'m'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance of landing of heavier piece from launching point is 1121.17 m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9w : Pg 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.9w\n",
      "# calculation of the distance moved by the bigger block\n",
      "# given data\n",
      "L=2.2# length(in m) of the base\n",
      "n=10.#  mass of bigger block is 'n' number of times the mass of smaller block\n",
      "# calculation\n",
      "# centre of mass at rest initially will remain in horizontal position thus\n",
      "# M*(L-X)=10*M*X\n",
      "X=L/(n+1.)\n",
      "print'distance moved by the bigger block at the instant the smaller block reaches the ground is',X,'m'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "distance moved by the bigger block at the instant the smaller block reaches the ground is 0.2 m\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10w : Pg 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.10w\n",
      "# calculation of the average force exerted by the hero on the machine gun\n",
      "\n",
      "# given data\n",
      "m=50.*10.**-3.# mass(in kg) of the bullet\n",
      "v=1.*10.**3.# velocity(in m/s) of the bullet\n",
      "n=20.# number of bullets fired\n",
      "t=4.# time(in s) required in firing the bullets\n",
      "\n",
      "# calculation\n",
      "me=m*v# momentumof each bullet\n",
      "f=me*n/t# force=rate of change of momentum\n",
      "\n",
      "print'the average force exerted by the hero on the machine gun is',f,'N'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the average force exerted by the hero on the machine gun is 250.0 N\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E11w : Pg 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.11w\n",
      "# calculation of the fractional change in kinetic energy\n",
      "\n",
      "# given data\n",
      "vb=20.# speed(in m/s) of the block\n",
      "v1=30.# velocity(in m/s) of one of the part\n",
      "\n",
      "# calculation\n",
      "M=1.# taking mass M=1 kg  for solving the equation\n",
      "v=(1./M)*((M*vb*2.)-(M*v1))# principle of conservation of linear momentum \n",
      "deltake=(M*v1*v1/(2.*2.))+(M*v*v/(2.*2.))-(M*vb*vb/2.)# change in the kinetic energy\n",
      "fdeltake=deltake/(M*vb*vb/2)# fractional change in the kinetic energy\n",
      "\n",
      "print'the fractional change in the kinetic energy is',fdeltake"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the fractional change in the kinetic energy is 0.25\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E13w : Pg 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.13w\n",
      "# calculation of the final velocity of the shuttle\n",
      "\n",
      "# given data\n",
      "v1=4000.# speed(in km/hr) of shuttle with respect to the earth\n",
      "v2=100.# speed(in km/hr) of the module with respect to the shuttle\n",
      "\n",
      "# calculation\n",
      "M=1.# taking mass M=1 kg  for solving the equation\n",
      "vdash=v1-v2# speed of module with respect to the earth\n",
      "V=(1./5.)*((1.*v1*6.)-(vdash*1.))# principle of conservation of linear momentum \n",
      "\n",
      "print'the final velocity of the shuttle is',V,'km/h'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the final velocity of the shuttle is 4020.0 km/h\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E14w : Pg 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.14w\n",
      "# calculation of the velocity with which the board recoils \n",
      "\n",
      "# given data\n",
      "m1=25.# mass(in kg) of the boy\n",
      "m2=10.# mass(in kg) of the board\n",
      "v1=5.# velocity(in m/s) of the boy\n",
      "\n",
      "# calculation\n",
      "v=(m1*v1)/m2# principle of conservation of linear momentum\n",
      "vsep=v1+v# velocity of separation\n",
      "\n",
      "print'the velocity with which the board recoils is',v,'m/s'\n",
      "print'the velocity of separation of the boy and the board is',vsep,'m/s'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the velocity with which the board recoils is 12.5 m/s\n",
        "the velocity of separation of the boy and the board is 17.5 m/s\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E17w : Pg 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.17w\n",
      "# calculation of the speed of the bullet\n",
      "# given data\n",
      "import math \n",
      "mb=50.*10.**-3.# mass(in kg) of the bullet\n",
      "mp=450.*10.**-3.# mass(in kg) of the bob\n",
      "h=1.8# height(in m) attained by the bob\n",
      "g=10.# gravitational acceleration(in m/s**2) of the earth\n",
      "# calculation\n",
      "# using principle of conservation of linear momentum  and equation of motion (v*v) = (u*u) + (2*a*x)\n",
      "v=((mb+mp)*(math.sqrt(h*2.*g)))/mb\n",
      "\n",
      "print'the speed of the bullet is',v,'m/s'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of the bullet is 60.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E22w : Pg 155"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# developed in windows XP operating system 32bit\n",
      "# platform Scilab 5.4.1\n",
      "#clc;clear;\n",
      "# example 9.22w\n",
      "# calculation of the loss of kinetic energy due to the collision\n",
      "\n",
      "# given data\n",
      "m=1.2# mass(in kg) of the block1\n",
      "v=20.*10.**-2.# velocity(in m/s) of the approach\n",
      "e=3./5.# value of coefficient of restitution\n",
      "vdash=e*v# velocity (in m/s) of the separation\n",
      "\n",
      "# calculation\n",
      "# by principle of conservation of linear momentum ....v1 + v2 = v m/s.....(1)\n",
      "# as the coefficient of restitution is 3/5............v2 - v1 = vdash m/s.....(2)\n",
      "# from equation (1),we get.......v2=v-v1\n",
      "# substituting v2 in equation (2),we get\n",
      "v1=(v-vdash)/2.\n",
      "v2=v-v1# from equation (1)\n",
      "lke=(m/2.)*((v*v)-(v1*v1)-(v2*v2))\n",
      "\n",
      "print'the loss of kinetic energy during the collision is',lke,'J'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the loss of kinetic energy during the collision is 0.00768 J\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}