Disagreement about solving density of orbital per unit energy of photon gas in a cavity A conducting 2-D cavity (of area $L^2$) contains a photon gas that satisfies the dispersion relationship:
$$\omega^2 =\frac{4\pi^2c^2}{L^2}(n_x^2+n_y^2)$$
and I wish to find the density of the orbitals per unit energy.A friend and I have two different ways to solve it, and different answers. But which one is correct?
1) My way is simple, just take the Debye formula for density of states in 2-D
$$D(k)=\frac{L^2}{2\pi^2}k$$
and finally dividing by the energy $\frac{\hbar^2k^2}{2m}$
2) my friend's approach is as follows:
The dispersion relationship defines a circule of radius $r=\frac{\omega L}{2\pi c}$. 
Then, the number of states can be approximated by the area of the circumference times the polarization number, which is two.
$$N(\omega)=2\pi r^2=\frac{\omega^2 L^2}{2\pi c^2}$$
and by using $\omega =ck$:
$$N(k)=\frac{k^2 L^2}{2\pi }$$
Then, orbit density is defined as $\frac{dN}{dE}=\frac{dN}{dk}\frac{dk}{dE}$
with $E=\frac{\hbar^2k^2}{2m}$.
Thus, $$\frac{dN}{dE}=\frac{mL^2}{\pi\hbar^2}$$ 
I understand his logic, but I can't definitively say which view is correct. What do you think?
 A: As I mentioned, there is no mass for photon gas. Instead, we should use the the relation,
$$E=pc=\hbar\omega=\hbar ck$$

Your (not your friend's) solution
With the correction above,
$$\frac{D(k)}{E(k)}=\frac{kL^2}{2\pi^2}\cdot\frac{1}{\hbar ck} = \frac{L^2}{h\pi c}$$

Your friend's solution
With the correction above,
$$\frac{dN}{dE} = \frac{dN}{dk}\frac{dk}{dE}$$
$$\frac{dN}{dE} = \frac{kL^2}{\pi}\frac{1}{\hbar c}=\frac{2kL^2}{hc}$$

My attempt
Rewriting the dispersion relation in terms of energy,
$$E=\hbar\omega=\hbar\cdot\frac{2\pi c}{L}\sqrt{{n_x}^2+{n_y}^2}=\frac{hc}{L}\sqrt{{n_x}^2+{n_y}^2}$$
$$\frac{L}{hc}E=\sqrt{{n_x}^2+{n_y}^2}$$
Now assuming $n_x,n_y\in\mathbb{Z}^+$, the $\sqrt{{n_x}^2+{n_y}^2}$ denotes a location vector on the first quadrant of $\mathbb{Z}^2$.
Interval $(E,E+dE)$ covers an area of $\frac{\pi}{2}\cdot(\frac{L}{hc})^2\cdot E\cdot dE$ on this space. Then (because there is 1 node per unit area),
$$dN=\frac{\frac{\pi}{2}\cdot(\frac{L}{hc})^2\cdot E\cdot dE}{1}$$
Then
$$\frac{dN}{dE}=\frac{\pi}{2}\cdot(\frac{L}{hc})^2\cdot E$$
$E=\hbar ck$, so
$$\frac{dN}{dE}=\frac{\pi L^2}{2h^2c^2}\cdot\frac{hck}{2\pi}=\frac{kL^2}{4 hc}$$

Results?
My solution is almost the same as your friend's, so I think their point of view was correct.
I don't know how Debye formulae work, so I cannot specifically comment on your approach, sorry.
