If there exists a mathematical function that describes the behavior of a particular system - in this case human market participants living in a particular society - what makes that function not true? Maybe not in the form a QED mathematical proof but still correct.
Simplistic invisible hand market theories rarely do more than describe most behaviours under particular conditions; they generally don't do well at capturing the edge conditions that humans bend the world to via collusion, corruption, and other non free market behaviours.
The other 'failure' is that many seem to assume only single optimums exist - in real world scenarios and even in simple somewhat contrived examples there are optimums that capture the market to the advantage of a few sellers and other optimums that deliver the most to large numbers of people.
Hotelling's Law is likely the simplest possible example of market theory producing a stable outcome that consumes more energy and is less efficient than a planned deployment; there are other examples of problematic outcomes from falling back into the narcotic embrace of "market forces".
Yes you are largely correct - our knowledge of how markets work in all scenarios and edge cases is incomplete, which is why these are active areas of research by economists, but there is plenty of research on the effects of those non-free market behaviors. As you might imagine it is generally not good.
I also don't think any economist fails to acknowledge that there may be multiple minima/maxima in a market. Hotelling law as we know today is an observation of an optimal game theory result - it actually does bring maximal payoff for the participants at equilibrium. If you want to change the equilibrium condition to say - minimize transportation and energy costs, you will likely have to change part of the rules of the game via policy/zoning/etc.
The "market forces" you speak of is simply the aggregate actions and result of people looking maximize their efforts. Embracing of market forces does not mean taking an ultra-capitalist-libertarian-laissez-faire view on economics. Instead it is acknowledging that the participants in the game will always seek to maximize their payoffs given a set of rules.
Naively discounting these "market forces" to act in this way and find unintended optimal solutions is where problematic outcomes occur by shortsighted policy makers. It is by NOT embracing the effect of market forces is where trouble arises.
_If_ there exists such a function. Does such a function exist? You seem to be simply assuming that. In that case you’re assuming something is true in order to prove it is true.
Yes these functions exist. Both theoretically and practically. These are the supply and demand curves and it can be measured. You can then derive functions from the measurements, with the shape of that function defining different types of market behavior. The inputs of that function are in principal simple and answers the question how does price change as the supply and demand of a good changes? (or the inverse - how does demand change as the price changes?)