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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 15:Electric Forces and Fields"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.1:pg-719"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The value of q is= 3.61e-06 C\n",
"\n",
"Number of electrons to be removed is=\n",
"2.25625e+13\n",
"Fraction of atoms lost is=\n",
"7.52083333333e-10\n"
]
}
],
"source": [
" #Example 15_1\n",
"import math \n",
" #To find the value of q and how many electrons must be removed and fraction of atoms lost\n",
"dist=2 #Units in meters\n",
"f=0.0294 #Units in N\n",
"s=9*10**9 #Units in N meter**2/C**2\n",
"q=math.sqrt((dist**2*f)/s) #Units in C\n",
"print \"The value of q is=\",round(q,8),\" C\\n\"\n",
"charge=3.61*10**-6 #Units in C\n",
"c_elec=1.6*10**-19 #Units in C\n",
"n=charge/c_elec #Units in number\n",
"print \"Number of electrons to be removed is=\"\n",
"print n\n",
"f1=3*10.0**22 #Units in number\n",
"fraction=n/f1 #Units of number\n",
"print \"Fraction of atoms lost is=\"\n",
"print fraction\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.2:pg-721"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The force on the center charge is= 0.02813 N\n"
]
}
],
"source": [
" #Example 15_2\n",
" \n",
" \n",
" #To find the force on the center charge\n",
"k=9*10**9 #Units in N meter**2/C**2\n",
"q1=4*10.0**-6 #Units in C\n",
"q2=5*10.0**-6 #Units in C\n",
"r1=2 #Units in meters\n",
"r2=4 #Units in meters\n",
"q3=6*10.0**-6 #Units in C\n",
"f1=(k*q1*q2)/r1**2 #Units in N\n",
"f2=(k*q2*q3)/r2**2 #Units in N\n",
"f=f1-f2 #Units in C\n",
"print \"The force on the center charge is=\",round(f,5),\" N\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.3:pg-722"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resultant force is f= 19.0 N \n",
"The resultant angle is theta= 71.6 degrees\n"
]
}
],
"source": [
" #Example 15_3\n",
"import math \n",
" \n",
" #To find the resultant force\n",
"f1=6 #Units in N\n",
"f2=18 #Units in N\n",
"f=math.sqrt(f1**2+f2**2) #Units in N\n",
"theta=math.atan(f2/f1)*180/math.pi #Units in degrees\n",
"print \"The resultant force is f=\",round(f),\" N \\nThe resultant angle is theta=\",round(theta,1),\" degrees\"\n",
" #In text book answer printed wrong as f=19 N correct answer is f=18N \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.4:pg-724"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resultant force is f= 3.4 N \n",
" The resultant angle is theta= 65.0 degrees\n"
]
}
],
"source": [
" #Example 15_4\n",
" \n",
"import math\n",
" #To find the resultant force on 20 micro C\n",
"f1=2 #Units in N\n",
"f2=1.8 #Units in N\n",
"theta=37.0 #Units in degrees\n",
"f2x=f2*math.cos(theta*math.pi/180) #Units in N\n",
"f2y=f2*math.sin(theta*math.pi/180) #Units in N\n",
"fy=f1+f2y #Units in N\n",
"f=math.sqrt(fy**2+f2x**2) #Units in N\n",
"theta=math.atan(fy/f2x)*180/math.pi #Units in degrees\n",
"print \"The resultant force is f=\",round(f,1),\" N \\n The resultant angle is theta=\",round(theta,1),\" degrees\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.6:pg-726 "
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The magnitude of E is=\n",
"7198876.9\n",
"N/C\n"
]
}
],
"source": [
" #Example 15_6\n",
" \n",
" \n",
" #To find the magnitude of E\n",
"k=9*10**9 #Units in N meter**2/C**2\n",
"q=3.6*10**-6 #Units in C\n",
"theta=37 #Units in degrees\n",
"r=10*math.sin(theta*math.pi/180)*10**-2 #Units in meters \n",
"e1=(k*q)/r**2 #Units in N/C\n",
"q2=5*10**-6 #Units in C\n",
"theta=37 #Units in degrees\n",
"r1=10*10**-2 #Units in meters \n",
"e2=(k*q2)/r1**2 #Units in N/C\n",
"e1y=e1 #Units in N/C\n",
"e2x=e2*math.cos(theta*math.pi/180) #Units in N/C\n",
"e2y=-e2*math.sin(theta*math.pi/180) #Units in N/C\n",
"ex=e2x #Units in N/C\n",
"ey=e1y+e2y #Units in N/C\n",
"e=math.sqrt(ex**2+ey**2) #Units in N/C\n",
"print \"The magnitude of E is=\"\n",
"print round(e,2)\n",
"print \"N/C\"\n",
" #In text book the answer isprinted wrong as E=7.26*10**6 N/C but the correct answer is E=7198876.9 N/C\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.7:pg-726"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The charge occured is q= 8.33e-07 C\n"
]
}
],
"source": [
" #Example 15_7\n",
" \n",
" \n",
" #To find out how much charge occurs\n",
"e=3*10.0**6 #Units in N/C\n",
"r=0.050 #Units in meters\n",
"k=9*10.0**9 #Units in N meter**2/C**2\n",
"q=(e*r**2)/k #Units in C\n",
"print \"The charge occured is q=\",round(q,9),\" C\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.8:pg-727"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Lines of force come out of positive charge q suspended in cavity.\n",
"Cavity \n",
"surface must possess a negative charge since lines of force go and terminate on q.\n",
"Therefore a charge +q must exist on outer portions.\n"
]
}
],
"source": [
" #Example 15_8\n",
" \n",
" \n",
" #To show using lines of force that a charge suspended with in cavity induces an equal and opposite charge on surface\n",
"print \"Lines of force come out of positive charge q suspended in cavity.\\nCavity \\nsurface must possess a negative charge since lines of force go and terminate on q.\\nTherefore a charge +q must exist on outer portions.\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex15.9:pg-728"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The field goes by a speed of 47952.0 meters/sec\n"
]
}
],
"source": [
" #Example 15_9\n",
"import math \n",
" #To find the speed just before the field strikes\n",
"e=6000 #Units in N/C\n",
"q=1.6*10**-19 #Units in C\n",
"f=e*q #Units in N\n",
"m=1.67*10**-27 #Units in Kg\n",
"a=f/m #Units in meters/sec**2\n",
"vo=0 #Units in meters/sec\n",
"x=2*10**-3 #Units in meters\n",
"v=math.sqrt(vo**2+(2*a*x)) #Units in meters/sec\n",
"print \"The field goes by a speed of \",round(v),\" meters/sec\"\n",
" #In text book answer printed wrong as v=48000 meters/sec the correct answer is v=47952 meters/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
}
|