Gauss's Law Exercise (Part 3)

A particle with charge q = + 10 q = +10 is at position ( x , y , z ) = ( 1 2 , 0 , 1 2 ) (x,y,z) = \Big(\frac{1}{2},0,\frac{1}{2} \Big) . A closed surface consists of four sub-surfaces put together.

The first sub-surface is a half-disk in the x y xy plane:

x 2 + y 2 1 x 0 z = 0 x^2 + y^2 \leq 1 \\ x \leq 0 \\ z = 0

The second sub-surface is a half-disk in the y z yz plane:

y 2 + z 2 1 z 0 x = 0 y^2 + z^2 \leq 1 \\ z \geq 0 \\ x = 0

The third sub-surface is a half sphere centered on the origin:

x 2 + y 2 + z 2 = 1 z 0 x^2 + y^2 + z^2 = 1 \\ z \leq 0

The fourth sub-surface is a quarter sphere centered on the origin:

x 2 + y 2 + z 2 = 1 z 0 x 0 x^2 + y^2 + z^2 = 1 \\ z \geq 0 \\ x \geq 0

Let the electric fluxes through the four sub-surfaces be ϕ 1 , ϕ 2 , ϕ 3 , ϕ 4 \phi_1,\phi_2,\phi_3,\phi_4 . Determine the following ratio:

ϕ 1 ϕ 2 ϕ 3 ϕ 4 ϕ 1 + ϕ 2 + ϕ 3 + ϕ 4 \frac{\phi_1 \, \phi_2 \, \phi_3 \, \phi_4}{ \phi_1 + \phi_2 + \phi_3 + \phi_4}

Details and Assumptions:
1) Electric permittivity ϵ 0 = 1 \epsilon_0 = 1
2) Use outward-facing normal vectors
3) Be mindful of the signs of the fluxes (positive or negative)


The answer is -1.418.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Steven Chase
Mar 11, 2020

@Karan Chatrath has provided a nice detailed solution. I will upload my code as well. The basic calculations are common for all surfaces. The only differences lie in the surface parametrization. Notice also that it is not necessary to deal with complicated expressions.

  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
import math

N = 1000

#####################################

q = 10.0

xq = 1.0/2.0
yq = 0.0
zq = 1.0/2.0

e0 = 1.0

#####################################

k = 1.0/(4.0*math.pi*e0)

phi1 = 0.0
phi2 = 0.0
phi3 = 0.0
phi4 = 0.0

#####################################
#####################################
#####################################
#####################################

# Half Disk 1 (xy plane)

dr = 1.0/N
dtheta = math.pi/N

nx = 0.0
ny = 0.0
nz = 1.0

r = 0.0

while r <= 1.0:

    theta = 0.0

    while theta <= math.pi:

        y = r*math.cos(theta)
        x = -r*math.sin(theta)
        z = 0.0

        dS = r*dr*dtheta

        Dx = x - xq
        Dy = y - yq
        Dz = z - zq

        D = math.sqrt(Dx**2.0 + Dy**2.0 + Dz**2.0)

        ux = Dx/D
        uy = Dy/D
        uz = Dz/D

        E = k*q/(D**2.0)

        Ex = E * ux
        Ey = E * uy
        Ez = E * uz

        dot = Ex*nx + Ey*ny + Ez*nz

        dphi = dot * dS

        phi1 = phi1 + dphi

        theta = theta + dtheta

    r = r + dr

print "done"

#####################################
#####################################
#####################################
#####################################

# Half Disk 2

dr = 1.0/N
dtheta = math.pi/N

nx = -1.0
ny = 0.0
nz = 0.0

r = 0.0

while r <= 1.0:

    theta = 0.0

    while theta <= math.pi:

        y = r*math.cos(theta)
        z = r*math.sin(theta)
        x = 0.0

        dS = r*dr*dtheta

        Dx = x - xq
        Dy = y - yq
        Dz = z - zq

        D = math.sqrt(Dx**2.0 + Dy**2.0 + Dz**2.0)

        ux = Dx/D
        uy = Dy/D
        uz = Dz/D

        E = k*q/(D**2.0)

        Ex = E * ux
        Ey = E * uy
        Ez = E * uz

        dot = Ex*nx + Ey*ny + Ez*nz

        dphi = dot * dS

        phi2 = phi2 + dphi

        theta = theta + dtheta

    r = r + dr

print "done"

#####################################
#####################################
#####################################
#####################################

# Half sphere

dsigma = (math.pi/2.0)/N
dtheta = 2.0*math.pi/N

sigma = math.pi/2.0

while sigma <= math.pi:

    theta = 0.0

    while theta <= 2.0*math.pi:

        x = 1.0*math.cos(theta)*math.sin(sigma)
        y = 1.0*math.sin(theta)*math.sin(sigma)
        z = 1.0*math.cos(sigma)

        nx = x
        ny = y
        nz = z

        dS = (1.0**2.0)*math.sin(sigma) * dtheta * dsigma

        Dx = x - xq
        Dy = y - yq
        Dz = z - zq

        D = math.sqrt(Dx**2.0 + Dy**2.0 + Dz**2.0)

        ux = Dx/D
        uy = Dy/D
        uz = Dz/D

        E = k*q/(D**2.0)

        Ex = E * ux
        Ey = E * uy
        Ez = E * uz

        dot = Ex*nx + Ey*ny + Ez*nz

        dphi = dot * dS

        phi3 = phi3 + dphi

        theta = theta + dtheta

    sigma = sigma + dsigma


print "done"

#####################################
#####################################
#####################################
#####################################

# Quarter sphere

dsigma = (math.pi/2.0)/N
dtheta = math.pi/N

sigma = 0.0

while sigma <= math.pi/2.0:

    theta = -math.pi/2.0

    while theta <= math.pi/2.0:

        x = 1.0*math.cos(theta)*math.sin(sigma)
        y = 1.0*math.sin(theta)*math.sin(sigma)
        z = 1.0*math.cos(sigma)

        nx = x
        ny = y
        nz = z

        dS = (1.0**2.0)*math.sin(sigma) * dtheta * dsigma

        Dx = x - xq
        Dy = y - yq
        Dz = z - zq

        D = math.sqrt(Dx**2.0 + Dy**2.0 + Dz**2.0)

        ux = Dx/D
        uy = Dy/D
        uz = Dz/D

        E = k*q/(D**2.0)

        Ex = E * ux
        Ey = E * uy
        Ez = E * uz

        dot = Ex*nx + Ey*ny + Ez*nz

        dphi = dot * dS

        phi4 = phi4 + dphi

        theta = theta + dtheta

    sigma = sigma + dsigma


print "done"
print ""

#####################################
#####################################
#####################################
#####################################

print N
print ""
num =  phi1 * phi2 * phi3 * phi4 
denom =  phi1 + phi2 + phi3 + phi4

print phi1
print phi2
print phi3
print phi4
print ""

print num
print denom
print ""

print (num/denom)

################################################

#done
#done
#done
#done

#1000

#-0.479907667013
#1.9890678943
#2.47512002014
#6.02327412007

#-14.2310251829
#10.0075543675

#-1.42202826588

################################################

#done
#done
#done
#done

#2000

#-0.479848102287
#1.99016120363
#2.47189307772
#6.02335928703

#-14.2187195366
#10.0055654661

#-1.42108105582

################################################

#done
#done
#done
#done

#5000

#-0.479411716385
#1.98949458484
#2.4692123318
#6.02143483149

#-14.1810971648
#10.0007300317

#-1.41800619752

################################################

#done
#done
#done
#done

#10000

#-0.479465526403
#1.98939689454
#2.46894070587
#6.02121414812

#-14.1799126635
#10.0000862221

#-1.41797904023

Karan Chatrath
Mar 11, 2020

Consider the half disk on the X-Y plane. The disk can be parameterised using polar coordinates. The position vector of a point on the disk is:

r p = r cos θ i ^ + r sin θ j ^ + 0 k ^ \vec{r}_p = r\cos{\theta} \hat{i} + r\sin{\theta} \hat{j} + 0 \hat{k}

The position vector of the location of the charge is:

r c = 0.5 i ^ + 0 j ^ + 0.5 k ^ \vec{r}_c = 0.5 \hat{i} + 0 \hat{j} + 0.5 \hat{k}

A surface area element vector normal to this surface is:

d S = r d r d θ k ^ d\vec{S} = r \ dr \ d\theta \hat{k}

