Legendre transformation
Legendre transformation in more than one dimension.