I Proving Gauss' Law using a Cubical Surface

AI Thread Summary
The discussion focuses on proving Gauss's Law using a cubical surface with a point charge at its center. The user initially struggles with complex integration while calculating the electric flux through the cube's surface. They derive the flux equations and explore various integration techniques, including trigonometric substitutions, but encounter difficulties with the final integral. Other participants suggest alternative approaches, including using Maxwell's equations in differential form, which simplifies the problem. Ultimately, the conversation highlights the challenges of applying Gauss's Law to non-spherical surfaces while confirming the law's validity through different mathematical methods.
sarsface
Messages
2
Reaction score
2
TL;DR Summary
Attempting to prove Gauss' Law using a closed cubical surface with a point charge at its center.
Hi,

I'm trying to prove Gauss's Law by using a cubical surface with a point charge located at its center, and I'm running up against some difficult integration. I've worked through the first integral of the surface integral, but I can't seem to figure out a proper integration technique. Here is my work so far,

$$
\Phi _ { E } = \frac { q _ { enc } } { \epsilon _ { 0 } }
$$
and flux is the product of the electric field and the area of the surface that encloses the charge,
$$
\Phi _ { E } = \vec { E } \cdot \vec { A } = E A \cos \phi = \oint \vec { E } \cdot d \vec { A }
$$

If we evaluate a single point charge, q, at the center of a sphere used as our imaginary Gaussian surface we have a constant electric field over all points on the surface, as well as a constant distance from the point charge to the surface, giving us,
$$
\Phi _ { E } = EA
$$
by Coulomb's Law,
$$ E = \frac { 1 } { 4 \pi \epsilon _ { 0 } } \cdot \frac { q } { R ^ { 2 } } $$
where R is the distance from the charge to the surface, ie the radius of the sphere.
The surface area of the sphere is given by,

$$A = 4 \pi R ^ { 2 }$$

so,

$$\Phi_{E} = E A = \frac { 1 } { 4 \pi E _ { 0 } } \cdot \frac { q } { R ^ { 2 } } \cdot 4 \pi R ^ { 2 } = \frac { q } { \epsilon _ { 0 } } = \frac { q_{ enc } } { \epsilon _ { 0 } }$$

$$\Phi _ { E } = \frac { q _ { \mathrm { enc } } } { \epsilon _ { 0 } }$$Gauss's Law can be applied to any charge surrounded by a closed Gaussian surface of any shape. If we choose a cube as our surface things become a bit more complicated, however Gauss's Law is still applicable.

We will use a cube with side length 2s and place a point charge q at the center. Since the electric field and angle between the area vector will change for each point on the surface. By symmetry, there will be an equal flux through each face of the cube. The following is for flux through one of these faces.

$${\Phi _ { E } = E A \cos \phi = \vec { E } \cdot \vec { A } = \oint \vec { E } \cdot d \vec { A }}$$
$${ \vec { E } \cdot d \vec { A } = E d A \cos \phi } $$
$${ \cos \phi = \frac { s } { \sqrt { x ^ { 2 } + y ^ { 2 } + s ^ { 2 } } } }$$
$${ \vec { E } \cdot d \vec { A } = \frac { k q s\ dx\ dy } { \left( x ^ { 2 } + y ^ { 2 }+ s ^ { 2 } \right) ^ { 3 / 2 } } } $$
$${ \Phi _ { E } = k q s \int _ { -s} ^ { s } \int _ { -s } ^ { s } \frac { d x\ d y } { \left( x ^ { 2 } + y ^ { 2 } + s ^ { 2 } \right) ^ { 3 / 2 } } }
$$
By using trigonometric substitution,
$${x=a\tan{\theta}}$$
$${a=\sqrt{y^{2}+s^{2}}}$$
$${dx=a\sec^{2}{\theta}d\theta}$$
which yields,
$${ \Phi _ { E } = k q s \int _ { -s} ^ { s }dy \int _ { -s } ^ { s } \frac {a\sec^{2}{\theta}\ d\theta} { \left( a^{ 2 }\tan^2{\theta}+a^{2} \right) ^ { 3 / 2 } } }
$$
By simplification and substitution using the trigonometric identities,
$${\tan^{2}\theta +1 = \sec^{2}\theta}$$
$${\sec{\theta}=\frac{1}{\cos{\theta}}}$$
we have,
$${ \Phi _ { E } = k q s \int _ { -s} ^ { s } dy \int _ { -s } ^ { s } \frac{\cos{\theta}\ d\theta}{ a^{ 2 } } = k q s \int _ { -s} ^ { s } \frac{dy}{a^{2}} (\sin{\theta}|_{-s}^{s})}$$

