Let be a spherical volume of radius that completely encloses all charges, meaning the charge density vanishes for all . Without loss of generality, we place the coordinate origin at the center of the sphere . According to Coulomb's law, the electric field at any field point inside the sphere is given by the volume integral over the source coordinates ,
We want to evaluate the volume integral of over the entire sphere ,
Since the region of integration is bounded and the charge distribution is well-behaved, we can apply Fubini's theorem to switch the order of the volume integrals over and ,
Let us denote the inner vector integral as ,
We recognize that the integrand can be expressed as the negative gradient with respect to the field point ,
Substituting this identity into and applying a corollary of the divergence theorem (converting a volume integral of a gradient into a closed surface integral), we obtain,
where represents the bounding spherical surface at , and is the outward unit normal vector. On this spherical surface, the field point is (where is the radial unit vector ), and the area element is . Thus, the integral becomes,
Because all charges are enclosed within the sphere, the source point always lies inside (), while the field point in the surface integral lies exactly on the boundary (). Since , we can expand the reciprocal distance into a series of Legendre polynomials,
where is the angle between and .
To evaluate the solid angle integral, we temporarily align the -axis along the direction of , making (the standard polar angle). The unit vector expands in Cartesian components as,
Integrating over the azimuthal angle from to , the terms containing and vanish identically due to periodicity. The only surviving component is along the direction (which is the direction of ),
Noting that , we invoke the orthogonality condition for Legendre polynomials,
Hence, only the term yields a non-zero contribution to the infinite series,
Substituting this result back into the expression for , the radius cancels out smoothly,
We now feed back into our original total electric field volume integral,
By definition, the total electric dipole moment of the localized charge distribution with respect to our chosen origin is,
Replacing the integral with , we arrive at,
Next, we consider the alternative case where all charges lie entirely outside the spherical volume , meaning the charge density vanishes for all . According to Coulomb's law, the electric field at any field point inside the sphere is given by the volume integral over the external source coordinates ,
We want to evaluate the volume integral of over the entire sphere ,
Since the region of integration is bounded and the charge distribution is well-behaved, we can apply Fubini's theorem to switch the order of the volume integrals over and again,
Let us also denote the inner vector integral as ,
We recognize that the integrand can be expressed as the negative gradient with respect to the field point ,
Substituting this identity into and applying a corollary of the divergence theorem (converting a volume integral of a gradient into a closed surface integral), we obtain,
where represents the bounding spherical surface at , and is the outward unit normal vector. On this spherical surface, the field point is (where is the radial unit vector ), and the area element is . Thus, the integral becomes,
Because all charges lie outside the sphere, the source point always lies exterior (), while the field point in the surface integral lies exactly on the boundary (). Since , we can expand the reciprocal distance into a series of Legendre polynomials,
where is the angle between and .
To evaluate the solid angle integral, we temporarily align the -axis along the direction of , making (the standard polar angle). The unit vector expands in Cartesian components as,
Integrating over the azimuthal angle from to , the terms containing and vanish identically due to periodicity. The only surviving component is along the direction (which is the direction of ),
Noting that , we invoke the orthogonality condition for Legendre polynomials:
Hence, only the term yields a non-zero contribution to the infinite series,
Substituting this result back into the expression for , the variable factors yield,
We now feed back into our original total electric field volume integral,
By definition, the electric field evaluated at the origin (the center of the sphere) produced by the external charge distribution is given by,
Replacing the integral with , we arrive at,
Now, If all currents are contained within the sphere , according to the Biot-Savart law, the magnetic field at any field point inside the sphere is given by the volume integral over the localized current density ,
We want to evaluate the volume integral of over the entire sphere ,
Since the region of integration is bounded and the current distribution is well-behaved, we can apply Fubini's theorem to switch the order of the volume integrals over and ,
Because the inner integral is performed with respect to the field coordinates , the current density treats it as a constant vector factor. Thus, we can pull out of the inner integration while carefully maintaining the vector cross product structure,
We immediately recognize that the vector integral inside the brackets is identical to the inner integral defined in the electrostatic case,
Since all currents are enclosed within the sphere, the source point always lies inside (). We can directly substitute our previously derived result for when , which is ,
Using the anticommutativity of the cross product (), the negative sign is smoothly absorbed by reversing the order of the vectors,
By definition, the total magnetic dipole moment of the localized current distribution is given by,
Replacing the integral with , we arrive at the final result,
Next, we consider the alternative case where all currents lie entirely outside the spherical volume , meaning the current density vanishes for all . According to the Biot-Savart law, the magnetic field at any field point inside the sphere is given by the volume integral over the external source coordinates ,
We evaluate the volume integral of over the entire sphere , and switch the order of integration via Fubini's theorem,
Because all currents lie outside the sphere, the source point always satisfies . Utilizing the corresponding external result for the inner integral , we substitute it back into the equation,
Applying the anticommutativity of the cross product to eliminate the negative sign yields,
By definition, the magnetic field evaluated at the center of the sphere produced by the external current distribution is given by,
Replacing the bracketed integral with , we arrive at,
2 Rotation of harmonics & Wigner -Matrices *
Spherical harmonics form a -dimensional irreducible representation of . Under a coordinate rotation parameterized by the Euler angles , the total angular momentum quantum number remains invariant because the rotation operator commutes with the total angular momentum squared: . However, the azimuthal projection undergoes a linear transformation.
The transformed spherical harmonic in the rotated frame can be expressed as a linear combination of the original basis functions,
where are the elements of the Wigner -matrix. We find that the entire rotation operator can be directly written as . Thus, Wigner -matrix can be factorized into a product of exponentials and Wigner's small -matrix,
Here, Wigner's small -matrix describes the rotation around the -axis,
Since spatial rotations preserve the norm of the state space, the Wigner -matrix is strictly unitary,
In particular, when the second projection index is set to zero (), the Wigner -matrix simplifies directly to a spherical harmonic,
Let denote the angle between the points and on the spherical surface. By first rotating the coordinate system anticlockwise by an angle of about the -axis and then by an angle of about the -axis, one find,
For ex., consider a frame's anticlockwise rotation around the -axis () within the subspace. The Wigner small -matrix evaluates to,
where rows and columns map to respectively. We construct the linear combination . The rotation gives,
Consequently, an anticlockwise rotation of the frame by around the -axis maps the old -axis onto the new -axis (). This means the original -oriented dipole transforms directly into a -oriented dipole .
Finally, the Wigner -matrix and small -matrix elements can be computed analytically using the built-in WignerD function in Wolfram Mathematica (MMA), with the following syntax,
Btw, the result from MMA differs by a transpose from the discussion above, but we still follow the same convention as Wikipedia and most textbooks.
3 Example: 2D Laplace Equation in a Rectangular Pipe
An infinitely long rectangular conducting pipe is formed by four mutually insulated plates. Three of the plates are maintained at zero potential, while the fourth is kept at a constant potential . Find the electrostatic potential inside the pipe?
Let the cross-section of the pipe have a width along the -axis and a height along the -axis. Due to translational symmetry along the infinite length (-axis), . The problem reduces to a 2D domain: and . The boundary conditions are:
The potential inside the charge-free pipe satisfies the 2D Laplace equation, Substituting and dividing by yields,
Since the -direction is bounded on both ends and requires zero potential at the boundaries, it must yield an oscillatory (trigonometric) solution. Thus, we assign a negative separation constant to the -term:
The general solution for is . Applying the boundary conditions yields the discrete eigenvalues,
For the -direction, the general solution to is expressed via hyperbolic functions as . Imposing the base boundary condition , leaving .
Invoking the principle of linear superposition, the total potential inside the pipe is represented as the infinite series:
To determine the remaining coefficients , we apply the final inhomogeneous boundary condition at the top plate ,
Exploiting the orthogonality of the sine functions over the interval , we project the constant potential into its Fourier components,
This integral vanishes for all even integers . For odd integers, letting (where ), the non-zero coefficients are isolated as,
Substituting back into the generalized series provides the final analytical solution for the potential distribution inside the rectangular pipe,
4 Physical Interpretation of the Sign and Energy Definitions *
The choice of a positive sign in the generalized force relation arises from the thermodynamics of systems with constant currents, which differs fundamentally from electrostatic systems. Two distinct definitions of magnetic interaction energy exist depending on the physical constraints of the system,
Passive Mechanical Potential Energy ()
This definition treats the magnetic dipole as a rigid, isolated system with fixed currents where no external energy exchange occurs during displacement. In this case, the mechanical work is done entirely at the expense of this potential energy, preserving the classical relation .
Field Interaction Energy ()
This is derived directly from the macroscopic field energy expression . Here, the currents are held strictly constant during any displacement. To maintain constant currents against the back-EMF induced by the motion, external power supplies must perform work on the system.
A more explicit comparison is presented here. In an electric field with fixed charges, when an electric dipole is displaced, the charge distribution remains naturally invariant, and no external energy is required to maintain the charges. Consequently, the mechanical work is done entirely at the expense of the electrostatic potential energy, satisfying the classical mechanical relation , where .
But in a magnetic field with fixed currents, when a loop (magnetic dipole) undergoes displacement, the variation in magnetic flux induces an electromotive force within the circuit which tends to change the current inrensity. To maintain a constant current within the loop, the external power supplies maintaining the current must perform work against this induced EMF. The work done by the sources is precisely twice the mechanical work performed (), which leads to .
To prove the relation and demonstrate the mechanism of the external sources, consider a system of two circuits with constant currents and , self-inductances and , and mutual inductance . The total magnetic energy of the system is,
When circuit undergoes a virtual displacement , the mutual inductance changes by . The mechanical work done by the magnetic force is,
Concurrently, the changing magnetic flux induces electromotive forces in both circuits due to Faraday's law,
To maintain constant currents, the external power sources must counteract these induced EMFs, performing work equal to,
The change in the stored field energy is the difference between the energy supplied by the sources and the mechanical work performed,