{
 "metadata": {
  "name": "",
  "signature": "sha256:e80ebd48105c3dca8e86ef67be44a3d44d3612d800c7b38a96862d9724bef08f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER11 : GRAVITATION"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 : Pg 204"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.1\n",
      "#calculation of the initial acceleration of the particles\n",
      "\n",
      "#given data\n",
      "m1=1.#masss(in kg) of particle1\n",
      "m2=2.#masss(in kg) of particle2\n",
      "r=50.*10.**-2.#separation(in m) between the two particles\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "\n",
      "#calculation\n",
      "F=G*m1*m2/(r*r)#force of gravitation\n",
      "a1=F/m1#initial acceleration of the particle1\n",
      "a2=F/m2#initial acceleration of the particle2\n",
      "\n",
      "print '%s %.2f %s' %(\"the initial acceleration of the particle1 towards particle2 is\",a1,\"m/s**2\")\n",
      "print '%s %.2f %s' %(\"the initial acceleration of the particle2 towards particle1 is\",a2,\"m/s**2\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the initial acceleration of the particle1 towards particle2 is 0.00 m/s**2\n",
        "the initial acceleration of the particle2 towards particle1 is 0.00 m/s**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 : Pg 207"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.2\n",
      "#calculation of the work done in bringing three particles together\n",
      "\n",
      "#given data\n",
      "m1=100.*10.**-3.#masss(in kg) of particle1\n",
      "r=20.*10.**-2.#separation(in m) between the two particles\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "\n",
      "#calculation\n",
      "#since the work done by the gravitational force is equal to change in the potential energy\n",
      "U=3.*(-G*m1*m1/r)\n",
      "\n",
      "print '%s %.2f %s' %(\"the work done in bringing three particles is\",U,\"J\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the work done in bringing three particles is -0.00 J\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 : Pg 210"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.4\n",
      "#calculation of the gravitational field \n",
      "\n",
      "#given data\n",
      "F=2.#gravitational force(in N)\n",
      "m=50.*10.**-3.#mass(in kg) of the particle\n",
      "\n",
      "#calculation\n",
      "E=F/m#gravitational field \n",
      "\n",
      "print '%s %.2f %s' %(\"the gravitational field along the direction of force is\",E,\"N/kg\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the gravitational field along the direction of force is 40.00 N/kg\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E7 : Pg 214"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.7\n",
      "#calculation of the gravitational field due to the moon at its surface\n",
      "\n",
      "#given data\n",
      "M=7.36*10.**22.#mass(in kg) of the moon\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "a=1.74*10.**6.#radius(in m) of the moon\n",
      "\n",
      "#calculation\n",
      "E=G*M/(a*a)#formula of gravitational field\n",
      "\n",
      "print '%s %.2f %s' %(\"the gravitational field due to the moon at its surface is\",E,\"N/kg\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the gravitational field due to the moon at its surface is 1.62 N/kg\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E8 : Pg 215"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#example 11.8\n",
      "#calculation of the value of acceleration due to gavity\n",
      "\n",
      "#given data\n",
      "h=5.*10.**3.#height(in m) above the earth's surface\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "g0=9.8#gravitational acceleration(in m/s**2) of the earth\n",
      "d=5.*10.**3.#depth(in m) below the earth's surface\n",
      "\n",
      "#calculation\n",
      "gh=g0*(1.-(2.*h/R))#formula of gravitational acceleration at height h above the earth's surface\n",
      "gd=g0*(1.-(d/R))#formula of gravitational acceleration at depth d below the earth's surface\n",
      "\n",
      "print '%s %.2f %s' %(\"the value of gravitational acceleration at height 5 km above the earth surface is\",gh,\"m/s**2\\n\")\n",
      "print '%s %.2f %s' %(\"the value of gravitational acceleration at depth 5 km below the earth surface is\",gd,\"m/s**2\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the value of gravitational acceleration at height 5 km above the earth surface is 9.78 m/s**2\n",
        "\n",
        "the value of gravitational acceleration at depth 5 km below the earth surface is 9.79 m/s**2\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9 : Pg 216"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.9\n",
      "#calculation of the speed and time period of the satellite \n",
      "\n",
      "#given data\n",
      "h=600.*10.**3.#height(in m) of the satellite\n",
      "M=6.*10.**24.#mass(in kg) of the earth\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "\n",
      "#calculation\n",
      "a=h+R#distance of satellite from centre of the earth\n",
      "v=math.sqrt(G*M/a)#speed of satellite\n",
      "T=(2.*math.pi*a)/v#time period of satellite\n",
      "\n",
      "print '%s %.2f %s %.2f %s' %(\"the speed of the satellite is\",v,\"m/s\\n or\",v*10**-3,\"km/s\\n\")\n",
      "print '%s %.2f %s' %(\"the time period of the satellite is\",T,\"s\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of the satellite is 7561.18 m/s\n",
        " or 7.56 km/s\n",
        "\n",
        "the time period of the satellite is 5816.86 s\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10 : Pg 218"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.10\n",
      "#calculation of the escape velocity from the moon\n",
      "\n",
      "#given data\n",
      "M=7.4*10.**22.#mass(in kg) of the moon\n",
      "R=1740.*10.**3.#radius(in m) of the moon\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "\n",
      "#calculation\n",
      "v=math.sqrt(2.*G*M/R)#formula of the escape velocity\n",
      "\n",
      "print '%s %.2f %s' %(\"the escape velocity from the moon is\",v*10**-3,\"km/s\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the escape velocity from the moon is 2.38 km/s\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "WORKED EXAMPLES "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2w : Pg 220"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.2w\n",
      "#calculation of the distance from the earth's surface where resultant gravitational field due to the earth and the moon is zero\n",
      "\n",
      "#given data\n",
      "Me=6.*10.**24.#mass(in kg) of the earth\n",
      "Mm=7.4*10.**22.#mass(in kg) of the moon\n",
      "d=4.*10.**5.*10.**3.#distance(in m) between the earth and the moon \n",
      "\n",
      "#calculation\n",
      "#gravitational field due to the earth at that point\n",
      "#E1 = G*Me/x**2.........................(1)\n",
      "#gravitational field due to the moon at that point\n",
      "#E2 = G*Mm/(d-x)**2.....................(2)\n",
      "#E1 = E2.....given \n",
      "x=(d*math.sqrt(Me/Mm))/(1.+math.sqrt(Me/Mm))\n",
      "\n",
      "print '%s %.2f %s' %(\"the distance from the earth surface where resultant gravitational field due to the earth and the moon is zero is\",x*10**-3,\"km\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance from the earth surface where resultant gravitational field due to the earth and the moon is zero is 360018.01 km\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4w : Pg 220"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.4w\n",
      "#calculation of the separation between the particles under mutual attraction\n",
      "\n",
      "#given data\n",
      "mA=1.#mass(in kg) of particle A\n",
      "mB=2.#mass(in kg) of particle B\n",
      "R=1.#initial distance(in m) between the two particles\n",
      "vB=3.6*10.**-2./(60.*60.)#speed(in m/s) of the particle B\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "\n",
      "#calculation\n",
      "v=(mB*vB)/mA#principle of conservation of linear momentum\n",
      "U1=-G*mA*mB/R#initial potential energy of the pair\n",
      "d=U1/(U1-(mB*vB*vB/2.)-(mA*v*v/2.))#principle of conservation of energy\n",
      "\n",
      "print '%s %.2f %s' %(\"the speed of particle A is\",v,\"m/s\\n\")\n",
      "print '%s %.2f %s' %(\"the separation between the particles under mutual attraction is\",d,\"m\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of particle A is 0.00 m/s\n",
        "\n",
        "the separation between the particles under mutual attraction is 0.31 m\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5w : Pg 220"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.5w\n",
      "#calculation of the work done by an external agent\n",
      "\n",
      "#given data\n",
      "#E = (10 N/kg)(i + j).....given gravitational field\n",
      "Ex=10.#value of X-component of gravitational field(in N/kg)\n",
      "Ey=10.#value of Y-component of gravitational field(in N/kg)\n",
      "m=2.#mass(in kg) of the gravitational field\n",
      "x0=0#value of X component of initial location(in m)\n",
      "x1=5.#value of X component of final location(in m)\n",
      "y0=0#value of Y component of initial location(in m)\n",
      "y1=4.#value of Y component of final location(in m)\n",
      "\n",
      "#calculation\n",
      "def fx(x) :\n",
      "    Fx=m*Ex#value of X component of force\n",
      "    return Fx\n",
      "\n",
      "def fy(x):\n",
      "\tFy=m*Ey\n",
      "\treturn Fy\n",
      "\n",
      "#calculation\n",
      "W1=100.;#integrate('fx','x',x0,x1)#work done by X component of external force\n",
      "W2=80.;#integrate('fy','x',y0,y1)#work done by Y component of external force \n",
      "\n",
      "W=W1+W2\n",
      "\n",
      "print '%s %.2f %s' %(\"the work done by the external agent is\",-W,\"J\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the work done by the external agent is -180.00 J\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9w : Pg 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.9w\n",
      "#calculation of the maximum height attained by the particle\n",
      "\n",
      "#given data\n",
      "v0=9.8*10.**3.#speed(in m/s) the particle is fired\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "g=9.8#gravitational acceleration(in m/s**2) of the earth\n",
      "\n",
      "#calculation\n",
      "#by the principle of conservation of energy\n",
      "#(-G*M*m/R) + (m*v0*v0/2) = -(G*M*m/(R+H))\n",
      "H=(R*R/(R-(v0*v0/(2.*g))))-R\n",
      "\n",
      "print '%s %.2f %s' %(\"the maximum height attained by the particle is\",H*10**-3,\"km\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the maximum height attained by the particle is 20906.67 km\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10w : Pg 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.10w\n",
      "#calculation of the stretch produced in the spring\n",
      "#given data\n",
      "d=1.*10.**-2.#stretch(in m) of the spring\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "h=800.*10.**3.#height(in m) above the earths surface\n",
      "\n",
      "#calculation\n",
      "#The extension in the spring on the surface is \n",
      "#1*10**-2 = (G*M*m)/(k*R**2)...........(1)\n",
      "#The extension in the spring at height h above the surface\n",
      "#x = (G*M*m)/(k*(R+h)**2).............(2)\n",
      "#from above equations,we get\n",
      "x=d*((R**2.)/(R+h)**2.)\n",
      "\n",
      "print '%s %.2f %s' %(\"the stretch produced in the spring is\",x*10**2,\"cm\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the stretch produced in the spring is 0.79 cm\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E11w : Pg 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.11w\n",
      "#calculation of time period of the pendulum if used at the equator\n",
      "\n",
      "#given data\n",
      "t=2.#time period (in s) of the pendulum at North pole\n",
      "g=9.8#gravitational acceleration(in m/s**2) of the earth\n",
      "G=6.67*10.**-11.#universal constant of gravitation(in N-m**2/kg**2)\n",
      "w=(2.*math.pi)/(24.*60.*60.)#angular velocity(in rad/s) of the earth\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "\n",
      "#calculation\n",
      "#By equilibrium conditions,we get\n",
      "#t = 2*%pi*sqrt(l/g)..............................(1)\n",
      "#tdash = 2*%pi*sqrt(l/(g-(w*w*R)).................(2)\n",
      "#from equations (1) and (2),we get\n",
      "tdash=t*(1.+(w*w*R/(2.*g)))\n",
      "\n",
      "print '%s %.2f %s' %(\"the value of time period of the pendulum if used at the equator is\",tdash,\"s\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the value of time period of the pendulum if used at the equator is 2.00 s\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E12w : Pg 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.12w\n",
      "#calculation of the speed of projection of the satellite into an orbit\n",
      "\n",
      "#given data\n",
      "r=8000.*10.**3.#radius(in m) of the orbit of the satellite\n",
      "R=6400.*10.**3.#radius(in m) of the earth\n",
      "g=9.8#gravitational acceleration(in m/s**2) of the earth\n",
      "\n",
      "#calculation\n",
      "#using Newtons second law\n",
      "#(G*M*m/(r*r)) = m*v*v/r\n",
      "v=math.sqrt(g*R*R/r)\n",
      "t=(2.*math.pi*r/v)#time period of the satellite\n",
      "\n",
      "print '%s %.2f %s' %(\"the speed of projection of the satellite into the orbit is\",v*10**-3,\"km/s\\n\")\n",
      "print '%s %.2f %s' %(\"the time period of the satellite in the orbit is\",t*(1/(60)),\"minutes\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of projection of the satellite into the orbit is 7.08 km/s\n",
        "\n",
        "the time period of the satellite in the orbit is 0.00 minutes\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E13w : Pg 223"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#example 11.13w\n",
      "#calculation of the speed and the angular speed of the satellite S2 relative to the satellite S1\n",
      "\n",
      "#given data\n",
      "T1=1.#period of revolution(in h) of satellite S1\n",
      "T2=8.#period of revolution(in h) of satellite S2\n",
      "R1=10.**4.#radius(in km) of the orbit of satellite S1\n",
      "\n",
      "#calculation\n",
      "#by Kelplers third law\n",
      "#(R2/R1)**3 = (T2/T1)**2\n",
      "R2=R1*(((T2/T1)**2.)**(1./3.))\n",
      "v1=(2.*math.pi*R1/T1)#speed(in km/h) of satellite S1\n",
      "v2=(2.*math.pi*R2/T2)#speed(in km/h) of satellite S2\n",
      "v=abs(v2-v1)#speed of satellite S2 with respect to satellite S1\n",
      "w=v/(R2-R1)#angular speed of satellite S2 as observed by an astronaut in satellite S1\n",
      "\n",
      "print '%s %.2f %s' %(\"the speed of the satellite S2 with respect to the satellite S1 is\",v,\"km/h\\n\")\n",
      "print '%s %.2f %s' %(\"the angular speed of the satellite S2 as observed by an astronaut in the satellite S1 is\",w,\"rad/h\\n\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of the satellite S2 with respect to the satellite S1 is 31415.93 km/h\n",
        "\n",
        "the angular speed of the satellite S2 as observed by an astronaut in the satellite S1 is 1.05 rad/h\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}