I am looking at f(x) = (|x|+1)

^{2}. I write this as

[tex]

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.

[/tex]

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

f

^{*}(p) = p

^{2}/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?