Hacker News new | past | comments | ask | show | jobs | submit login

The abuse of differentials in explanations like this reminds of this classic and insightful MathOverflow answer: https://math.stackexchange.com/questions/3266639/notation-fo...



Thanks! That is enlightening. It made me realize that the confusion I always felt was actually in the notation all along.

That link was discussed here btw:

On Leibniz Notation - https://news.ycombinator.com/item?id=39064174 - Jan 2024 (95 comments)


It’s ironic to see the link to that post which implicitly assumes that functions are defined on R^n, under a post about Legendre transform, whose point is that functions are defined on state spaces of systems, and only become represented by functions on R^n once we parameterize the state spaces by state variables. So the value of f at a given point doesn’t depend on what your favorite letter (aka state variable) is, but the value of f’ certainly does. And Legendre transform, as is actually explained, albeit cryptically, in Goldstein comes from the fact that we have 2d state space - phase space of 1d system with config variable y, velocity variable x, and momentum variable u, - on which we have have non-linearly related variables x and u.

In Legendre transform, what we have (the y variable is a red herring, and I will ignore it; everything happens "pointwise in y"), is curve in u-x plane, which we lift to u-x-z space in two ways -- that is, we find functions f and g defined for the points on that curve such that: 1) if the curve is parametrized by x, so that f is a function of x, then df/dx=u 2)if the curve is parametrized by u, so that g is a function of u, then dg/dx = u. (Why do we want this? Presumably because when x is velocity and f is energy, u is momentum, and we want g to have same property going back. And yes, there are conditions when one can parametrize a curve by one of the coordinates, either locally, or globally; one such is that u is monotone increasing function of x - that corresponds to convexity of f.) Of course now "derivatives of f and g are inverse" is tautological.

If we already know f(x), but don't know neither u nor g we could set u = df/dx and try to compute g. Or we could do it the way Goldstein does it: dg/du=x, so dg=xdu (this is an ODE), integrating it "by parts" g=int x du = xu - int u dx = xu - f.

(In advanced speak, u-x curve is a Lagrangian in the u-x plane, which is symplectic as every sum of vector space and its dual is; the functions f and g correspond to lifts of this Lagrangian to Legendrians based on choice of "canonical" 1-forms udx and xdu, respectively,so that df - udx=0 and g-xdu=0.)


that link is about something more fundamental wrt the underlying calculus and how the differential notation used in these explanations can often be confusing especially when you have differentials whose variable is a function of other variables. That's all its trying to clear up.


*then dg/du = x and dg - xdu =0


Thank you so much for this link. I was having trouble following some of the notation that came up with automatic differentiation and I think this clears it up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: