Feeds:
Posts

## Derivation of the Rayleigh-Jeans law – part 2

In part 1 of this blog I showed that the 1-dimensional (let’s say the x-direction) wave equation for the electric field $\vec{E}(x,t) = E \sin(kx - \omega t)$ is

$\frac{ d^{2}E }{dx^{2} } = \frac{ 1 }{ c^{2} } \frac{ d^{2} E }{dt^{2} }$

and that this can be generalised to the 3-dimensional wave equation

$\frac{ \partial^{2} E }{ \partial x^2 } + \frac{ \partial^{2} E }{ \partial y^{2} } + \frac{ \partial^{2} E }{ \partial z^{2} } = \frac{1}{c^2} \frac{ \partial^{2} E }{ \partial t^{2} }$

By analogy to the 1-D electric field, the 3-D electric field (that is, travelling in any direction) can be written as

$\vec{E}(r,t) = E \sin( k\vec{r} - \omega t )$

The direction $\vec{r}$ of the electric field can be split into its x,y and z components so that $\vec{r} = \vec{x} + \vec{y} + \vec{z}$, and the wavenumber $k$ can be split into its x,y and z-components such that $k = \sqrt{k_{x}^2 + k_{y}^2 + k_{z}^2}$ ($k_{x},k_{y} \text{ and } k_{z}$ are not generally the same value, unless the wave is travelling at 45 degrees to each of the axes).

We can then write

$\vec{E}(r,t) = \vec{E}(x,y,z,t) = E \sin (k_{x}x + k_{y}y + k_{z}z - \omega t)$

## Radiation in a cubical cavity

Remember, for blackbody radiation we need to enclose the radiation in a cavity with perfectly reflective walls, so that the radiation and the matter (thin gas in our example) can come into thermal equilibrium with each other with no loss of energy. For simplicity, the cavity will be a cube where each side will be of length $L$.

We are going to define the vertical direction as the z-direction, the direction to the right as the y-direction, and the direction towards us as the x-direction, as shown in the figure above. We need the electric field to be zero at the walls, because if it were non-zero the electric field would impart energy to the cavity walls and lose energy itself. If the electric field needs to be zero at the walls, this means its x,y and z-components $E_{x}, E_{y} \text{ and } E_{z}$ also need to be zero at the walls.

Thus, only electric fields with suitable wavelengths can exist in the cavity. This is analogous to standing waves on a string, if we have two fixed ends (such as a guitar string), only certain wavelengths can exist. In the diagram below I show the first four possible “modes” for the electric field between the two walls a distance $L$ apart [first four in the sense that the one with the lowest frequency (longest wavelength) is the yellow curve, then the next lowest frequency is the blue curve, then the green, and finally the black].

In the graph above, the x-axis is in units of $L$, so $1$ corresponds to $L=1$. The yellow curve is the lowest frequency (longest wavelength) wave that can exist between the two walls. Again, using the analogy of standing waves on a string, this would be the fundamental wave, the lowest note the string could produce. The equation which describes this yellow curve is $y=\sin( \frac{ \pi x }{ L })$, but remember we can also write, for any wave, $y=\sin(k x)$ where $k$ is the wavenumber which we introduced in part 1 of this blog. $k$ is the number of waves per unit wavelength, and is related to the wavelength via the equation $k = \frac{ 2\pi }{ \lambda } \text{ where } \lambda$ is the wavelength.

So, if $k$ for the green curve is equal to $\frac{ \pi }{ L }$, we can write $\lambda = \frac{ 2\pi }{ k } = \frac{ 2\pi L }{ \pi } = 2L$, so half of the wave fits between the two walls.

For the blue curve, we have $y = \sin ( \frac{ 2 \pi x }{ L } )$, and so $k = \frac{ 2 \pi }{ L }$ which leads to $\lambda = \frac{ 2 \pi }{ k } = \frac{ 2 \pi L}{ 2 \pi } = L$, and as we can see the blue curve has one complete wavelength between the two walls.

