I've been asked as a Homework to find Legendre Transform of the functional $F[\phi(x)]=\phi^n(x)$ $(i.e. (\phi(x))^n)$.
If Legendre transform control function be $J(x)$, then I know that the L.T. functional $G[J]$ is given by
$$G[J]=\int \phi(x')J(x')dx'-F \tag{1}$$ This is how I proceeded - $$J(y)=\frac{\delta F}{\delta \phi(y)}$$ $$\Rightarrow J(y)=n\phi^{n-1}(x)\delta(x-y)\tag{2}$$ $$I=\int \phi(x')J(x')dx'=\int n\phi(x')\phi^{n-1}(x)\delta(x-x')dx'$$ $$\Rightarrow I=n\phi^n(x)\tag{3}$$ $$\Rightarrow G[J]=n\phi^n(x)-\phi^n(x)$$ $$\Rightarrow G[J]=(n-1)\phi^n(x)\tag{4}$$ To express this in terms of $J(y)$ I'm thinking (naively) to invert (2) as - $$\phi^n(x)=\biggl(\frac{J(y)}{n\delta(x-y)}\biggr)^{\frac{n}{n-1}}\tag{5}$$ So $$G(J(y))=(n-1)\biggl(\frac{J(y)}{n\delta(x-y)}\biggr)^{\frac{n}{n-1}}\tag{6}$$
I'm highly doubtful that this is correct since I've never seen Dirac delta in the denominator. What is the correct way to invert expressions like (2), OR, How to express $G$ in terms of $J$ correctly?