Theory of the second best
In welfare economics, the theory of the second best concerns what happens when one or more optimality conditions cannot be satisfied. Canadian economist Richard Lipsey and Australian economist Kelvin Lancaster showed in a 1956 paper that if one optimality condition in an economic model cannot be satisfied, it is possible that the next-best solution involves changing other variables away from the ones that are usually assumed to be optimal.
This means that in an economy with some uncorrectable market failure in one sector, actions to correct market failures in another related sector with the intent of increasing overall economic efficiency may actually decrease it. In theory, at least, it may be better to let two market imperfections cancel each other out rather than making an effort to fix either one. Thus, it may be optimal for the government to intervene in a way that is contrary to usual policy. This suggests that economists need to study the details of the situation before jumping to the theory-based conclusion that an improvement in market perfection in one area implies a global improvement in efficiency.
Even though the theory of the second best was developed for the Walrasian general equilibrium system, it also applies to partial equilibrium cases. For example, consider a mining monopoly that's also a polluter: mining leads to tailings being dumped in the river and deadly dust in the workers’ lungs. Suppose in addition that there is nothing at all that can be done about the pollution. However, the government is able to break up the monopoly.
The problem here is that increasing competition in this market is likely to increase production (since competitors have such a hard time restricting production compared to a monopoly). Because pollution is highly associated with production, pollution will most likely increase. Thus, it is not clear that eliminating the monopoly increases efficiency. Gains from trade in coal will have been eliminated, but externalities from pollution will have increased.
Gradual International economic integration may be considered as a second best solution, since it provides degree of trade advanced according to stages of economic integration (gradual abolishment of customs tariffs, non-tariff barriers such as registration rights etc. due to coherence policy of economic unions). It seems that the first-best option (free trade) is achieved as to gains from trade when economic integration reaches a stage of political union (EU in 2009).