For the green curve, we have $y = \sin ( \frac{ 3 \pi x }{ L } )$, and so $k = \frac{ 3 \pi }{ L }$ which leads to $\lambda = \frac{ 2 \pi }{ k } = \frac{ 2\pi L }{ 3 \pi } = \frac{ 2L }{ 3 }$; the wavelength of the green curve is 2/3rds of the distance L, or to put it another way there are one and a half waves of the green curve between the walls.

Finally, for the black curve, we have $y = \sin( \frac{ 4\pi x }{ L } )$ and so $k = \frac{ 4 \pi }{ L }$ which leads to $\lambda = \frac{ 2\pi L }{ 4\pi } = \frac{ 2 L }{ 4 } = \frac{ L }{ 2 }$, so the wavelength is half the distance between the two walls, meaning there will be two complete waves between the walls.

I have only shown the first four possible waves, but of course in reality we can have $y=\sin( \frac{ 5\pi x }{ L } ), y=\sin( \frac{ 6\pi x }{ L } )$ etc., so in general we can write $y=\sin( \frac{ n \pi x }{ L } )$ where $n=1,2,3,4,5,6$ etc. In theory, $n \text{ can take any value from } 1 \text{ to } \infty$.

So, in the x-direction we can write that

$E_{x}=E \sin ( \frac{ n \pi x }{ L })$.

Although the wavelength of the x,y and z-components of the EM are all the same, there may not be the same number of wavelengths in the x,y and z-directions between the walls. For example, if the wave is travelling wholly horizontally then there may be no electric field component in the vertical (z) direction, and if it is travelling horizontally at e.g. $30^{\circ}$ to the left hand wall then the distance the wave is travelling in the y-direction will be $\sqrt{ 3 }$ times the distance it travels in the x-direction. Because of this, although we can write similar equations for $E_{y} \text{ and } E_{z}$, the values of $n$ will be different.

Therefore, we are going to write

$E_{x} = E \sin ( \frac{ n_{x} \pi x }{ L }), E_{y} = E \sin ( \frac{ n_{y} \pi y }{ L }) \text{ and } E_{z} = E \sin ( \frac{ n_{z} \pi z }{ L })$

where $n_{x}, n_{y} \text{ and } n_{z}$ are related to the number of waves between the walls in each of the x,y and z-directions via $k_{x}=\frac{ n_{x} \pi }{ L }, k_{y}=\frac{ n_{y} \pi }{ L } \text{ and } k_{z}\frac{ n_{z} \pi }{ L }$ in each of the spatial directions.

Remember the electric field in 3-D can be written as

$\vec{E} = E\sin(k_{x}x + k_{y}y +k_{z}z - \omega t) \text{. But } k_{x}x = \frac{ n_{x} \pi x }{ L } \text{ etc. and } \omega = 2\pi \nu = \frac{ 2 \pi c }{ \lambda }$

so we can write the electric field in 3-dimensions as

$\vec{E} = E \sin( \frac{ n_{x} \pi x }{ L } + \frac{ n_{y} \pi y }{ L } + \frac{ n_{z} \pi z }{ L } - \frac{ 2 \pi c t }{ \lambda } )$

