Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Legendre transform

  1. Dec 11, 2009 #1
    Hi guys

    I am looking at f(x) = (|x|+1)2. I write this as

    f(x) = \left\{ {\begin{array}{*{20}c}
    {x^2 + 1 + 2x\,\,\,\,\,\,\,\,\,\,\,\,\,for\,\,\,\,x > 0} \\
    {x^2 + 1 - 2x\,\,\,\,\,\,\,\,\,\,\,\,\,for\,\,\,\,x < 0} \\
    {1\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,for\,\,\,\,x = 0} \\
    \end{array}} \right.

    I want to find the Legendre transform of this function. For x>0 I get the Legendre transform

    f*(p) = p2/4-p-1/2.

    I am a little unsure of how this works. Because I need to find the Legendre transform of f for x<0 and x=0. But how do these solutions get "patched" together?
  2. jcsd
  3. Dec 11, 2009 #2


    User Avatar
    Science Advisor

    I don't get that at all. For x> 0, f is differentiable so f*(p) is just -f(x) where x is such that f'(x)= p. Here, f'(x)= 2x+ 2= p when x= (p-2)/2. So f*(p)= -f((p-2)/2)= -((p-2)2/4+ 1+ 2(p-1)/2)= -((1/4)p2- p+ 1+ 1+ p- 2)= -(1/4)p^2.

    Similarly, for x< 0, f'(x)= 2x- 2= p when x= (p+2)/2. So F*(p)= -f((p+2)/2)= -)(p+2)2/4+ 1+ 2(p+2)/2)= -((1/4)p2+ p+ 1+ 1+ p+ 2)= -(1/4)p2- 2p- 4.

    f is not differentiable at x= 0 so have to go back to the basic definition: f*(0)= max(0(x)-f(x))= max -f(x). Of course, that maximum is 0: f*(0)= 0. Since f is not differentiable at 0, it Legendre transform is not continuous there and they cannot be "patched" together.
  4. Dec 11, 2009 #3
    Thanks. Ok, I've done it a slight different way. First, I must admit that I have not heard of a theorem stating that if f is differentiable, then f*(p) is just -f(x).

    I used that since f is strictly convex (we look at x>0 for now), then f*(p)=xp-f(x(p)), where x is such that f'(x)= p.

    But OK: Let us look at the solutions found in #2 (I am mostly trying to learn the method). So

    for x>0: f*(p) = -(1/4)p^2
    for x<0: f*(p) = -(1/4)p^2- 2p- 4
    x=0 : f*(p) = 0 (by the way, shouldn't this be -1 rather than 0?)

    What solutions are "valid" for the different intervals of p? I mean, we have 3 solutions, one for each interval of x. But how do I find out what intervals of p they correspond to?
    Last edited: Dec 11, 2009
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook