Discontinuities and nondifferentiability in thermodynamics In physics and engineering sources, calculus-based formalisms - whether differential forms on a manifold, or "differentials" of functions of several variables - are presented as a way of modeling and reasoning about thermodynamic systems. However, I've found little to no mathematical background given to justify these formal manipulations when there are phase changes or other discontinuities. In such regions, one would expect the theory to break down since partial derivatives and differential forms are not defined.
Nevertheless, if you "shut up and calculate", everything seems to work out fine. Why is this the case, and what is the proper mathematical state space and framework for systems with phase transitions or other non-smooth properties? (perhaps some sort of "weakly-differentiable" manifold?)
 A: Most physical systems modeled by PDEs can be transformed to an integral weak form where the smoothness requirements of the unknowns are lower (*). 
For example, although in the original PDE the density field has to be differentiable (and thus very smooth because derivatives of the density appear), you can write this PDE in a different equivalent form in which the density field only needs to be integrable (and as such accepts kinks and discontinuities). 
You can find examples of the process by googling for weak solutions of the Euler eqts, Navier-Stokes, Maxwell, convection-diffusion-reaction, Stokes eqt...
(*) by multiplying the PDEs with spaces of sufficiently smooth test functions, integrating over the domain, and shifting the derivatives from the unknowns to the test functions by means of the divergence Theorem.
A: At a first order phase transition, both phases extend a little (superheated or supercooled metastable phases), so that one can assume them to be continuous across the coexistence curve, and we have two competing differentiable functions,
of which the thermodynamically more stable phase ''wins''.
A: Far from a phase transition, the thermodynamics parameters are well defined things and are sufficient to describe thermodynamical processes. Close to a phase transition, these parameters may become highly fluctuating, and indicating only an average value is a too poor description. It is not only mathematical "discontinuity" but also physical "uncertainty" that is implicated. Here one needs a more sophisticated picture.
A: You are not specific enough. You have in mind some model or approach, but do not specify which one. 
In particular, have you in mind something like Ginzburg-Landau-Khalatnikov equation approach? It is a PDE based description of the transition. You may have a look into the books of Landau and Lifshitz for that. 
You may also have in mind the technique that is applied in mechanics of phase transitions, where the spacial phase transition boundary is considered as a surface of discontinuity, and the technique of shock waves is adopted? You may search for papers of M.A. Grinfel'd published in 80th who did such mechanics-oriented research and A.L. Roitburd in 70th to 80th who did alike things to describe transitions in metals.
You may also have in mind the model theory (such as 2D Ising on the square lattice) with its exact solution. Look into Landau&Lifshitz volume 5 for the first glance. 
In all these cases it is useful to bear in mind that all these approaches are models, rather than transitions themselves, and they are only able to catch some features of the real phenomenon, leaving other features untouched. 
