Why is no information lost if we express the internal energy as a function of ${T,V}$? The natural variables of the internal energy $U$ are ${S,V}$. Sometimes it is helpful to get rid of the entropy here, and replace it by its conjugate variable. However, it is said in the literature (https://link.springer.com/content/pdf/bbm%3A978-1-4419-7344-3%2F1.pdf) :

One
may replace the independent variable, X, by P. Simply replacing the coordinate
X by the function’s slope at that point to yield a new function, Y(P), however,
doesn’t quite work, because, as will be shown, some information is lost by this
direct substitution. Notice that for a single variable, Eq. (A.2) becomes an ordinary differential equation, which, when integrated, yields the solution, Y(X). Indeed,
this result occurs, but the solution so obtained is established only to within an as yet
unknown constant of integration! See Fig. A.1. Thus, by using direct substitution
some information is lost.

that we cannot simply write $U$ as a function of the partial derivative $\left.\frac{\partial U}{\partial S}\right|_V=T$, because this would lead to information loss (Basically because $U$ can be shifted up or down and the slope does not encode all information). This actually leads to the introduction of the Legendre transform which gives a new thermodynamic potential (the Helmholtz free energy) which has the natural variables ${T,V}$. However, I do not understand this reasoning,  as we can always express the internal energy  in any 2 thermodynamic variables, e.g. as a function of ${T,V}$ as:
$dU=\left.\frac{\partial U}{\partial T}\right|_V dT+\left.\frac{\partial U}{\partial V}\right|_T dV$
So is the latter formulation not exact or leads to a loss of information?
Edit:
Is this because we can actually exactly predict $dU$ but not the absolute value of the internal energy $U$ by using the slope? How does this go together with the definition of the internal energy as $U=TS-pV$?
 A: Consider a function $y=f(x)=x^2$
The derivative of $f(x)$, $f'(x)=2x$
So, derivative of $f(x)$ at a point $(x,f(x)$ is the line tangent to that point making an angle $\tan^{-1}f'(x)$ with the x-axis.
So, if we are given $(x,f(x)$, then we plot all these points $\forall x\in\mathbb R$ and get the graph of the function. So, in that case knowing the function is crucial to plot it and to make graph of the function.
But is it the only requirement?
The answer is no.
Suppose we are not given the expression of the function but only the derivatives $f'(x)\; \forall x\in\mathbb R$
Consider a point $(1,f(1))=(1,1)$.
$f'(1)=2\times 1=2$
Suppose we are just given the information that the derivative of a function at $x=1$ is $2$. This means the line makes an angle $\tan^{-1}2$ with x-axis.
But there are infinitely many lines with the slope $\tan^{-1}2$.
So in that case it is very difficult to find the value of $f(1)$

See the above pic.
If we don't know the red curve which is the form of the function $f(x)=x^2$. I am only given the information that $f'(1)=2$.
So, both green and blue lines corresponds to the slope 2.
But green line signifies that $f(1)=1$ and blue signifies that $f(1)=0$.
So, we can see that knowing just slopes at every point does not give us complete information.
Denote slope by $m$.
So, $f(m)$ does not convey complete information about the $f(x)$.
But in addition to slope, if we are also given the information about the intercept(=-1 in the above case) of the line whose slope is $2$,then we are sure that $f(1)=1$ as then that line passes through $(1,1)$.
So if we are given the information about the slopes and intercept of the tangent then we can construct our original function.
Now consider a general function $f(x)$
At a particular point, $(x_o,f(x_o))$
The equation of tangent line can be written as
$\frac{y-f(x_o)}{x-x_o}=f'(x_o)$   (As line tangent at $(x_o,f(x_o))$ also passes through $(x_o,f(x_o))$.
$\implies y=f'(x_o)x+(f(x_o)-f'(x_o)x_o)$
Denote $f'(x)=m$ and $c=f(x)-f'(x)x$
So, $c=f(x)-mx\tag{1}$
As $f'(x)=m$
$\implies x(m)=f'^{-1}(m)$
So, (1) becomes,
$c(m)=f(x(m))-mx(m)$
So, if we are given $c(m)$ which is intercept as a function of slope (thus getting both the information of slope and intercept) then we can construct $f(x)$ as shown below.
$\frac{dc}{dm}=\frac{df}{dx}\frac{dx}{dm}-x\frac{dm}{dm}-m\frac{dx}{dm}$
$\implies\frac{dc}{dm}=m\frac{dx}{dm}-x-m\frac{dx}{dm}$
$\implies\frac{dc}{dm}=-x$
$\implies x=-\frac{dc}{dm}$
So for a particular $m_o$, derivative of $c$ which is $c'(m_o)$ gives $x_o$
As $f(x_o)-c(m_o)=m_o(x_o-0)$
$\implies f(x_o)=m_ox_o+c(m_o)$
$\implies f(x_o)=-m_o\frac{dc}{dm}|_{m_o}+c(m_o)$
Thus we get both $x_o$ and $f(x_o)$
So, in short $x=-\frac{dc}{dm}$ and $y=-m\frac{dc}{dm}+c$
This transformation from $f(x)\to c(m)$ is called Legendre transformation.
$c(m)=f(x)-\frac{df}{dx}x$ where $x=x(m)$
For a function of two variables, $f(x,y)$
$c(m,y)=f(x,y)-\frac{\partial f}{\partial x}x$
where $m=\frac{\partial f}{\partial x}$
and $c(m_1,m_2)=f(x,y)-\frac{\partial f}{\partial x}x-\frac{\partial f}{\partial y}y$
where $m_1=\frac{\partial f}{\partial x}$ and $m_2=\frac{\partial f}{\partial y}$
So we are give $U(S,V)$
and we want to transform it to $U(T,V)$
As from first law, $dU=TdS+PdV$
So, $\frac{\partial U}{\partial S}=T$
So, by Legendre transform the function, $U(S,V)\to U(T,V)$, where $T=\frac{\partial U}{\partial S}$
$U(T,V)=U-\frac{\partial U}{\partial S}S=U-TS$
And the point is that $U(T,V)$ contains exactly the same information as that of $U(S,V)$ as we have seen above.
