ABSTRACT:Currently used approximations to the exchange-correlation potential in density functional theory (DFT) are known to fail in describing the properties of certain compounds, of which we discuss here only two examples: CoO and stoichiometric La 2 CuO 4 . Both materials are insulating and antiferromagnetic. A DFT calculation on CoO yields antiferromagnetic order, but Co-associated magnetic moments that are by ϳ1 B smaller than the experimental value, and one obtains the electronic structure of a metal. The latter applies also to La 2 CuO 4 , and, in contrast to the experiment, the calculation does not even yield nonzero moments associated with the Cu atoms. We exploit the fact that approximate exchange-correlation potentials lead necessarily to spin-dependent densities that differ from the exact ones. We therefore derive modified Kohn-Sham (KS) equations in which the effective potentials depend on the exact spin densities rather than on the standard KS densities. If the latter are modified by adding small (spin-up, spin-down) portions that individually integrate to zero within the lattice unit cell and do not change the total charge density, the inconsistencies with the experiment can be removed.