{
 "metadata": {
  "name": "",
  "signature": "sha256:59a10421d0b18543bcaaf15fad8dcc2fa1ef98c5fe857c6feab5eddfb8fae6cd"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 Capacitor"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1 Page no 108"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "r=6.4*10**6          #m\n",
      "t=9*10**9\n",
      "\n",
      "#Calculation\n",
      "C=r/t\n",
      "\n",
      "#Result\n",
      "print\"The capacitance is\",round(C*10**6,0),\"F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The capacitance is 711.0 F\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Example 5.2 Page no 108"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "r=0.01              #m\n",
      "q=1                 #C\n",
      "d=9.0*10**9\n",
      "\n",
      "#Calculation\n",
      "V=(q*d)/r\n",
      "\n",
      "#Result\n",
      "print\"V=\",V,\"V\"\n",
      "print\"The given metal sphere will not be able to hold charge of 1 C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V= 9e+11 V\n",
        "The given metal sphere will not be able to hold charge of 1 C\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3 Page no 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "R=3\n",
      "Q=27\n",
      "q=4*220\n",
      "\n",
      "#Calculation\n",
      "d=(Q*q)/(4*R)\n",
      "\n",
      "#Result\n",
      "print\"The potential of the bigger drop is\",d,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The potential of the bigger drop is 1980 V\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Example 5.4 Page no 109"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C=2               #F\n",
      "d=0.5*10**-2      #m\n",
      "a=8.854*10**-12\n",
      "\n",
      "#Calculation\n",
      "Q=(C*d)/a\n",
      "\n",
      "#Result\n",
      "print\"Area of the plate is\", round(Q*10**-9,2),\"*10**9 m**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Area of the plate is 1.13 *10**9 m**2\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.5 Page no 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "A=10**-2                         #m**2\n",
      "d=10**-3                           #m\n",
      "q=0.12*10**-6\n",
      "V=120.0\n",
      "e=8.85*10**-12\n",
      "\n",
      "#Calculation\n",
      "C=q/V\n",
      "K=C*d/(e*A)\n",
      "\n",
      "#Result\n",
      "print\"Dielectric constant of the material is\", round(K,1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dielectric constant of the material is 11.3\n"
       ]
      }
     ],
     "prompt_number": 40
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.6 Page no 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "A1=100.0                            #cm**2\n",
      "A2=500                             #cm**2\n",
      "d1=0.05                            #cm\n",
      "\n",
      "#Calculation\n",
      "d2=(A2*d1)/A1\n",
      "\n",
      "#Result\n",
      "print\"Difference between the plates of second capacitor is\", d2,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Difference between the plates of second capacitor is 0.25 cm\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.7 Page no 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=6.45*10**6                      #m\n",
      "b=6.4*10**6                       #m\n",
      "m=9*10**9\n",
      "\n",
      "#Calculation\n",
      "C=(a*b)/(m*(a-b))\n",
      "\n",
      "#Result\n",
      "print\"Capacitance of the spherical capacitor is\",round(C,3),\"F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance of the spherical capacitor is 0.092 F\n"
       ]
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.8 Page no 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=12*10**-2                     #m\n",
      "b=13*10**-2                      #m\n",
      "q=2.5*10**-6                    #C\n",
      "K=32\n",
      "m=9.0*10**9\n",
      "\n",
      "#Calculation\n",
      "C=(K*a*b)/(m*(b-a))\n",
      "V=q/C\n",
      "C1=a/m\n",
      "C2=C/C1\n",
      "\n",
      "#Result\n",
      "print\"(a) Capacitance of the capacitor is\", round(C*10**9,3)*10**-9,\"F\"\n",
      "print\"(b) Potential of the inner sphere is\", round(V,1),\"V\"\n",
      "print\"(c) Capacitance of the capacitor is\",C2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Capacitance of the capacitor is 5.547e-09 F\n",
        "(b) Potential of the inner sphere is 450.7 V\n",
        "(c) Capacitance of the capacitor is 416.0\n"
       ]
      }
     ],
     "prompt_number": 61
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.9 Page no 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=1.4*10**-2                       #m\n",
      "b=1.5*10**-2                        #m\n",
      "q=3.5*10**-6                        #C\n",
      "e=8.854*10**-12\n",
      "l=15*10**-2\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "C=(2*math.pi*e*l)/(2.303*math.log10(b/a))\n",
      "V=q/C\n",
      "\n",
      "#Result\n",
      "print\"Capacitance of the system is\", round(C*10**10,2)*10**-8,\"F\"\n",
      "print\"Potential of the inner cylinder is\", round(V*10**-4,2),\"*10**4 V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance of the system is 1.21e-08 F\n",
        "Potential of the inner cylinder is 2.89 *10**4 V\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.10 Page no 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C=9.0*10**-12                     #F\n",
      "V=120                           #V\n",
      "\n",
      "#Calculation\n",
      "C1=1/(3/C)\n",
      "q=(V*C)/3.0\n",
      "V1=q/C\n",
      "\n",
      "#Result\n",
      "print\"(a) Total capacitance is\",C1,\"F\"\n",
      "print\"(b) Potential difference across each capacitor is\",V1,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Total capacitance is 3e-12 F\n",
        "(b) Potential difference across each capacitor is 40.0 V\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.11 Page no 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C1=2*10**-12                           #F\n",
      "C2=3*10**-12\n",
      "C3=4*10**-12\n",
      "V=100                                  #Volts\n",
      "\n",
      "#Calculation\n",
      "C=C1+C2+C3\n",
      "q1=C1*V\n",
      "q2=C2*V\n",
      "q3=C3*V\n",
      "\n",
      "#Result\n",
      "print\"(a) Total capacitamce of the parallel combination is\",C,\"F\"\n",
      "print\"(b) Charge on q1 is\",q1,\"C\"\n",
      "print\"(c) Charge on q2 is\",q2,\"C\"\n",
      "print\"(d) Charge on q3 is\",q3,\"C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Total capacitamce of the parallel combination is 9e-12 F\n",
        "(b) Charge on q1 is 2e-10 C\n",
        "(c) Charge on q2 is 3e-10 C\n",
        "(d) Charge on q3 is 4e-10 C\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.12 Page no 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "c1=5.0                  #micro F\n",
      "c2=4.0\n",
      "c3=3.0\n",
      "\n",
      "#Calculation\n",
      "C=1/(1/c1+1/c2)\n",
      "c11=C+c3\n",
      "\n",
      "#Result\n",
      "print\"Capacitance of the combination is\",round(c11,2),\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance of the combination is 5.22 micro F\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.13 Page no 111"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "cs=3                     #micro F\n",
      "cp=16\n",
      "c1=12\n",
      "\n",
      "#Calculation\n",
      "C=cs*cp\n",
      "c2=cp-c1\n",
      "\n",
      "#Result\n",
      "print\"Capacitance of each capacitor is\",c2,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance of each capacitor is 4 micro F\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.14 Page no 111"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "c2=6.0                #micro F\n",
      "c3=6.0\n",
      "c1=12.0\n",
      "c4=12.0\n",
      "\n",
      "#Calculation\n",
      "c23=c2+c3\n",
      "C=1/(1/c1+1/c23+1/c4)\n",
      "\n",
      "#Result\n",
      "print\"resultant of capacitance is\",C,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resultant of capacitance is 4.0 micro F\n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.15 Page no 111"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "c1=3.0                     #pico F\n",
      "c2=2.0\n",
      "\n",
      "#Calculation\n",
      "C=1/(1/c1+1/c2+1/c1)\n",
      "c11=C+c2\n",
      "C11=1/(1/c1+1/c11+1/c1)\n",
      "\n",
      "#Result \n",
      "print\"Resultant capacitance is\",round(C11,0),\"pF\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resultant capacitance is 1.0 pF\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.16 Page no 111"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C2=2\n",
      "C3=2\n",
      "C1=1                   #micro F\n",
      "C4=2\n",
      "C5=1\n",
      "\n",
      "#Calculation\n",
      "C23=C2*C3/(C2+C3)\n",
      "C123=C1+C23\n",
      "C1234=C123*C4/(C123+C4)\n",
      "C=C1234+C5\n",
      "\n",
      "#Ressult\n",
      "print\"Equivalent capacitance is\", C,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Equivalent capacitance is 2 micro F\n"
       ]
      }
     ],
     "prompt_number": 49
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.17 Page no 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C5=10*10**-6                            #micro F\n",
      "C6=10*10**-6\n",
      "C2=60.0*10**-6\n",
      "C3=60.0*10**-6\n",
      "C4=60.0*10**-6\n",
      "C1=40*10**-6\n",
      "V=100                              #V\n",
      "\n",
      "#Calculation\n",
      "C56=(C5+C6)\n",
      "C234=1/(1/C2+1/C3+1/C4)\n",
      "C=C56+C234\n",
      "C11=(C1*C)/(C1+C)\n",
      "q=C56*V\n",
      "\n",
      "#Result\n",
      "print\"Total charge is\",q*10**3,\"*10**-3 C\"\n",
      "print\"Equivalent capacitance is\",C11*10**6,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total charge is 2.0 *10**-3 C\n",
        "Equivalent capacitance is 20.0 micro F\n"
       ]
      }
     ],
     "prompt_number": 75
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.19 Page no 113"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C1=5.0*10**-6                            #F\n",
      "C2=10.0*10**-6\n",
      "C3=2.0*10**-6\n",
      "C4=4.0*10**-6\n",
      "\n",
      "#Calculation\n",
      "C12=1/(1/C1+1/C2)\n",
      "C34=1/(1/C3+1/C4)\n",
      "C=C12+C34\n",
      "\n",
      "#Result\n",
      "print\"Effective capacitance is\", round(C*10**6,2),\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Effective capacitance is 4.67 micro F\n"
       ]
      }
     ],
     "prompt_number": 81
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.20 Page no 113"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "n=3\n",
      "C1=1.0\n",
      "C2=1.0\n",
      "C3=1.0\n",
      "C=2                           #micro F\n",
      "\n",
      "#Calculation\n",
      "C11=1/(1/C1+1/C2+1/C3)\n",
      "m=C/C11\n",
      "\n",
      "#Result\n",
      "print\"Capacitance required is\", m"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance required is 6.0\n"
       ]
      }
     ],
     "prompt_number": 84
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.21 Page no 113"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C1=4\n",
      "V=6\n",
      "C2=6\n",
      "\n",
      "#Calculation\n",
      "q1=C1*V\n",
      "q2=C2*V\n",
      "\n",
      "#Result\n",
      "print\"Charge on C1 is\",q1,\"micro C\"\n",
      "print\"Charge on C2 is\",q2,\"micro C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Charge on C1 is 24 micro C\n",
        "Charge on C2 is 36 micro C\n"
       ]
      }
     ],
     "prompt_number": 88
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.22 Page no 114"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C2=5                   #micro F\n",
      "C3=5 \n",
      "a=6\n",
      "C1=10\n",
      "V=3\n",
      "\n",
      "#Calculation\n",
      "C23=C2+C3\n",
      "V1=a/2.0\n",
      "q1=C1*V\n",
      "q23=C23*V\n",
      "q3=q23/2.0\n",
      "\n",
      "#Result\n",
      "print\"Charge on capacitor C1 is\",q1,\"micro F\"\n",
      "print\"Charge on capacitor C2 is\",q23,\"micro F\"\n",
      "print\"Charge on capacitor C3 is\",q3,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Charge on capacitor C1 is 30 micro F\n",
        "Charge on capacitor C2 is 30 micro F\n",
        "Charge on capacitor C3 is 15.0 micro F\n"
       ]
      }
     ],
     "prompt_number": 94
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.23 Page no 114"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C1=4*10**-6                   #F\n",
      "V1=400                        #V\n",
      "C2=2*10**-6\n",
      "q2=0\n",
      "\n",
      "#Calculation\n",
      "q1=C1*V1\n",
      "C=C1+C2\n",
      "q=q1+q2\n",
      "V=q/C\n",
      "\n",
      "#Result\n",
      "print\"Common potential is\", round(V,2),\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Common potential is 266.67 V\n"
       ]
      }
     ],
     "prompt_number": 101
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.24 Page no 114"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "V=12\n",
      "C1=8                         #micro F\n",
      "C2=4\n",
      "\n",
      "#Calculation\n",
      "Va=V-C2\n",
      "Vb=V-C1\n",
      "V1=Va-Vb\n",
      "\n",
      "#Result\n",
      "print\"Potential difference is\", V1,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Potential difference is 4 V\n"
       ]
      }
     ],
     "prompt_number": 105
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.25 Page no 114"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "A=90*10**-4                                 #m**2\n",
      "d=2.5*10**-3                                #m\n",
      "V=400                                       #Volts\n",
      "e=8.854*10**-12\n",
      "\n",
      "#Calculation\n",
      "C=(e*A)/d\n",
      "W=(C*V**2)/2.0\n",
      "\n",
      "#Result\n",
      "print\"Electrostatic energy is\", round(W*10**6,2)*10**-6,\"J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electrostatic energy is 2.55e-06 J\n"
       ]
      }
     ],
     "prompt_number": 112
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.26 Page no 114"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C=2000*10**-6              \n",
      "V=1.5                   #V\n",
      "t=10.0**-4                #s\n",
      "\n",
      "#Calculation\n",
      "U=(C*V**2)/2.0\n",
      "P=U/t\n",
      "\n",
      "#Result\n",
      "print\"Energy stored in the capacitor is\", U*10**3,\"*10**-3 J\"\n",
      "print\"Power of the flash is\",P,\"W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Energy stored in the capacitor is 2.25 *10**-3 J\n",
        "Power of the flash is 22.5 W\n"
       ]
      }
     ],
     "prompt_number": 119
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.27 Page no 115"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "C1=4*10**-6\n",
      "V1=200                              #V\n",
      "C2=2*10**-6                                # F\n",
      "\n",
      "#Calculation\n",
      "U1=(C1*V1**2)/2.0\n",
      "q=C1*V1\n",
      "C=C1+C2\n",
      "V=q/C\n",
      "U2=(C*V**2)/2.0\n",
      "U=U1-U2\n",
      "\n",
      "#Result\n",
      "print\"Electrostatic energy is\",round(U*10**2,2),\"*10**-2 J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electrostatic energy is 2.67 *10**-2 J\n"
       ]
      }
     ],
     "prompt_number": 129
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.28 Page no 115"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "K=6.0\n",
      "C=17.7*10**-12                    #F\n",
      "V=100\n",
      "\n",
      "#Calculation\n",
      "C1=K*C\n",
      "q=C1*V\n",
      "V1=V/K\n",
      "q1=C1*V1\n",
      "\n",
      "#Result\n",
      "print\"(a) Charge on capacitor is\", q,\"C\"\n",
      "print\"(b) Charge on capacitor is\", q1,\"C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Charge on capacitor is 1.062e-08 C\n",
        "(b) Charge on capacitor is 1.77e-09 C\n"
       ]
      }
     ],
     "prompt_number": 135
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.29 Page no 115"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "K=3\n",
      "e=8.854*10**-12                         #C**2/N/m**2\n",
      "C=50*10**-12                              #F\n",
      "a=10**7                                  #V/m\n",
      "b=10\n",
      "V=10**3\n",
      "\n",
      "#Calculation\n",
      "E=(a*b)/100.0\n",
      "q=C*V\n",
      "A=q/(e*K*E)\n",
      "\n",
      "#Result\n",
      "print\"Minimum area is\", round(A*10**4,1),\"cm**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum area is 18.8 cm**2\n"
       ]
      }
     ],
     "prompt_number": 140
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.30 Page no 115"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "V=15*10**5                        #V\n",
      "E=5.0*10**7                         #V/m\n",
      "\n",
      "#Calculation\n",
      "r=V/E\n",
      "\n",
      "#Result\n",
      "print\"Minimum radius of the spherical shell is\", r*10**2,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum radius of the spherical shell is 3.0 cm\n"
       ]
      }
     ],
     "prompt_number": 144
    }
   ],
   "metadata": {}
  }
 ]
}