You may remember from trigonometry that $\sin(A+B) = \sin(A)\cos(B) + \cos(A)\sin(B)$ (the so-called compound angle formula. Although it is pretty tedious to prove it (see for example this link), we can write

$\sin(X+Y+Z) = \sin(X)\cos(Y)\cos(Z) + \cos(X)\sin(Y)\cos(Z) + \cos(X)\cos(Y)\sin(Z) - \sin(X)\sin(Y)\sin(Z)$

(where we have written $X,Y \text{ and } Z$ to represent $\frac{ n_{x} \pi x }{ L }$ etc.). To find $\sin(X+Y+Z-T)$ (where $T= \frac{ 2 \pi c t }{ \lambda }$) is even more tedious, and also involves working out $\cos(X+Y+Z)$, but if you go through it you will find (eventually!) that

$\sin(X+Y+Z-T) = \sin((X+Y+Z)-T) = \sin(X+Y+Z)\cos(T) -\cos(X+Y+Z)\sin(T)$

where $\cos(X+Y+Z)$ can be written

$\cos(X+Y+Z) = \cos(X)\cos(Y)\cos(Z) - \sin(X)\sin(Y)\cos(Z) - \sin(X)\cos(Y)\sin(Z) - \cos(X)\sin(Y)\sin(Z)$

and so

$\sin(X+Y+Z-T) = \sin(X)\cos(Y)\cos(Z)\cos(T) + \cos(X)\sin(Y)\cos(Z)\cos(T) + \cos(X)\cos(Y)\sin(Z)\cos(T) - \sin(X)\sin(Y)\sin(Z)\cos(T) - \cos(X)\cos(Y)\cos(Z)\sin(T) + \sin(X)\sin(Y)\cos(Z)\sin(T) + \sin(X)\cos(Y)\sin(Z)\sin(T) + cos(X)\sin(Y)\sin(Z)\sin(T)$

Remember, however, that the electric field has to be zero at the walls, and in particular at the origin where $X=Y=Z=0$. This means that all the terms with $\cos(X) \text{ or } \cos(Y) \text{ or } \cos(Z)$ will disappear, and so the above expression will simplify to

$\sin(X+Y+Z-T) = - \sin(X)\sin(Y)\sin(Z)\cos(T)$

But, unlike the values of $X=0,Y=0 \text{ and } Z=0$ which are determined by the origin of the cavity, the value of $T=0$ is completely arbitrary, so we can just shift it by $\omega = \pi/2$ (one quarter of a period) to give us $\cos(T+\pi/2) = -\sin(T)$ and then we have

$\sin(X+Y+Z-T) = \sin(X)\sin(Y)\sin(Z)\sin(T)$

Replacing our $X,Y,Z \text{ and } T$ we have

$\vec{E} = E\sin(\frac{ n_{x} \pi x }{ L }) \sin(\frac{ n_{y} \pi y }{ L }) \sin(\frac{ n_{z} \pi z }{ L }) \sin(\frac{ 2 \pi ct }{ \lambda })$
Then,using the 3-dimensional wave equation we had earlier

$\frac{ \partial^{2} E }{ \partial x^2 } + \frac{ \partial^{2} E }{ \partial y^{2} } + \frac{ \partial^{2} E }{ \partial z^{2} } = \frac{1}{c^2} \frac{ \partial^{2} E }{ \partial t^{2} }$
we will need to work out $\frac{ \partial^{2} E }{ \partial x^{2} }$ etc.

$\frac{ \partial E }{ \partial x } = \frac{ \partial }{ \partial x } E\sin(\frac{ n_{x} \pi x }{ L }) = E \frac{ n_{x} \pi }{ L } \cos(\frac{ n_{x} \pi x }{ L })$
and
$\frac{ \partial^{2} E }{ \partial x^{2} } = -E (\frac{ n_{x} \pi }{ L })^{2} \sin( \frac{ n_{x} \pi x }{ L }) = -E_{x} (\frac{ n_{x} \pi }{ L })^{2}$

If we do the same thing for $\frac{ \partial^{2} E }{ \partial y^{2} }, \frac{ \partial^{2} E }{ \partial z^{2} } \text{ and } \frac{ 1 }{ c^{2} } \frac{ \partial^{2} E }{ \partial t^{2} }$ we get

$(\frac{ n_{x} \pi }{ L })^{2} + (\frac{ n_{y} \pi }{ L })^{2} + (\frac{ n_{z} \pi }{ L })^{2} = \frac{ 1 }{ c^{2} } (\frac{ 2 \pi c }{ \lambda })^{2} = (\frac{2 \pi }{ \lambda })^{2}$

which simplifies to

$n_{x}^{2} + n_{y}^{2} + n_{z}^{2} = \frac{ 4 L^{2} }{ \lambda^{2} }$.

This is the so-called “standing wave solution to the wave equation for a cubical cavity with sides of length L”. In part 3 of this blog I will explain what this solution means in terms of the number of allowed EM-wave modes that can exist in the cavity.

Part 1 of this blog can be found here, and Part 3 is here.

### 34 Responses

1. […] Part 2 of this blog is here […]

2. […] (ignoring the magnetic component as it is much smaller than the electric component ) as In part 2 I showed that, for EM waves in a cubic cavity with sides of length the only modes which can exist have to […]

3. “we will need to work out \frac{ \partial^{2} E }{ \partial x^{2} } etc.”

Hi there, I had a question. You wrote the above comment towards the bottom of the article, and my question begins at this point. It seems after taking the double partial derivative with respect to a coordinate axis, you rename the resulting trigonometric (sin) term into E_{x,y,z}. How does this E term suddenly fall away when you write:

(\frac{ n_{x} \pi }{ L })^{2} + (\frac{ n_{y} \pi }{ L })^{2} + (\frac{ n_{z} \pi }{ L })^{2} = \frac{ 1 }{ c^{2} } (\frac{ 2 \pi c }{ \lambda })^{2} = (\frac{2 \pi }{ \lambda })^{2}

I had to derive a one and two dimensional situation for a homework assignment, and I essentially had to skip over this part because I wasn’t sure how these terms disappear. Although I did assume \frac{4L²}{(\lambda)²} was still the result for other dimensions.

This is something that I didn’t find explained anywhere else, but your post helped me more than any other source I could find, so I decided to ask here. Thank you very much 🙂

• Sorry about my above reply, I thought the text would be converted to formulas!

I suppose to help clarify, my question begins at the point towards the bottom where you write:

“we will need to work out etc.”

Below that you solve the second partial derivative with respect to a single dimension, solving for an equation with a coefficient multiplied by E(x)

The E term suddenly disappears when you write:

nx² + ny² +nz² = 4L²/lambda²

My question was how the E(x), E(y), E(z) terms disappear when you simplify the expression. Thank you!

• To include Latex in my posts I have to start the Latex formula with a $sign followed immediately by the word “latex” (no quotation marks). I’ve never tried this in the comments section. Let’s try here $E_{x}$ and see what that produces. 4. Hello. Thank you for the derivation. I am a college chemistry professor who has decided to go back and fill in some of the gaps in my knowledge of QM, but I wanted to go and learn in more gory detail than when I first learned it. So, I am starting with trying to understand how exactly the classical physicists thought and derived their results. I really like the derivation you have. I do have a couple questions. I will break them up into different comments for ease of reply. 1. You keep using the phrase that “matter and radiation are in thermal equilibrium with each other”, and I find this phrase confusing. My understanding is that heat is a form of radiation. So, how can radiation be in thermal equilibrium with each other. I understand how two bodies can be in thermal equilibrium (i.e., they are at the same temperature and exchange heat with each other at the same rate), but I can’t seem to make sense of it as it applies to radiation. How is radiation in thermal equilibrium with anything? An answer to this question will help me on my way to understanding the argument being made. • Sorry for the delay in responding, I have been on holiday. In physics, heat is thermal energy in the process of transfer or conversion. So when I say that the matter and radiation are in thermal equilibrium with each other (a necessary condition for blackbody radiation), what I mean is that the average energy of the photons (given by $E=h\nu_{peak}$ where $\nu_{peak}$ is the frequency of the peak of the blackbody spectrum) is the same as the average energy of the atoms (which, for an ideal gas is given by $E=\frac{1}{2}mv^{2}_{average}$ (where $v_{average}$ is the average velocity of the atoms). Does that make sense? • That makes perfect sense, and I appreciate the time you have taken. Don’t worry about replying right away. I can wait. 🙂 I also have been finding various resources. One such resource found as a footnote in another QM text was Eisberg’s “Fundamentals of Modern Physics.” I found a statement that I’d like your comment on: “As we have said, every body at a temperature greater than absolute zero emits this radiation. In the classical theory, this can be pictured as the result of the acceleration of electric charges near the surface due to thermal agitation… the energy emitted as thermal radiation is supplied by the thermal agitation energy. We shall also be concerned with the absorption of thermal radiation by a surface. In this process, energy is removed from incident thermal radiation, through its action on electric charges, and ends up as thermal agitation energy.” So, if these two properties are happening at the same rate (emissivity = absorptivity = 1), is this another way of saying that the radiation and the matter are in thermal equilibrium? • Yes, and the statement that the emissivity=absorptivity=1 is also a necessary property of a blackbody. A blackbody is an object that is a perfect emitter/absorber. 5. 2, I was following your derivation all the way up until you got to: $\overrightarrow{E} =E\sin{(\frac{n_{x} \pi}{L})}\sin{(\frac{n_{y} \pi}{L})}\sin{(\frac{n_{z} \pi}{L})}\sin{(\frac{2 \pi ct}{ \lambda})} I have not been able to figure out how you derived this equation given:$latex \overrightarrow{E} =E_{x}+E_{y}+E_{z} and $E_{x} =E\sin{(k_{x}x-\omega t)}, etc. I substituted the second equation(s) into the first to get:$latex \overrightarrow{E} =E\sin{(k_{x}x-\omega t)}+E\sin{(k_{y}y-\omega t)}+E\sin{(k_{z}z-\omega t)} Now, I understand you substitute in for k and omega. I did that. However, after that I am stuck. I assume that you are using some trig identity to get to the equation above (the solution to the 3D wave equation), but have not been able to figure it out. Again, I’m assuming that it is something very simple and I’m just not seeing it for some reason. What am I missing? • Sorry. I’m not used to the latex. I hope you can follow my question. • I have re-written this part of the derivation to make this step more clear (even though it involves introducing some pretty tedious trigonometry, I could not find it explained anywhere so decided this blog was as good a place as any to explain it!). I hope this makes it clearer. • I really appreciate you taking the time to do that, and it was very helpful. As you noted there is nowhere else online where these steps are made explicit. Well, now there’s at least one place. I will go through your steps and let you know if I have any other questions. Slowly but surely I’m understanding the concepts behind the derivation. I’m so glad that I asked the questions! • Not seeing all (most?) of the steps laid out was part of my motivation for blogging about this particular topic 🙂 6. 3. My last question regarding your derivation has to do with the very next step once you get to $\overrightarrow{E} =\sin{(\frac{n_{x} \pi x}{L})}\sin{(\frac{n_{y} \pi y}{L})}\sin{(\frac{n_{z} \pi z}{L})}\sin{(\frac{2 \pi ct}{\lambda})}$ I understand that at this point we want to take the partial derivatives of this equation in order to plug into the 3D wave equation and derive the final result. I see that you take the partial derivatives of only part of $\overrightarrow{E}$ , but not the whole equation. For example, you take the partial derivative with respect to x of $\sin{(\frac{n_{x} \pi x}{L})}$ but not $\overrightarrow{E} =\sin{(\frac{n_{x} \pi x}{L})}\sin{(\frac{n_{y} \pi y}{L})}\sin{(\frac{n_{z} \pi z}{L})}\sin{(\frac{2 \pi ct}{\lambda})}$ I am trying to figure out why this is. The only reason I can come up with that makes sense to me is that the other terms go away since you are also multiplying by the unit vectors i, j, and k, which are orthogonal. The x component remains and the y and z components are dropped. I’m pulling this out completely from memory and have not had a chance to do some research. So, in your reply feel free to re-word what I’m trying to say. Of course, if I’m totally off on this I appreciate any direction you can give me. Thank you so much for your time. • Sorry, I should have been more explicit. I could equally have written $\frac{ \partial E }{ \partial x } = \frac{ \partial }{ \partial x } E \sin \left( \frac{ n_{x} \pi x }{ L } \right) \sin \left( \frac{ n_{y} \pi y }{ L } \right) \sin \left( \frac{ n_{z} \pi z }{ L } \right) \sin \left( \frac{ 2 \pi c t }{ \lambda } \right)$ because $\frac{ \partial }{ \partial x } E \sin \left( \frac{ n_{x} \pi x }{ L } \right) \sin \left( \frac{ n_{y} \pi y }{ L } \right) \sin \left( \frac{ n_{z} \pi z }{ L } \right) \sin \left( \frac{ 2 \pi c t }{ \lambda } \right) \\ \\ = \left( \frac{ n_{x} \pi x }{ L } \right) E \cos \left( \frac{ n_{x} \pi x }{ L } \right) \sin \left( \frac{ n_{y} \pi y }{ L } \right) \sin \left( \frac{ n_{z} \pi z }{ L } \right) \sin \left( \frac{ 2 \pi c t }{ \lambda } \right)$ and then $\frac{ \partial^{2} E}{ \partial x^{2} } = - \left( \frac{ n_{x} \pi x }{ L } \right)^{2} E \sin \left( \frac{ n_{x} \pi x }{ L } \right) \sin \left( \frac{ n_{y} \pi y }{ L } \right) \sin \left( \frac{ n_{z} \pi z }{ L } \right) \sin \left( \frac{ 2 \pi c t }{ \lambda } \right) \\ \\ = - \left( \frac{ n_{x} \pi x }{ L } \right)^{2} E$ Similarly, $\frac{ \partial^{2} E}{ \partial y^{2} } = - \left( \frac{ n_{y} \pi x }{ L } \right)^{2} E \text{ and } \frac{ \partial^{2} E}{ \partial z^{2} } = - \left( \frac{ n_{z} \pi x }{ L } \right)^{2} E$ and, for the time component $\frac{ \partial^{2} E}{ \partial t^{2} } = - \left( \frac{ 2 \pi c }{ \lambda } \right)^{2} E$ • Thank you again! While you were on holiday I took the time to dust off my calculus and try to derive it, and I basically came to the same conclusion. Thank you for confirming that I was doing my math properly. 🙂 I appreciate you taking the time. • You’re welcome. I had to remind myself of a few things too in order to set out some of the steps I’d skipped over 😉 7. Any telling when the derivation of Planck’s Law will be available? 🙂 • Hopefully by the end of September (2014 😛 ) 8. Hi there, thanks for the detailed derivation of Rayleigh jeans law, where is the derivation of Planck’s law. • I plan to do it in the next two to three weeks. • Thank you so much for your quick response. I am waiting impatiently for it. 9. […] did on the derivation of the Rayleigh-Jeans law, which I posted in three parts (part 1 here, part 2 here and part 3 here). I have had many thousands of hits on this series, but several people have asked […] • Its very thorough and clear. I found it immensely helpful! I got stuck a little on the part where all the terms having cosX or cosY or cosZ must disappear. It might seem like a pedantic point but I understand why at the origin the value of the expression must be zero and that all but one of the terms will be zero for all values of T. What confuses me is the term ‘disappears’ – how? By making all the terms containg one of the cosines equal zero? Or because they cross out? Or it really does not matter? By the way there is a typo in the part where you substitute k for lambda to derive the value of lambda for the 4 initial modes – k equals pi/L for the yellow not the green curve 10. Can someone help to explain to me why sin(X + Y + Z – T) = -sin(X)sin(Y)sin(Z)cos(T). I really can’t see this part. I am lost at that point. Thanks • This is a mathematics question. You have to split sin(X + Y + Z – T) into e.g. sin(A – T) where A=X+Y+Z. That is, you have to do it step by step. You start off with sin(X+Y) = sin(X)cos(Y)+cos(X)sin(Y), then you have sin(X+Y+Z) is going to be sin(A+Z) where sin(A) is now sin(X)cos(Y)+cos(X)sin(Y), and so on. • Hi Dr Evans, is the same person (bbspik) again. I can follow how the expression sin(X + Y + Z – T) is fully expanded to the superlong individual terms of sines and cosines multiplied together. What I can’t grasp is the following. “Remember, however, that the electric field has to be zero at the walls, and in particular at the origin where X=Y=Z=0. This means that all the terms with cos(X) or cos(Y) or cos(Z) will disappear, and so the above expression will simplify to sin(X + Y + Z – T) = -sin(X)sin(Y)sin(Z)cos(T)” How does this come about? at X=Y=Z=0 shouldn’t the sine terms also be zero? How does the expression simplify to the above. I don’t doubt the expression what I can’t see is how does it simplify just to that shorter term from the numerous other terms. Thank you so much in advance. Paul • Because the electric field at the walls has to be zero, we have that sin(X+Y+Z-T) has to be zero when X=Y=Z=0 (at the origin). Agreed? But, sin(X+Y+Z-T) expands to that long expression. Sin(X)=Sin(Y)=Sin(Z)=0 at the origin. We don’t need to define that, it is a given because sin(0)=0. But, cos(0) is not zero, it is 1. But, we need sin(X+Y+Y-T) to be zero when X=Y=Z=0 (the origin), so this means that all the terms with Cos(X), Cos(Y) and Cos(Z) in them have to be zero when X=0. This is just called “boundary conditions”, we know that in order for sin(X+Y+Z-T) to be zero when X=Y=Z=0 we have to remove all the terms with cos(X), cos(Y) and cos(Z) because otherwise sin(X+Y+Z-T) would not be equal to zero when X=Y=Z=0. Does that make sense? We do exactly the same thing with e.g. simple harmonic motion, which can be expressed as the sum of a sine and a cosine. If we know that at T=0, X=0, that allows us to set the Cos(X) term to zero in SHM. It’s the same idea here. 11. This comment is for testing LATEX in a comment section. If you see my next comment, you can ignore this one. I’m going to write a huge comment about an electric field $E(x,y,z,t)$ in a box. I will show that the solution $\vec{E} = E\sin(k_x)\sin(k_y)\sin(k_z)\sin(\omega t)$ is not correct. Indeed, the true solution should have a form$$\vec{E}(x,y,z,t) = E_x(x,y,z,t)\hat{\vec{x}} + E_y(x,y,z,t)\hat{\vec{y}} + E_z(x,y,z,t)\hat{\vec{z}}$$and boundary condition for, let’s say, $E_x$ component is $E_x=0$ at $y=0,y=L$ and $z=0,z=L$. 12. Hello. I’ve read carefully your entire derivation of Rayleigh-Jeans law and I think this part where you deal with electric field in a box has many errors. 1) First of all, electric field is a vector, so, it should have three components in x, y, and z directions and each component in general should be a function of x, y, z, t, that is, $\vec{E}(x,y,z,t) = E_x(x,y,z,t)\hat{\vec{x}} + E_y(x,y,z,t)\hat{\vec{y}} + E_z(x,y,z,t)\hat{\vec{z}}$. However, in the beginning of this part there is an expression $\vec{E}(x,y,z,t) = E\sin(k_x x + k_y y + k_z z -\omega t)$. First, this equation is mathematically incorrect: on the left you have a vector, on the right you don’t have a vector. Such equations appear throughout your derivation. Second, what do you mean by $E$ in front of the sine function? Do you mean it’s a constant amplitude vector, $"E" \equiv \vec{E_0}$, pointing is some direction like $\vec{E_0}= E_{0x}\hat{\vec{x}} + E_{0y}\hat{\vec{y}} + E_{0z}\hat{\vec{z}}$? Or do you mean it’s a field strength, that is, the absolute value of $\vec{E}(x,y,z,t)$? In the latter case we are missing components of the electric field vector (and you have to take off the arrow from the left). 2) Next, you write $E_x = E\sin(k_x x)$ where $k_x=n_x\pi/L$ (and same form for $E_y,E_z$ ). Here it is even more unclear what you mean by $E_x$ and $E$. I guess, your $E_x$ is some kind of variation of electric field strength $E$ in x direction. But in that case, $E$ should be a function of x and y. And your $E_x$ is certainly not the x component of electric field vector (it’s not the same $E_x$ as I’ve written in $\vec{E}(x,y,z,t)$ expression above). 3) Then, starting with equation $\vec{E} = E\sin(k_x x + k_y y + k_z z -\omega t)$ you get an equation $\vec{E} = E\sin(k_x)\sin(k_y)\sin(k_z)\sin(\omega t)$, which is (according to your definitions of$ latex E_i$) $\vec{E} = E_xE_yE_z\sin(\omega t)$. First, talking about that mysterious amplitude, you should have written $E^3$ instead of $E$. Second, you made this transformation by throwing out those cosine terms which is what people here are doubtful about. In reality, if you want to get a standing wave from a traveling wave, you say that we take superposition of two waves traveling in opposite directions. 4) Let’s consider those boundary conditions. You say the electric field has to be zero at the walls. However, it’s not true. Only those components of the electric field which are parallel to the wall have to be zero at the walls, while perpendicular components may not be zero at the walls. So, boundary conditions are the following (now I’m talking about the true $E_i$ components): $E_x=0$ at $y=0,y=L$ and $z=0,z=L$; $E_y=0$ at $x=0,x=L$ and $z=0,z=L$; $E_z=0$ at $x=0,x=L$ and $y=0,y=L$. 5) Finally, your solution $\vec{E} = E\sin(k_x)\sin(k_y)\sin(k_z)\sin(\omega t)$ (whatever $E$ is) satisfies the wave equation but it doesn’t satisfy the Maxwell equation$\nabla\cdot \vec{E}= 0\$ and this is the main proof why it’s not correct.

