The energy of a photon is directly proportional to its (angular) frequency:
$$
E=\hbar \omega.
$$
The energy of a classical mechanical wave is, however, proportional to the square of $\omega$:
$$
E=\frac{1}{2}\mu A^2\omega^2 \lambda
$$
per wavelength.
I struggle to see why there is $\omega$ in one equation but $\omega^2$ in another.
It is quite mysterious, though, because the $E$ in two equations mean different things. How many photons per wavelength do we have?
Best Answer
The difference isn't electromagnetic versus mechanical. All classical waves behave the same way, as do all quanta. The difference arises because you're treating the light as quantum and the mechanical wave as classical.
Combining these two results shows that the density of quanta making up a classical ideal plane wave of fixed amplitude and frequency $\omega$ is proportional to $\omega$.