# Rayleigh-Jeans calculation of the number of modes

There are a acouple things I do not understand about the Rayleigh-Jeans calculation of the number of modes for the Blackbody problem. The blackbody is supposed yo be a cubic box of side $$a$$.

I have seen in several places such as this link, that to calculate the number of modes, they solve the wave equation for the electric field imposing that it has to be $$0$$ at the edges of the box. What I do not understand is that when making this calculation, they do not consider the electric field as a vector. For example, in the link, they say that the solution of the wave equation is: $$E = E_0 \sin \left( \frac{n_1 \pi x}{a} \right) \sin \left( \frac{n_2 \pi y}{a} \right) \sin \left( \frac{n_3 \pi z}{a} \right)$$ But shouldn't this be the solution of one component of the electric field? And, if this is the solution of only one component, are the $$n_i$$ factors the same for all 3 components?

Another thing that I do not understand is that when calculating the number of modes they say that we have to multiply by a factor of 2 to account for the polarisation of light. I do not really see where this factor comes from.

Any help will be welcomed, thanks in advance.

• Yes this has to be done for all cartesian components. The formula you wrote is wrong for perfectly reflecting cavity, only two factors can be $\sin$, the third one has to be $\cos$. But actually one does not need to consider perfectly reflecting cavity to derive the radiation spectrum, so this does not matter to the derivation. Dec 30, 2023 at 22:52

First, note that actually in addition to the three electric field components you mention, there are also 3 magnetic field components. So naively, by counting field components, there should be 6 modes for each $$n_x, n_y, n_z$$.

Second, we have to consider all of Maxwell's equations. Once we do, we find that only 2 of the 6 components of $$\vec{E}$$ and $$\vec{B}$$ are genuinely independent (in the sense that their value and time derivative can be specified as initial conditions), the rest of the components can be solved for in terms of the others using Maxwell's equations.

Physically, this leads to the conclusion that the electromagnetic field has two degrees of freedom, which correspond to the two polarizations of light (left and right circularly polarized waves).

Here is a sketch of a more detailed argument using Maxwell's equations.

We will consider them in vacuum, since that is the situation that applies to your box. Two of Maxwell's equations involve time derivatives $$\begin{eqnarray} \frac{\partial \vec{E}}{\partial t} &=& c^2 \nabla \times \vec{B}\\ \frac{\partial \vec{B}}{\partial t} &=& - \nabla \times \vec{E} \end{eqnarray}$$ As is shown in any E&M book, these two equations can be combined to yield a wave equation for $$\vec{E}$$ $$\begin{eqnarray} \frac{\partial^2 \vec{E}}{\partial t^2} + c^2 \nabla^2 \vec{E} &=& 0 \end{eqnarray}$$ as well as a condition (Ampere's law when $$J=0$$) that $$\nabla \times \vec{B} = \frac{1}{c^2}\frac{\partial \vec{E}}{\partial t}$$ The wave equation for $$\vec{E}$$ means (naively) that we should have to solve for 3 components of $$E$$ (but see below). The condition on $$B$$ tells us that 2 components of $$\vec{B}$$ can be derived once we know how $$\vec{E}$$ evolves in time. (Why two instead of three? Because $$\nabla \cdot \nabla \times \vec{B}=0$$ identically, so $$\nabla \times \vec{B}= \frac{1}{c^2}\frac{\partial \vec{E}}{\partial t}$$ is only two independent equations, even though it naively looks like it has three components).

But this isn't the end of the story, since there are two Maxwell's equations $$\begin{eqnarray} \nabla \cdot \vec{E} &=& 0 \\ \nabla \cdot \vec{B} &=& 0 \end{eqnarray}$$ These equations do not involve time derivatives, and remove two field components. In other words, for a given $$n_x, n_y, n_z$$, we can solve these two equations for two components among $$\{\vec{E}, \vec{B}\}$$, so those two components are not independent.

To summarize, we started with $$6$$ field components. But we found that $$2+2=4$$ of them are fixed by various relationships implied by Maxwell's equations. Therefore, only $$2$$ components are genuinely independent degrees of freedom.

Physically, these correspond to the two polarizations of light.

• How did you obtain the condition on $B$ ? I am a bit lost because combining this relation with $\frac{\partial E}{\partial t} = c^2 \nabla \times B$ yields $-\frac{\partial E}{\partial t} = \frac{1}{c^2} \frac{\partial E}{\partial t}$ which cannot happen unless $E$ does not depend on time. I also do not understand why $\nabla \times \nabla \times B = 0$ or why that proves the the other relation gives only two independent equations. @Adrew Dec 31, 2023 at 15:13
• @Sergio The condition(s) on $B$ are actually just Maxwell's equations (Faraday's law and Gauss's law). Someone edited my answer and changed what I originally wrote $\nabla \cdot \nabla \times B = 0$ to the incorrect $\nabla \times \nabla \times B = 0$, so maybe that helps resolve that confusion. If you work with a plane wave solution $\sim e^{i k \cdot x}$ in vacuum, then these various conditions boil down to saying $k \cdot E = k \cdot B = B \cdot E = 0$ (the $k$, $E$, and $B$ fields are mutually perpendicular). So there are only 2 independent components of $E$ perpendicular to $k$... Dec 31, 2023 at 16:05
• ...then the direction of $B$ is fixed by being perpendicular to $E$ and $k$, and the magnitude is fixed since it has to be equal to $E$ in appropriate units. Dec 31, 2023 at 16:05
• I am sorry but I still do not understand where does $\nabla \times B = -\frac{\partial E}{\partial t}$ come from, because that is not Faraday's law. @Andrew Dec 31, 2023 at 18:34
• @Sergio Sorry it's Ampere's law (got the name wrong). It looks like I messed up the sign and a factor of $c^2$, but the point is still that when you know $E(t)$ then you can solve this equation (plus Gauss's law $\nabla \cdot B = 0$) to get $B$. Dec 31, 2023 at 20:18

Take the direction of the propagation in the cavity to be the $$z$$ direction.

But shouldn't this be the solution of one component of the electric field? And, if this is the solution of only one component, are the ni factors the same for all 3 components?

The most general form standing wave (pg 28) is $${\bf E }= c_1E_0 \cos \left( \frac{n_1 \pi x}{a} \right) \sin \left( \frac{n_2 \pi y}{a} \right) \sin \left( \frac{n_3 \pi z}{a} \right){\bf \hat{x}} + c_2E_0 \sin \left( \frac{n_1 \pi x}{a} \right) \cos \left( \frac{n_2 \pi y}{a} \right) \sin \left( \frac{n_3 \pi z}{a} \right){\bf \hat{y}}$$ because we can have both $$x$$ and $$y$$ polarized light or a superposition of them. This also answers why you multiply the modes by 2: to account for the fact that we have 2 possible linearly independent polarizations (and so 2 "versions" of each $$[n_1,n_2,n_3]$$).

Hyperphysics didn’t write the basis vectors but they should be there.

As an aside, the fact that there is $$\cos$$ doesn’t change the mdoe counting argument for the question’s purpose. From a comment by Ján Lalijský:

the real reason for why not all factors can be sin is that then divergence of electric field could not vanish everywhere inside the cavity. When i-th cartesian component of electric field has a cos factor depending on i-th coordinate and the others are sins, then divergence of electric field can vanish everywhere (for proper wave numbers k1,k2,k3 respecting the boundary condition of the perfectly reflecting walls).

• If the cavity walls are perfectly reflecting, the electric field component lying in the plane of the wall has to be zero, thus the factor depending on $y$ or $x$ has to be cos, not sin. But this actually does not matter for derivation of the radiation spectrum, one can consider any cuboid in space, even with imaginary walls, where no boundary condition is imposed. Dec 30, 2023 at 22:53
• This is still wrong, the spatial direction with the cos term has to be the same as that of the component we are expressing. Thus for $E_x$, the cos term has to depend on $x$, and for $E_y$, the cos term has to depend on $y$. Dec 30, 2023 at 23:06
• Edited, thanks. Dec 30, 2023 at 23:10
• Sorry, the real reason for why not all factors can be sin is that then divergence of electric field could not vanish everywhere inside the cavity. When $i$-th cartesian component of electric field has a cos factor depending on $i$-th coordinate and the others are sins, then divergence of electric field can vanish everywhere (for proper wave numbers $k_1,k_2,k_3$ respecting the boundary condition of the perfectly reflecting walls). Dec 30, 2023 at 23:16
• Incorporating this. Dec 30, 2023 at 23:20