of the fourth oder derivative was first noted by Temesvari [@Temes]. Often, instead of $q(x)$, it is more useful to consider the overlap probability distribution function $P(q)$, which gives the probability of finding two states with mutual overlap $q$ according to the Gibbs measure. The two quantities are related by [@DY83; @P83]: $$\label{eq:pdq}
P(q)=\frac{dx}{dq}$$ where $x(q)$ is the inverse function of $q(x)$. In the absence of external magnetic fields the function $P(q)$ must be an even function of $q$. The computed function $q(x)$ is however defined only for positive values, therefore it determines only the right branch of the function $P(q)$. If we define $\tilde{P}(q)=dx/dq$ for $q>0$ then full $P(q)$ is given by the symmetrized expression $$P(q)=\frac{1}{2}\tilde{P}(-q)+\frac{1}{2}\tilde{P}(q)$$ It is easy to see that the presence of non-zero even derivatives of $q(x)$ at $x=0$ makes the function $P(q)$ non analytical at $q=0$: $$P(q)=c_{0}+c_{2}q^{2}+c_{3}|q|^{3}+\ldots$$ so that $P(q)$ has discontinuous derivatives at $q=0$.

We shall discuss two different methods of computing the expansions. The first, discussed in Section \[SecExp\], performs expansion before imposing stationarity of the free energy functional. The two steps however can be inverted, i.e., the expansion can be done after stationarity is imposed, Section \[SecDeriv\]. The two approaches are obviously 