Consider functions $f$ which are involutions, i.e. \begin{align} f(f(x))=x\quad \implies \quad f'(x)f'(f(x))=1. \end{align} Under the (Legendre-like) contact transformation \begin{align} f(x)=F'(X),\ x=XF'(X)-F(X),\ f'(x)=\frac 1X, \end{align} we have that \begin{align} f(f(x))=F'(1/f'(f(x))=F'(f'(x))=F'(1/X), \end{align} yielding the functional-differential equation \begin{align} F'(1/X)=XF'(X)-F(X)\ \implies \ F''(1/X)+X^3F''(X)=0. \end{align}
Substitute $F''(X)=S(\log X)/X^{3/2}$ to get \begin{align} S(-\log X)=-S(\log X)\ \implies\ S(-X)=-S(X). \end{align} So then $S(X)$ can be any odd function, with it's corresponding involution $f(x)$ given parametrically by
\begin{align}\tag{$\dagger$} \boxed{f(X)=\int\frac{S(\log X)}{X^{3/2}}\mathrm dX+C,\quad x(X)=\int\frac{S(\log X)}{X^{1/2}}\mathrm dX+C'.} \end{align}
Empirically, it seems we require $C=C'$ for this curve to be an involution. This is all very neat, and produces some interesting involutions, e.g. for $S(X)=\sin X$ we have the (red) curve \begin{align} f(X)=\frac{2X^{1/2}}{5}\left(\sin\log X-2\cos\log X\right)+C,\ \ x(X)=\frac{-2}{5X^{1/2}}\left(\sin\log X+2\cos\log X\right)+C, \end{align} and for $S(X)=X$ we have the (blue) curve \begin{align} f(X)=-\frac{2}{X^{1/2}}(\log X+2)+C,\ \ x(X)=2X^{1/2}(\log X+2)+C \end{align} which (for $C=2$) look like
This is all fun except I am getting conflicting results when I try to find the corresponding function $S$ for known involutions. Consider the involution $f(x)=1/x$, for which we calculate \begin{align} f'(X)+\frac{x'(X)}{x(X)^2}=0,&\quad \frac{S(\log X)}{X^{3/2}}+\frac{S(\log X)}{X^{1/2}x(X)^2}=0,\\\\ x(X)=\pm i X^{1/2},\quad \frac{S(\log X)}{X^{1/2}}&=\frac{\pm i}{2X^{1/2}},\quad S(X)\equiv \frac{\pm i}{2}, \end{align} a function which is decidedly even!! Yet this even function produces $f(x)=1/x$ when plugged into ($\dagger$), if we take $C=C'=0$. As another example, the involution $f(x)=\sqrt{1-x^2}$ yields the function (requiring $C=C'=0$) \begin{align} S(X)=\left(\frac{\exp X}{1+\exp 2X}\right)^{3/2}, \end{align} which is again even. You may be thinking at this point that we need only accept that even functions also provide involutions and I've developed a method to generate all possible involutions... and if that were true I would be accepting my fields medal in esoteric math now. Most arbitrary functions I've tried produce non-symmetric functions $f(x)$.
To add further confusion, it seems that for even $S$ we usually get functions symmetric about $y=-x$, so then they satisfy the functional equation \begin{align} f(-f(-x))=x, \end{align} and if $f$ is odd reduces to our involution functional equation, but for counterexample $f=\sqrt{1-x^2}$ is not odd. I've failed in applying the same contact transformation to this functional equation to produce the desired even condition. For example, the function $S(X)=X^2$ produces the curve \begin{align} f(X)=-\frac{2}{\sqrt X}(\log^2X+4\log X+8)+C,\ \ x(X)=2\sqrt X(\log^2X-4\log X+8)+C', \end{align} which for $C'=-C$ is symmetric about $y=-x$.
Questions:
Does every odd function $S$ produce an involution as I've derived?
When do even functions $S$ (perhaps we should notate $V$ for even functions) produce involutions and when do they produce functions symmetric about $y=-x$?
Can we show that we require $C=C'$ for involutions?