However, since we used a trigonometric substitution we will replace our $\sin\theta$ with an equivalent expression in terms of x,

$${a=\sqrt{y^2+s^2}, a^2=y^2+s^2}$$
$${\sin\theta|_{-s}^{s}=\frac{x}{\sqrt{x^2+a^2}}|_{-s}^{s}=\frac{s}{\sqrt{s^2+a^2}}-\frac{-s}{\sqrt{s^2+a^2}}=\frac{2s}{\sqrt{s^2+a^2}}=\frac{2s}{\sqrt{y^2+2s^2}}}$$

yielding,

$${\Phi _ { E } = k q s \displaystyle\int _ {-s}^{s}\frac{2s\ dy}{(y^2+s^2)(y^2+2s^2)^\frac{1}{2}}}$$

At this point I do not know where to go. If it weren't for the 1/2 power or the 2s^2 I'd be able to easily integrate using substitution or partial fraction decomposition, but as it stands I'm completely stumped. I went to my old calculus professor and he wasn't sure what to make if it either. I can't even seem to find an applicable entry in integral tables or even Gradshteyn & Ryzhik.
 
  • Like
Likes Delta2
Physics news on Phys.org
wolframalpha evaluates the integral as ##\frac{2\pi}{3s}##. It suggests the substitution ##y=\sqrt{2}s\tan u##
https://www.wolframalpha.com/input/?i=integral+2s+dy/((y^2+s^2)sqrt(y^2+2s^2))+from+y=-s+to+y=sDidnt check your whole work but seems it is correct if i judge from the result. The cube has six faces, so the total flux is $$6kqs\frac{2\pi}{3s}={4\pi}kq=\frac{q}{\epsilon_0}$$

EDIT: I see the link doesn't work as intended , for some reason the forum software removes the '+' from the expression, you have to insert manually the '+' between ##y^2## and ##s^2## and ##y^2## and ##2s^2## in the wolframalpha textbox.
 
Last edited:
  • Like
Likes sarsface and PeroK
Maxwell's equations are almost always simpler in differential form. Your problem is described by
$$\vec{\nabla} \cdot \vec{E}(\vec{x})=\frac{1}{\epsilon_0} \rho(\vec{x})=\frac{q}{\epsilon_0} \delta(\vec{x}).$$
Now you want to integrate ##\vec{\nabla} \vec{E}## over a cubic box of length ##2s## centered at the origin, which of course gives ##q/\epsilon_0##.

To see that the surface integral over the boundary of the box gives the same, you can of course do all this work you did, but it's more clever to argue with Gauss's Law instead. Just consider the volume ##V## consisiting of the box with a little sphere of radius ##a<s## taken out. Since in this volume ##\vec{\nabla} \cdot \vec{E}=0##, you have
$$0=\int_V \mathrm{d}^3 x \vec{\nabla} \cdot \vec{E}=\int_{\partial V} \mathrm{d}^2 \vec{f} \cdot \vec{E}.$$
Now the boundary consists of the boundary of the box and the spherical boundary of the whole (whose normal points towards the origin, i.e., away from the volume we integrate over). Thus you have
$$\int_{\text{sphere}} \mathrm{d}^2 \vec{f} \cdot \vec{E} = -\int_{0}^{\pi} \mathrm{d} \vartheta \int_0^{2 \pi} a^2 \sin \vartheta \frac{q}{4 \pi \epsilon_0 a^2}=-\frac{q}{\epsilon_0},$$
and thus
$$\int_{\partial \text{Box}} \mathrm{d}^2 \vec{f} \cdot \vec{E} = -\int_{\text{sphere}} \mathrm{d}^2 \vec{f} \cdot \vec{E} =\frac{q}{\epsilon_0}.$$
 
  • Like
Likes PeroK
@sarsface I don't see the point introducing spherical coordinates. Why not just use Cartesian?
 
I think that's what was done in the OP. The only problem is the final integral. As was shown in #2 this seems to lead to the correct result at least ;-)).

We just have to calculate the last integral. That can be solved with standard substitutions.

