There's a story going around (here's one now!) about the Chinese government attempting to transform what has been an agricultural state into New York City, pretty much by decree of the Emperor. To this end, State urban planners have been building whole new cities each housing a population of about 1,000,000.
I suppose the motto of the Chinese HUD is "If we build it, they will come, or else." Anyway this has resulted in forests of high-rise buildings standing empty, as there is as yet, no economic reason for anyone to move to a city with no business base to hire them, and conversely, no consumer base to support a business.
This is what you get when the Peoples Department of Housing and Urban Development operates without adult supervision. Packing people together is very efficient from an urban managers point of view, but works very poorly in real life.
Want to know how this will end? Google Cabrini Greens.
There is probably some optimal density of population, depending on the economic base, that would fit the classic bell-shaped curve. I'm going to guess that in a non-agricultural setting, it probably runs to 6-8 single-family dwellings per acre. If you build upward, the population density increases, and the available outdoor space disappears as more and more must share a fixed outdoor space.