  The density functional theory is used to study the electronic structure of a
quantum wire in a magnetic field. The Kohn-Sham equations are solved
numerically for different values of electron densities and filling factors. The
critical density, below which the electron density has a strong spatial
inhomogeneity, was found in GaAs quantum wire. An empirical formula for the
critical density is obtained. The effect of the disorder potential on the
electron density profile in a two-dimensional electron gas is estimated.