Understanding the direction requires a bit of imagination. The area vector is outward normal and the surface is parallel to the Z axis. A vector joining a point on the surface and the charge and directed away from the charge is:

r = r p r c \vec{r} = \vec{r}_p - \vec{r}_c

The electric field at this point is:

E = q 4 π ( r r 3 ) \vec{E} = \frac{q}{4 \pi} \left(\frac{\vec{r}}{\lvert \vec{r} \rvert^3}\right)

The flux through this elementary surface area is:

d ϕ 1 = E d S d\phi_1 = \vec{E} \cdot d\vec{S}

Substituting expressions and simplifying gives a function of r r and θ \theta . I have left out the tedious simplifications and expressions altogether as typing them is time consuming.

d ϕ 1 = f 1 ( r , θ ) d r d θ d\phi_1 = f_1(r,\theta) \ dr \ d\theta

ϕ 1 = 0 1 π / 2 3 π / 2 f 1 ( r , θ ) d r d θ \phi_1 = \int_{0}^{1} \int_{\pi/2}^{3 \pi/2} f_1(r,\theta) \ dr \ d\theta


Again, consider the disk on teh Y-Z plane. The disk again can be parameterised using polar coordinates as such:

r p = 0 i ^ + r sin θ j ^ + r cos θ k ^ \vec{r}_p = 0 \hat{i} + r\sin{\theta} \hat{j} + r\cos{\theta} \hat{k}

A surface area element vector normal to this surface is:

d S = r d r d θ i ^ d\vec{S} = - r \ dr \ d\theta \hat{i}

Understanding the direction requires a bit of imagination. The area vector is outward normal and the surface is along the negative X axis.

Repeating the same steps as above gives:

d ϕ 2 = f 2 ( r , θ ) d r d θ d\phi_2 = f_2(r,\theta) \ dr \ d\theta

ϕ 2 = 0 1 π / 2 π / 2 f 2 ( r , θ ) d r d θ \phi_2 = \int_{0}^{1} \int_{-\pi/2}^{\pi/2} f_2(r,\theta) \ dr \ d\theta


We now consider the sphere centered at the origin. A point on the sphere can be parameterised using spherical coordinates.

r p = sin θ cos ϕ i ^ + sin θ sin ϕ j ^ + cos θ k ^ \vec{r}_p = \sin{\theta} \cos{\phi} \hat{i} + \sin{\theta} \sin{\phi} \hat{j} + \cos{\theta} \hat{k}

The surface area element around a point on a sphere is:

d S = ( sin θ d ϕ d θ ) r ^ p d\vec{S} = \left(\sin{\theta} \ d\phi \ d\theta\right)\hat{r}_p

Performing the same steps above, one obtains an expression for flux through the elementary surface area:

d ϕ s = f 3 ( ϕ , θ ) d ϕ d θ d\phi_s = f_3(\phi,\theta) \ d\phi \ d\theta

Therefore, flux through the hemisphere is:

ϕ 3 = π / 2 π 0 2 π f 3 ( ϕ , θ ) d ϕ d θ \phi_3 = \int_{\pi/2}^{\pi} \int_{0}^{2 \pi} f_3(\phi,\theta) \ d\phi \ d\theta

And flux through the quarter sphere is:

ϕ 4 = 0 π / 2 π / 2 π / 2 f 3 ( ϕ , θ ) d ϕ d θ \phi_4 = \int_{0}^{\pi/2} \int_{-\pi/2}^{\pi/2} f_3(\phi,\theta) \ d\phi \ d\theta


One can evaluate the integrals using Wolfram-Alpha or by typing a script of code. I chose to do the latter and so I have not spent time evaluating the explicit integrands here. I have laid out the steps. Some of the steps require some geometric intuition, which makes this problem challenging. Moreover, the value of ϕ 1 \phi_1 is a negative number. This makes sense when you visualise the location of the charge relative to all surfaces. In the first surface, the flux is inwards.

A good way to check if the answer is correct is to see if:

ϕ 1 + ϕ 2 + ϕ 3 + ϕ 4 = 10 \phi_1 + \phi_2 + \phi_3 + \phi_4 = 10

As that verifies Gauss Law.

