In Brazil, to have a taxi you need to ask for permission of the "Mayor". The number of permissions is limited. So, i'd like to know whats the ideal number of taxis per urban m² or population.
Take a look at New York City Taxicab Fact Book (the following PDF file):
http://www.schallerconsult.com/taxi/taxifb.pdf
"A statistical model of 118 cities and counties found that the number of taxicabs in U.S. cities is related to the number of zero-vehicle households in the city, subway ridership and airport taxi passenger volumes. These factors better explain the number of taxicabs than does population."(page 4)
And as you see in the figure 2, the number of taxis per 1,000 residents, differs a lot in different cities of the US ( for instance, 12 in Washington and less than 1 in Los Angeles).
Thus, there is no ideal number per capita, generalizable for everywhere. To reach a proper number of taxicabs in a city in Brazil, it is required to do a thorough survey and analysis about the specific city in terms of number of people who do not own a car, as well as the capacity and the optimality of the other public transportation systems in the area.
The answer to your question is simple. The optimal number of taxicabs is zero.
The reason is that taxicabs are undergoing dramatic technological change. Consider the number of close substitutes: Uber, Lyft, Curb, Grab, Didi Chuxing, Ola. By the time you figure out some complex answer to your question, it will be too late. It is like asking what is the optimal number of phone booths in a city. The answer, of course, is zero.
Dear Edipo. I see this problem as a demand versus offering. But contextual and technological changes should be considered as well.
I would solve it studying some variables as: demographic change of the city in a range of 20-30 years, or more; incoming of new concurrents; profile of cab service users (average length of races, frequency of use by profile; main routes, for instance).
I think you could use linear programming to perform it, or expert assessment.