Electron density of states for free electrons in two dimensions in a magnetic field

The electron density of states for free electrons in two dimensions in a magnetic field is,

The form below plots D(E) and generates a table of where the first column is the energy E in Joules and the second column is the density of states D(E) in units of J-1 m-2.

D(E)
[1040 J-1 m-2

E [eV]

Magnetic field: B =

[T]

g - factor: =

Maximum energy: Emax =

[eV]

The δ-functions are approximated by rectangular pulses that are an energy wide. The height of the pulses is determined by the condition that the width times the height is,

This makes the vertical axis somewhat arbitrary.