{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter07: Motion in a Cirlce"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.1:pg-208"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " 70 degrees in radians is  1.22 radians \n",
      " 70 degrees in revolutions it is  0.194  revolutions\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_1\n",
    " \n",
    "  \n",
    "  #To convert angles to radians and revolutions\n",
    "theta=70.0      #units in degrees\n",
    "deg=360.0     #units in degrees\n",
    "rad=theta*2*math.pi/deg      #units in radians\n",
    "rev=1     #units in revolution\n",
    "rev=theta*rev/deg       #units in revolution\n",
    "print \" 70 degrees in radians is \",round(rad,2),\"radians \\n 70 degrees in revolutions it is \",round(rev,3),\" revolutions\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.2:pg-209"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average angular velocity is w= 188.0  rad/sec\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_2\n",
    " \n",
    "  \n",
    "#To find average angular velocity\n",
    "theta=1800.0     #units in rev\n",
    "t=60.0      #units in sec\n",
    "w=(theta/t)     #units in rev/sec\n",
    "w=w*(2*math.pi)      #units in rad/sec\n",
    "print \"Average angular velocity is w=\",round(w),\" rad/sec\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.3:pg-210"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average angular acceleration is alpha= 2.0  rev/sec**2\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_3\n",
    " \n",
    "  \n",
    "  #To find average angular acceleration\n",
    "wf=240.0     #units in rev/sec\n",
    "w0=0      #units in rev/sec\n",
    "t=2.0     #units in minutes\n",
    "t=t*60     #units in sec\n",
    "alpha=(wf-w0)/t      #units in rev/sec**2\n",
    "print \"Average angular acceleration is alpha=\",round(alpha),\" rev/sec**2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.4:pg-212"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Number of revolutions does it turn before rest is theta= -108.0  rev\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_4\n",
    " \n",
    "  \n",
    "#To find out how many revolutions does it turn before rest\n",
    "wf=0     #units in rev/sec\n",
    "w0=3      #units in rev/sec\n",
    "t=18     #units in sec\n",
    "alpha=(wf-w0)/t      #units in rev/sec**2\n",
    "theta=(w0*t)+0.5*(alpha*t**2)         #units in rev\n",
    "print \"Number of revolutions does it turn before rest is theta=\",round(theta),\" rev\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.5:pg-212"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Angular accelertion is a= 2.22  meters/sec**2\n",
      "\n",
      "Angular velocity is alpha= 5.56  rad/sec**2\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_5\n",
    " \n",
    "  \n",
    "  #To find the angular acceleration and angular velocity of one wheel\n",
    "vtf=20.0     #units in meters/sec\n",
    "r=0.4      #units in meters\n",
    "wf=vtf/r     #units in rad/sec\n",
    "vf=20.0     #units in meters/sec\n",
    "v0=0      #units in meters/sec**2\n",
    "t=9.0     #units in sec\n",
    "a=(vf-v0)/t     #units in meters/sec**2\n",
    "alpha=a/r       #units in rad/sec**2\n",
    "print \"Angular accelertion is a=\",round(a,2),\" meters/sec**2\\n\"\n",
    "print \"Angular velocity is alpha=\",round(alpha,2),\" rad/sec**2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.6:pg-213"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The rotation rate is wf= 129.0  rad/sec\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_6\n",
    " \n",
    "  \n",
    "  #To find out the rotation rate\n",
    "at=8.6     #units in meters/sec**2\n",
    "r=0.2      #units in meters\n",
    "alpha=at/r      #units in rad/sec**2\n",
    "t=3     #units in sec\n",
    "wf=alpha*t     #units in rad/sec\n",
    "print \"The rotation rate is wf=\",round(wf),\" rad/sec\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.7:pg-215"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The horizontal force must the pavement exerts is F= 8533.0  Newtons\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_7\n",
    " \n",
    "  \n",
    "  #To calculate how large a horizontal force must the pavement exert\n",
    "m=1200.0     #units in Kg\n",
    "v=8.0     #units in meters/sec\n",
    "r=9      #units in meters\n",
    "F=(m*v**2)/r         #units in Newtons\n",
    "print \"The horizontal force must the pavement exerts is F=\",round(F),\" Newtons\"\n",
    "  #In text book the answer is printed wrong as F=8530 N but the correct answer is 8533 N\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.9:pg-220"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The angle where it should be banked is theta= 47.0  degrees\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_9\n",
    " \n",
    "  \n",
    "  #To find out the angle where it should be banked\n",
    "v=25     #units in meters/sec\n",
    "r=60     #units in meters\n",
    "g=9.8     #units in meters/sec**2\n",
    "tantheta=v**2/(r*g)        #units in radians\n",
    "theta=math.atan(tantheta)*180/math.pi\n",
    "print \"The angle where it should be banked is theta=\",round(theta),\" degrees\",\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.10:pg-220"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The F/W Ratio is= 1.36e-14\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_10\n",
    " \n",
    "  \n",
    "  #To find out the ratio of F/W\n",
    "G=6.67*10**-11     #units in Newton meter**2/Kg**2\n",
    "m1=0.0080      #units in Kgs\n",
    "m2=0.0080      #units in Kgs\n",
    "r=2     #units in Meters\n",
    "F=(G*m1*m2)/r**2      #units in Newtons\n",
    "m=m1      #units in Kgs\n",
    "g=9.8     #units in meter/sec**2\n",
    "W=m*g     #units in Newtons\n",
    "F_W=F/W\n",
    "print \"The F/W Ratio is=\",round(F_W,16)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.11:pg-221"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The mass of the sun is Ms= 2.01e+30 Kg\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_11\n",
    " \n",
    "  \n",
    "  #To find the mass of the sun\n",
    "t=3.15*10**7     #units in sec\n",
    "r=1.5*10**11     #units in meters\n",
    "v=(2*math.pi*r)/t     #units in meters/sec\n",
    "G=6.67*10**-11     #units in Newtons\n",
    "ms=(v**2*r)/G           #Units in Kg\n",
    "print \"The mass of the sun is Ms=\",round(ms,-28),\"Kg\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.12:pg-222"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The orbital radius is r=  42250474.0  meters\n",
      "\n",
      "The orbital speed is v= 3073.0  meters/sec\n"
     ]
    }
   ],
   "source": [
    "  import math  #Example 7_12\n",
    " \n",
    "  \n",
    "  #To findout the orbital radius and its speed\n",
    "G=6.67*10**-11     #units in Newtons\n",
    "me=5.98*10**24     #units in Kg\n",
    "t=86400.0    #units in sec\n",
    "r=((G*me*t**2)/(4*math.pi**2))**(1/3.0)\n",
    "print \"The orbital radius is r= \",round(r),\" meters\\n\"\n",
    "v=(2*math.pi*r)/t      #units in meters/sec\n",
    "print \"The orbital speed is v=\",round(v),\" meters/sec\"\n",
    "  #in textbook the answer is printed wrong as v=3070 m/sec but the correct answer is v=3073 m/sec\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}