Legendre transformation

From Free net encyclopedia

In mathematics, two differentiable functions f and g are said to be Legendre transforms of each other if their first derivatives are inverse functions of each other:

<math>Df = \left( Dg \right)^{-1}</math>

f and g are then said to be related by a Legendre transformation. Legendre transformations are named after Adrien-Marie Legendre. They are unique up to an additive constant which is usually fixed by the additional requirement that

<math>f(x) + g(y) = x \cdot y.</math>

The Legendre transformation is its own inverse, and is related to integration by parts. The Legendre transformation can be generalized to the Legendre-Fenchel transformation.

Contents

Applications

The strategy behind the use of Legendre transforms is to shift the dependence of a function from one independent variable to another by taking the difference between the original function and their product. They are used to transform among the various thermodynamic potentials. For example, while the internal energy is an explicit function of the extensive variables, entropy, volume (and chemical composition)

<math> U = U(S,V,\{N_i\})\,</math>

the enthalpy, the Legendre transform of U with respect to −PV

<math> H = U + PV \, = H(S,P,\{N_i\})\,</math>

becomes a function of the entropy and the intensive quantity, pressure, as natural variables, and is useful when the (external) P is constant. The free energies (Helmholtz and Gibbs), are obtained through further Legendre transforms, by subtracting TS (from U and H respectively), shift dependence from the entropy S to its conjugate intensive variable temperature T, and are useful when it is constant.

As another example from physics, consider a parallel-plate capacitor whose plates can approach or recede from one another, exchanging work with external mechanical forces which maintain the plate separation — analogous to a gas in a cylinder with a piston. We want the attractive force f between the plates as a function of the variable separation x. (The two vectors point in opposite directions.) If the charges on the plates remain constant as they move, the force is the negative gradient of the electrostatic energy

<math> U (Q, \mathbf{x} ) = \begin{matrix} \frac{1}{2} \end{matrix} QV \,.</math>

However, if the voltage between the plates V is maintained constant by connection to a battery, which is a reservoir for charge at constant potential difference, the force now becomes the negative gradient of the Legendre transform

<math> U - QV = -\begin{matrix} \frac{1}{2} \end{matrix} QV \,.</math>

The two functions happen to be negatives only because of the linearity of the capacitance. Of course, for given charge, voltage and distance, the static force must be the same by either calculation since the plates cannot "know" what might be held constant as they move.

A Legendre transform is used in classical mechanics to derive the Hamiltonian formulation from the Lagrangian one, and conversely. While the Lagrangian is an explicit function of the positional coordinates qj and generalized velocities dqj /dt (and time), the Hamiltonian shifts the functional dependence to the positions and momenta pj

<math>H\left(q_j,p_j,t\right) = \sum_i \dot{q}_i p_i - L(q_j,\dot{q}_j,t) \,.</math>

Each of the two formulations has its own applicability, both in the theoretical foundations of the subject, and in practice, depending on the ease of calculation for a particular problem. The coordinates are not necessarily rectilinear, but can also be angles, etc. An optimum choice takes advantage of the actual physical symmetries.

Examples

The exponential function ex has  x ln x − x  as a Legendre transform since the respective first derivatives ex and ln x are inverse to each other. This example shows that the respective domains of a function and its Legendre transform need not agree.

Similarly, the quadratic form

<math> u(x) = \begin{matrix} \frac{1}{2} \end{matrix} \, x^t \, A \, x </math>

with A a symmetric invertible n-by-n-matrix has

<math> v(y) = \begin{matrix} \frac{1}{2} \end{matrix} \, y^t \, A^{-1} \, y </math>

as a Legendre transform.

Legendre transformation in one dimension

In one dimension, a Legendre transform to a function f : R → R with an invertible first derivative may be found using the formula

<math> g(y) = y \, x - f(x), \, x = f^{\prime-1}(y) </math>

This can be seen by integrating both sides of the defining condition restricted to one-dimension

<math> f^\prime(x) = g^{\prime-1}(x) </math>

from x0 to x1, making use of the fundamental theorem of calculus on the left hand side and substituting

<math> y = g^{\prime-1}(x) </math>

on the right hand side to find

<math> f(x_1) - f(x_0) = \int_{y_0}^{y_1} y \, g^{\prime\prime}(y) \, dy </math>

with g′(y0) = x0, g′(y1) = x1. Using integration by parts the last integral simplifies to

<math> y_1 \, g^\prime(y_1) - y_0 \, g^\prime(y_0) - \int_{y_0}^{y_1} g^\prime(y) \, dy