The correct solution which satisfies the boundary conditions and both the wave equation and the Maxwell equation is

$\vec{E}(x,y,z,t) = E_x\hat{\vec{x}} + E_y\hat{\vec{y}} + E_z\hat{\vec{z}}$

with components

$E_x = E_{0x}\cos(k_x x)\sin(k_y y)\sin(k_z z)\sin(\omega t)$
$E_y = E_{0y}\sin(k_x x)\cos(k_y y)\sin(k_z z)\sin(\omega t)$
$E_z = E_{0z}\sin(k_x x)\sin(k_y y)\cos(k_z z)\sin(\omega t)$

where
$k_i=n_i\pi/L$ and $E_{0x}k_x + E_{0y}k_y + E_{0z}k_z = 0$

If you want to know how to derive this solution look for “rectangular resonant cavity” topics. I really appreciate the work you’ve done here by writing the entire derivations of Rayleigh-Jeans law and Planck’s law. But we should try not to give misleading information to people who want to learn and understand. 🙂

• *correction of LATEX syntax*

$\vec{E} = E\sin(k_x)\sin(k_y)\sin(k_z)\sin(\omega t)$
(whatever $E$ is) satisfies the wave equation but it doesn’t satisfy the Maxwell equation $\nabla\cdot \vec{E}= 0$ and this is the main proof why it’s not correct.
$\vec{E} = E\sin(k_x x)\sin(k_y y)\sin(k_z z)\sin(\omega t)$
(not $\vec{E} = E\sin(k_x)\sin(k_y)\sin(k_z)\sin(\omega t).$