{
 "metadata": {
  "name": "",
  "signature": "sha256:44a7ee8bf26f9edf15a5d80a8ba17ba5be989b77884cdc1289de3bb40b0e7b99"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 Electric field"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1 Page no 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "V=1000\n",
      "d=10.0*10**-3\n",
      "m=4.8*10**-15\n",
      "g=10\n",
      "e=1.6*10**-19\n",
      "\n",
      "#Calculation\n",
      "E=V/d\n",
      "q=m*g/E\n",
      "n=q/e\n",
      "\n",
      "#Result\n",
      "print\"The number of electrons on the drop \", n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of electrons on the drop  3.0\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2 Page no 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "e=1.6*10**-19\n",
      "E=3*10**4\n",
      "m=9.0*10**-31\n",
      "y1=4*10**-2\n",
      "m2=1.67*10**-27\n",
      "\n",
      "#Calculation\n",
      "a=e*E/m\n",
      "t=math.sqrt((2*y1)/a)\n",
      "a2=e*E/m2\n",
      "t2=math.sqrt((2*y1)/a2)\n",
      "\n",
      "#Result\n",
      "print\"Time t1=\", round(t*10**9,1)*10**-9,\"S\",\"\\nTime t2=\",round(t2*10**7,2)*10**-7,\"S\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Time t1= 3.9e-09 S \n",
        "Time t2= 1.67e-07 S\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3 Page no 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "r=1                   #m\n",
      "m=9*10**9\n",
      "q=500*10**-6\n",
      "r1=0.3               #m\n",
      "\n",
      "#Calculation\n",
      "E=m*q/r**2\n",
      "E2=m*q/r1**2\n",
      "\n",
      "#Result\n",
      "print\"(i) Electric field intensity from the centre of the sphere \",E*10**-6,\"10**6\",\"N/C\"\n",
      "print\"(ii) Electric field intensity at the surface of the sphere is \",E2*10**-7,\"10**7 N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Electric field intensity from the centre of the sphere  4.5 10**6 N/C\n",
        "(ii) Electric field intensity at the surface of the sphere is  5.0 10**7 N/C\n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 Page no 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=2*10**-8\n",
      "E=2*10**4\n",
      "m=80*10**-6\n",
      "g=9.8\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "a=q*E/(m*g)\n",
      "b=math.atan(a)*180/3.14\n",
      "T=(q*E/(math.sin(b*3.14/180.0)))*10**-4\n",
      "\n",
      "#Result\n",
      "print\"The angle is \", round(b,0),\"degree\"\n",
      "print\"Tension in the thread of the pendulum is \", round(T*10**8,2),\"*10**-4 N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angle is  27.0 degree\n",
        "Tension in the thread of the pendulum is  8.8 *10**-4 N\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 Page no 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "m=9*10**9\n",
      "r=0.707\n",
      "q=5*10**-6\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "E=m*q/r**2                    #along AO\n",
      "E2=m*q/r**2                   #along BO\n",
      "E3=m*q/r**2                   #along OD\n",
      "E11=E+E2\n",
      "E12=E2+E3\n",
      "I=(2*E11*r)*10**-4\n",
      "\n",
      "#Result\n",
      "print\"Electric field at the centre of the sphere is \",round(I,2),\"*10**4 N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electric field at the centre of the sphere is  25.46 *10**4 N/C\n"
       ]
      }
     ],
     "prompt_number": 53
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6 Page no 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=5*10**-9\n",
      "x=0.15                  #m\n",
      "r=0.1                     #m\n",
      "a=9*10**9\n",
      "\n",
      "#Calculation\n",
      "E=(a*q*x)/((r**2+x**2))**1.5\n",
      "\n",
      "#Result\n",
      "print\"Intensity of the electric field is \", round(E,0),\"N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Intensity of the electric field is  1152.0 N/C\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7 Page no 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "m=10**-3\n",
      "F=1\n",
      "v0=20\n",
      "v=0\n",
      "\n",
      "#Calculation\n",
      "a=-F/m\n",
      "s=v**2-v0**2/(2.0*a)\n",
      "\n",
      "#Result\n",
      "print\"The distance is \", s,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The distance is  0.2 m\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9 Page no 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "m=9*10**9\n",
      "q1=1/3.0*10**-7\n",
      "r=5*10**-2\n",
      "F=58.8*10**-3\n",
      "\n",
      "#Calculation\n",
      "q2=F*r**2/(q1*m)\n",
      "\n",
      "#Result\n",
      "print\"Charge is \", q2,\"C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Charge is  4.9e-07 C\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10 Page no 61"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=4*10**5                   #V/m\n",
      "q=3.2*10**-19\n",
      "a=2.4*10**-10\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "p=q*a\n",
      "W=p*E*(1-(math.cos(180*180/3.14)))\n",
      "\n",
      "#Result\n",
      "print\"Work done is \", W"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work done is  2.79670959474e-23\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.11 Page no 61"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=16*10**-19\n",
      "a=3.9*10**-12\n",
      "E=10**5\n",
      "\n",
      "#Calculation\n",
      "p=q*a\n",
      "U=-p*E\n",
      "\n",
      "#Result\n",
      "print\"(i) The electric dipole moment \", p,\"Cm\"\n",
      "print\"(ii) Potential energy of dipole in the stable equilibrium position \",U,\"J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The electric dipole moment  6.24e-30 Cm\n",
        "(ii) Potential energy of dipole in the stable equilibrium position  -6.24e-25 J\n"
       ]
      }
     ],
     "prompt_number": 45
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.12 Page no 61"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=20*10**-6\n",
      "a=10**-2\n",
      "m=9*10**9\n",
      "r=0.1\n",
      "\n",
      "#Calculation\n",
      "p=q*a\n",
      "E=m*2*p/r**3\n",
      "\n",
      "#Result\n",
      "print\"Electric field intensity is \", E*10**-5,\"*10**5  N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electric field intensity is  36.0 *10**5  N/C\n"
       ]
      }
     ],
     "prompt_number": 51
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.13 Page no 62"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=4*10**5\n",
      "q=1*10**-6\n",
      "a=3*10**-2\n",
      "\n",
      "#Calculation\n",
      "t=q*a*E\n",
      "\n",
      "#Result\n",
      "print\"Maximum torque on the dipole is \", t*10**2,\"*10**-2 Nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum torque on the dipole is  1.2 *10**-2 Nm\n"
       ]
      }
     ],
     "prompt_number": 55
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.14 Page no 62"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=1*10**-6\n",
      "a=2*10**-2\n",
      "E=10**5\n",
      "\n",
      "#Calculation\n",
      "p=q*a\n",
      "W=2*p*E\n",
      "\n",
      "#Result\n",
      "print\"Work done in the rotation is \", W*10**3,\"*10**-3 J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work done in the rotation is  4.0 *10**-3 J\n"
       ]
      }
     ],
     "prompt_number": 60
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.15 Page no 62"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "q=2*10**-6\n",
      "a=0.1\n",
      "m=9*10**9\n",
      "r=0.5\n",
      "\n",
      "#Calculation\n",
      "p=q*a\n",
      "E=m*p/r**3\n",
      "\n",
      "#Result\n",
      "print\"Electric field intensity is \",E*10**-4,\"*10**4 N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electric field intensity is  1.44 *10**4 N/C\n"
       ]
      }
     ],
     "prompt_number": 65
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.16 Page no 62"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "qa=2.5*10**-7\n",
      "qb=-2.5*10**-7\n",
      "a=15\n",
      "b=15\n",
      "\n",
      "#Calculation\n",
      "q=qa+qb\n",
      "C=(a+b)*10**-2\n",
      "E=qa*C\n",
      "\n",
      "#Result\n",
      "print\"Total charge is \", q,\"\\nElectric dipole moment of the system is \",E,\"Cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total charge is  0.0 \n",
        "Electric dipole moment of the system is  7.5e-08 Cm\n"
       ]
      }
     ],
     "prompt_number": 71
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.17 Page no 63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "p=2*10**-8\n",
      "m=9*10**9\n",
      "r=1.0\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "b=3*math.cos(60*3.14/180.0)**2+1\n",
      "a=p*math.sqrt(b)\n",
      "E=(m*a)/r**3\n",
      "\n",
      "#Result\n",
      "print\"Magnitude of electric intensity is\", round(E,1),\"N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of electric intensity is 238.2 N/C\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.18 Page no 63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "p=5*10**-8\n",
      "m=9*10**9\n",
      "r=0.15\n",
      "\n",
      "#Calculation\n",
      "E=m*2*p/r**3\n",
      "E1=m*p/r**3\n",
      "\n",
      "print\"(i) Electric field along AB is \", round(E*10**-5,2),\"*10**5 N/C\"\n",
      "print\"(ii) Electric field along BA is \", round(E1*10**-5,2),\"*10**5 N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Electric field along AB is  2.67 *10**5 N/C\n",
        "(ii) Electric field along BA is  1.33 *10**5 N/C\n"
       ]
      }
     ],
     "prompt_number": 89
    }
   ],
   "metadata": {}
  }
 ]
}