summaryrefslogtreecommitdiff
path: root/Physics_for_BSc(Paper-3)/Chapter1.ipynb
blob: 6dc29562299c0a5f1642c8d04edd7865d97d0e4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{
 "metadata": {
  "name": "",
  "signature": "sha256:ba3f78351f4be2023ce816790e91ae988fafb883f552e13733bb7da3271b13e0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "1: Electrostatics-Basic concepts"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.1, Page number 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r=0.053*10**-9;      #distance(m)\n",
      "q1=1.6*10**-19;     #charge on electron(C)\n",
      "q2=1.6*10**-19;     #charge on proton(C)\n",
      "#let x=1/(4*math.pi*epsilon0)\n",
      "x=9*10**9;\n",
      "\n",
      "#Calculation\n",
      "F=x*q1*q2/(r**2);    #force of attraction(N)\n",
      "\n",
      "#Result\n",
      "print \"force of attraction is\",round(F*10**8,1),\"*10**-8 N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force of attraction is 8.2 *10**-8 N\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.2, Page number 13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r=2;      #distance(m)\n",
      "q1plusq2=5*10**-4;     #positive charge(C)\n",
      "#let x=1/(4*math.pi*epsilon0)\n",
      "x=9*10**9;\n",
      "F=1;    #force(N)\n",
      "\n",
      "#Calculation\n",
      "q1q2=F*(r**2)/x;     #product of charges(C**2)\n",
      "q1minusq2=math.sqrt((q1plusq2**2)-(4*q1q2));     ##difference of charges(C)\n",
      "twoq1=q1plusq2+q1minusq2;\n",
      "q1=twoq1/2;      #charge on individual sphere(C)\n",
      "twoq2=q1plusq2-q1minusq2;\n",
      "q2=twoq2/2;      #charge on individual sphere(C)\n",
      "\n",
      "#Result\n",
      "print \"the charges on individual spheres are\",round(q1*10**4,3),\"*10**-4 and\",round(q2*10**4,3),\"*10**-4\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the charges on individual spheres are 4.991 *10**-4 and 0.009 *10**-4\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.3, Page number 13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "m=9.1*10**-31;    #mass of electron(kg)\n",
      "g=9.8;    #acceleration due to gravity(m/sec**2)\n",
      "q=1.6*10**-19;    #charge on electron(C)\n",
      "\n",
      "#Calculation\n",
      "F1=m*g;    #force by electron(N)\n",
      "E=F1/(2*q);    #intensity of electric field(N/C)\n",
      "\n",
      "#Result\n",
      "print \"intensity of electric field is\",round(E*10**11,3),\"*10**-11 N/C\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "intensity of electric field is 2.787 *10**-11 N/C\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.4, Page number 14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r=12*10**-2;      #distance(m)\n",
      "q1=2*10**-7;     #charge(C)\n",
      "q2=8.5*10**-8;     #charge(C)\n",
      "#let x=1/(4*math.pi*epsilon0)\n",
      "x=9*10**9;\n",
      "\n",
      "#Calculation\n",
      "E1=x*q2/(r**2);    #intensity at electric field at q1 due to q2(N/C)\n",
      "E2=x*q1/(r**2);    #intensity at electric field at q2 due to q1(N/C)\n",
      "F=x*q1*q2/(r**2);    #force of attraction(N)\n",
      "\n",
      "#Result\n",
      "print \"intensity at electric field at q1 due to q2 is\",round(E1*10**-5,2),\"*10**5 N/C\"\n",
      "print \"intensity at electric field at q1 due to q2 is\",round(E2*10**-5,2),\"*10**5 N/C\"\n",
      "print \"force of attraction is\",round(F,4),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "intensity at electric field at q1 due to q2 is 0.53 *10**5 N/C\n",
        "intensity at electric field at q1 due to q2 is 1.25 *10**5 N/C\n",
        "force of attraction is 0.0106 N\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}