The Legendre transform is a fundamental tool in mathematics and physics that converts a convex function into its dual representation. It is widely used in fields such as classical mechanics, thermodynamics, and optimization. This calculator allows you to compute the Legendre transform of a single-variable convex function at a specified slope value.
Given a real-valued convex function , the Legendre transform is defined as:
This means we look for the value of that maximizes the expression . Intuitively, this corresponds to finding the point where the line with slope is tangent to the graph of . The Legendre transform then records the intercept of this tangent line.
For differentiable convex functions, the maximizing satisfies the condition:
Once this is found, the Legendre transform value is computed as:
The output represents the value of the Legendre transform at slope . This value can be seen as the support function of the convex function and provides a dual perspective by switching from the variable to the slope .
In physics, this corresponds to changing from a coordinate-based description to a momentum-based one. In optimization, it helps analyze dual problems and understand sensitivity to changes in parameters.
Consider the quadratic function:
Its derivative is:
Setting gives . Substituting back, the Legendre transform is:
This matches the well-known result for the Legendre transform of a quadratic function. Using the calculator, you can input f(x) = x^2/2 and p = 1 to verify this output.
| Transform | Domain | Purpose | Key Property |
|---|---|---|---|
| Legendre Transform | Convex functions | Convert function to slope/momentum domain | Involution for strictly convex, lower semicontinuous functions |
| Fourier Transform | Integrable functions | Convert time/space domain to frequency domain | Linear and invertible |
| Laplace Transform | Functions of exponential order | Analyze system dynamics and differential equations | Transforms convolution into multiplication |
| Fenchel Conjugate | Convex functions | Generalization of Legendre transform in convex analysis | Supports duality in optimization |
The initial guess helps Newton's method start close to the solution of . A good guess improves convergence speed and accuracy.
The Legendre transform is not generally defined for non-convex functions. Using such functions may produce incorrect or undefined results.
Newton's method efficiently solves the equation by iteratively improving the estimate for . It requires the first and second derivatives of .
Yes, for strictly convex and lower semicontinuous functions, applying the Legendre transform twice returns the original function.
This calculator provides a "Copy Result" button to copy the computed and values for your records. CSV export is not currently supported.
In classical mechanics, the Legendre transform converts the Lagrangian (function of position and velocity) into the Hamiltonian (function of position and momentum), enabling analysis of conservation laws and system dynamics.