We have to calculate
$$I=\int \mathrm{d} y \frac{1}{(y^2+s^2)\sqrt{y^2+2 s^2}}.$$
The standard substitution for this kind of integrals is
$$y=\sqrt{2} s \sinh u, \quad \mathrm{d} y = \mathrm{d} u \sqrt{2} s \cosh u,$$
i.e.
$$s^2 I=\int \mathrm{d} u \frac{1}{2 s^2 \sinh^2 u + s^2}=\int \mathrm{d} u \frac{1}{\cosh^2 u + \sinh^2 u} = \int \mathrm{d} u \frac{\cosh^2 u- \sinh^2 u}{\cosh^2 u + \sinh^2 u}=\int \mathrm{d} u \frac{1-\tanh^2 u}{1+\tanh^2 u}.$$
Now
$$\tanh'u=1-\tanh^2 u,$$
and thus we substitute
$$v=\tanh u, \quad \mathrm{d} v=\mathrm{d} u (1-\tanh^2 u),$$
i.e.,
$$s^2 I=\int \mathrm{d} v \frac{1}{1+v^2}=\arctan v=\arctan(\tanh u)=\arctan \left (\frac{y}{\sqrt{y^2+2s^2}} \right).$$
Now just put in the boundaries, and you get the result quoted in #2.
 
  • Like
Likes Delta2, sarsface and PeroK
Delta2 said:
wolframalpha evaluates the integral as 2π3s2π3s. It suggests the substitution y=√2stanuy=2stan⁡u
https://www.wolframalpha.com/input/?i=integral+2s+dy/((y^2+s^2)sqrt(y^2+2s^2))+from+y=-s+to+y=sDidnt check your whole work but seems it is correct if i judge from the result. The cube has six faces, so the total flux is

6kqs2π3s=4πkq=qϵ06kqs2π3s=4πkq=qϵ0​
EDIT: I see the link doesn't work as intended , for some reason the forum software removes the '+' from the expression, you have to insert manually the '+' between y2y2 and s2s2 and y2y2 and 2s22s2 in the wolframalpha textbox.

Excellent, this is exactly the direction I needed. I can't see the step by step, but seeing the substitution selected makes it so clear that I should've seen that, not to mention my professor. Thanks a ton.
PeroK said:
@sarsface I don't see the point introducing spherical coordinates. Why not just use Cartesian?

The angles are simply from trig subbing. :wink:

vanhees71 said:
Maxwell's equations are almost always simpler in differential form. Your problem is described by

→∇⋅→E(→x)=1ϵ0ρ(→x)=qϵ0δ(→x).∇→⋅E→(x→)=1ϵ0ρ(x→)=qϵ0δ(x→).​

Now you want to integrate →∇→E∇→E→ over a cubic box of length 2s2s centered at the origin, which of course gives q/ϵ0q/ϵ0.

I hadn't actually seen the differential form before, I'm pretty new to electromagnetism, (I'm currently taking my first course on the subject.)

vanhees71 said:
I think that's what was done in the OP. The only problem is the final integral. As was shown in #2 this seems to lead to the correct result at least ;-)).

We just have to calculate the last integral. That can be solved with standard substitutions.

We have to calculate

I=∫dy1(y2+s2)√y2+2s2.I=∫dy1(y2+s2)y2+2s2.​

The standard substitution for this kind of integrals is

y=√2ssinhu,dy=du√2scoshu,y=2ssinh⁡u,dy=du2scosh⁡u,​

i.e.
s2I=∫du12s2sinh2u+s2=∫du1cosh2u+sinh2u=∫ducosh2u−sinh2ucosh2u+sinh2u=∫du1−tanh2u1+tanh2u.​
s2I=∫du12s2sinh2⁡u+s2=∫du1cosh2⁡u+sinh2⁡u=∫ducosh2⁡u−sinh2⁡ucosh2⁡u+sinh2⁡u=∫du1−tanh2⁡u1+tanh2⁡u.
Now

tanh′u=1−tanh2u,tanh′⁡u=1−tanh2⁡u,​

and thus we substitute

v=tanhu,dv=du(1−tanh2u),v=tanh⁡u,dv=du(1−tanh2⁡u),​

i.e.,

s2I=∫dv11+v2=arctanv=arctan(tanhu)=arctan(y√y2+2s2).s2I=∫dv11+v2=arctan⁡v=arctan⁡(tanh⁡u)=arctan⁡(yy2+2s2).​

Now just put in the boundaries, and you get the result quoted in #2.

Incredible, thanks a ton. I've never even used a hyperbolic trig substitution, but this method works out so elegantly. Thanks again!
 
Last edited:
  • Like
Likes vanhees71
Hello! Let's say I have a cavity resonant at 10 GHz with a Q factor of 1000. Given the Lorentzian shape of the cavity, I can also drive the cavity at, say 100 MHz. Of course the response will be very very weak, but non-zero given that the Loretzian shape never really reaches zero. I am trying to understand how are the magnetic and electric field distributions of the field at 100 MHz relative to the ones at 10 GHz? In particular, if inside the cavity I have some structure, such as 2 plates...
Back
Top