@Karan chatrath sir i don't able to calculate ϕ 3 a n d ϕ 4 \phi_3 and \phi_4 . But I have calculated ϕ 1 = 3.9786 \phi_1=-3.9786 , , ϕ 2 = 0.4794 \phi_2=0.4794 are these correct??

A Former Brilliant Member - 1 year, 3 months ago

@Karan chatrath Sir in wolfram ϕ 3 , ϕ 4 \phi_3 , \phi_4 integral is not Possible. I have calculated all fluxes integral and wolfram calculated ϕ 1 , ϕ 2 \phi_1, \phi_2 but not able to calculated the integration of ϕ 3 , ϕ 4 \phi_3 , \phi_4 .

A Former Brilliant Member - 1 year, 3 months ago

I obtain:

ϕ 1 0.4797 \phi_1 \approx -0.4797 ϕ 2 1.9904 \phi_2 \approx 1.9904 ϕ 3 2.4701 \phi_3 \approx 2.4701 ϕ 4 6.0226 \phi_4 \approx 6.0226

The value of ϕ 1 \phi_1 is negative. Also, Even I noticed that ϕ 3 \phi_3 and ϕ 4 \phi_4 cannot be evaluated using Wolfram. I calculated all the integrals by writing code.

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath writing code means I didn't know that method from which you evaluated. It will be great if you tell me how to integrate by writing code.

A Former Brilliant Member - 1 year, 3 months ago

Refer to any of the past solutions posted by @Steven Chase or me. The procedure is well elaborated there.

Karan Chatrath - 1 year, 3 months ago

Log in to reply

Yes I have seen code. Can you tell me please that how to make that type of code??

A Former Brilliant Member - 1 year, 3 months ago

Log in to reply

I have mentioned before that to code, you need some working understanding of any programming language and some elementary knowledge of numerical integration. If you are not familiar with them, starting to learn is the way to go. Explaining this here would be too time consuming. @Steven Chase posted an exercise on numerical integration practice not very long back. You could try that to test your understanding.

Karan Chatrath - 1 year, 3 months ago

@Legend of Physics I have tried your problem and despite corrections, I do not get the correct answer. Could you please revise your working? In your problem, does ϕ 1 + ϕ 2 \phi_1 + \phi_2 verify Gauss' Law?

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath sir the answer of the question is wrong . If you are getting your answer as 1.934 \boxed{1.934} then you are correct . I have also told this to sir steven chase in the report. I am expecting from brilliant community to change answer as fast as possible.

A Former Brilliant Member - 1 year, 3 months ago

Log in to reply

I see that you have defined ϵ 0 = 1.2 \epsilon_0 = 1.2 . If I take this value, I get a different answer than what you have suggested. If I take ϵ 0 = 1 \epsilon_0 = 1 then I get the answer as 1.9373 \boxed{1.9373} .

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Sir you can also see in report of the question Sir Steven chase has posted his code . He is getting 1.935 \boxed{1.935}

A Former Brilliant Member - 1 year, 3 months ago

Log in to reply

@A Former Brilliant Member Well if I see the report, then I would have to concede the question, which I do not want. Instead, could you tell me what value of ϵ 0 \epsilon_0 did he use? Was it 1 or 1.2? It appears as though you have defined ϵ 0 \epsilon_0 as 1.2 in the problem statement. If not, please mention the details and assumptions on different lines.

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath No sir ϵ o \epsilon_{o} =1) is only value I have given in the question and Steven sir also have used 1

A Former Brilliant Member - 1 year, 3 months ago

Log in to reply

@A Former Brilliant Member Okay, in that case, my answer is the same as what you say it is. I was using ϵ 0 = 1.2 \epsilon_0 = 1.2 all this time. I suggest you type each detail and assumption on a different line to avoid confusion. Also, I suggest you delete this problem and re-post it. Brilliant staff members will take time to correct the problem.

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath @ Karan chatrath Ok sir as you wish.

A Former Brilliant Member - 1 year, 3 months ago

Log in to reply

@A Former Brilliant Member Thank you for reposting. It is a very nice problem.

Karan Chatrath - 1 year, 3 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Welcome . Sir i have posted another question. https://brilliant.org/problems/flux-in-between-rings/

A Former Brilliant Member - 1 year, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...