We prove that, in the optimal transportation problem with general costs and positive continuous densities, the potential function is always of class $W^{ 2,p}_{ loc}$ for any $p \geq 1$ outside of a closed singular set of measure zero. We also establish global $W^{ 2,p}$ estimates when the cost is a small perturbation of the quadratic cost. The latter result is new even when the cost is exactly the quadratic cost.
Categories: math.AP