= y_1 \, x_1 - y_0 \, x_0 - g(y_1) + g(y_0) </math>

Therefore,

<math> f(x_1) + g(y_1) - y_1 \, x_1 = f(x_0) + g(y_0) - y_0 \, x_0 </math>

Since the left hand side of this equation does only depend on x1 and the right hand side only on x0, they have to evaluate to the same constant.

<math> f(x) + g(y) - y \, x = C,\, x = g^\prime(y) = f^{\prime-1}(y) </math>

Solving for g and choosing C to be zero results in the above-mentioned formula.

Geometric interpretation

For a strictly convex function the Legendre-transformation can be interpreted as a mapping between the graph of the function and the family of tangents of the graph. (For a function of one variable, the tangents are well-defined at all but at most countably many points since a convex function is differentiable at all but at most countably many points.)

The equation of a line with slope m and y-intercept b is given by

<math>y = mx + b\,</math>

For this line to be tangent to the graph of a function f at the point (x0, f(x0)) requires

<math>f\left(x_0\right) = m x_0 + b</math>

and

<math>m = f^{\prime}\left(x_0\right)</math>

f' is strictly monotone as the derivative of a strictly convex function, and the second equation can be solved for x0, allowing to eliminate x0 from the first giving the y-intercept b of the tangent as a function of its slope m:

<math>

b = f\left(f^{\prime-1}\left(m\right)\right) - m \cdot f^{\prime-1}\left(m\right) </math>

Legendre transformation in more than one dimension

For a differentiable real-valued function on an open subset U of Rn the Legendre conjugate of the pair (U, f) is defined to be the pair (V, g), where V is the image of U under the gradient mapping Df, and g is the function on V given by the formula

<math>

g(y) = \left\langle y, x \right\rangle - f\left(x\right), \, x = \left(Df\right)^{-1}(y) </math>

where

<math>\left\langle u,v\right\rangle = \sum_{k=1}^{n}u_{k} \cdot v_{k}</math>

is the scalar product on Rn.

Alternatively, if X is a real vector space and Y is its dual vector space, then for each point x of X and y of Y, there is a natural identification of the cotangent spaces T*Xx with Y and T*Yy with X. If f is a real differentiable function over X, then ∇f is a section of the cotangent bundle T*X and as such, we can construct a map from X to Y. Similarly, if g is a real differentiable function over Y, ∇g defines a map from Y to X. If both maps happen to be inverses of each other, we say we have a Legendre transform.

Further properties

In the following the Legendre transform of a function f is denoted as f*.

Scaling properties

The Legendre transformation has the following scaling properties:

<math>

f(x) = a \cdot g(x) \Rightarrow f^\star(p) = a \cdot g^\star\left(\frac{p}{a}\right) </math>

<math>

f(x) = g(a \cdot x) \Rightarrow f^\star(p) = g^\star\left(\frac{p}{a}\right) </math>

It follows that if a function is homogeneous of degree r then its image under the Legendre transformation is a homogeneous function of degree s, where 1/r + 1/s = 1.

Behavior under translation

<math>

f(x) = g(x) + b \Rightarrow f^\star(p) = g^\star(p) - b </math>

<math>

f(x) = g(x + y) \Rightarrow f^\star(p) = g^\star(p) - p \cdot y </math>

Behavior under inversion

<math>

f(x) = g^{-1}(x) \Rightarrow f^\star(p) = - p \cdot g^\star\left(\frac{1}{p}\right) </math>

Behavior under linear transformations

Let A be a linear transformation from Rn to Rm. For any convex function f on Rn, one has

<math> \left(A f\right)^\star = f^\star A^\star </math>

where A* is the adjoint operator of A defined by

<math> \left \langle Ax, y^\star \right \rangle = \left \langle x, A^\star y^\star \right \rangle </math>

A closed convex function f is symmetric with respect to a given set G of orthogonal linear transformations,

<math>f\left(A x\right) = f(x), \; \forall x, \; \forall A \in G </math>

if and only if f* is symmetric with respect to G.

Infimal convolution

The infimal convolution of two functions f and g is defined as

<math> \left(f \star_\inf g\right)(x) = \inf \left \{ f(x-y) + g(y) \, | \, y \in \mathbb{R}^n \right \} </math>

Let f1, …, fm be proper convex functions on Rn. Then

<math> \left( f_1 \star_\inf \cdots \star_\inf f_m \right)^\star = f_1^\star + \cdots + f_m^\star </math>

References

fr:Transformation de Legendre ko:르장드르 변환 it:Trasformata di Legendre sl:Legendrova transformacija