Laplace transform of partition function a general result or a mathematical result? In the following derivation I am trying to show that the function $Z_C(\beta)$ is obtained from the function $Z_M(E)$ by Laplace transform. Let,
\begin{equation}
\frac{1}{Z_M}\frac{\partial Z_M}{\partial E}=\frac{\partial \ln Z_M}{\partial E}=\beta 
\end{equation}
Then,
\begin{equation}
\frac{\partial }{\partial E}(\ln Z_M-\beta E)=0
\end{equation}
Let the bracketed term equal $Z_C(\beta)$ be the Legendre transform relationship, 
\begin{equation}
\ln Z_M-\beta E:=\ln Z_C
\end{equation}
Take the exponential and integrate over $E$ we get,
\begin{equation}
Z_C(\beta)=\int Z_M(E)e^{-\beta E}dE
\end{equation}
I have two questions, Firstly why integration over $E$ in the final step doesn't lead to,
\begin{equation}
\int Z_C(\beta)dE=\int Z_M(E)e^{-\beta E}dE
\end{equation}
Secondly, is there a general relationship between the Laplace transform of a function and the Legendre transform of the $\ln$ of that function or is this a property of physics rather than the mathematics?
There is also a related question here. 
 A: General Mathematical Result
If you can evaluate the Laplace transform via saddle point method you will get a Legendre transform from a Laplace Transformation.  This means the function your transforming should have a significant peak only at one point:
As you can see, the Laplace transformation doesn't necessarily get you a Legendre transformation in the exponential:
$\int f(x)e^{-xs}=\int e^{ln(f(x))-xs}$ here $s$ isn't guaranteed to be $\frac{d}{dx}ln(f(x))$ but if f(x) is peaked at one point you can apply the saddle point approximation. In the saddle point approximation you evaluate the integral at the point where the integrand is maximum: 
$\frac{d}{dx}[ln(f(x))-xs]|_{x_0}=\frac{d}{dx}ln(f(x))|_{x_0}-s=0$ which implies $\frac{d}{dx}ln(f(x))|_{x_0}=s$
so the evaluation of that integral is $e^{ln(f(x_0))-x_0s}$ where $x_0$ and $s$ have the usual relationship for a Legendre transformation.

Aplication in physics
Of course in physics you want all your thermodynamic potentials to have the have minimum peaks(- sign in $Z=e^{-F\beta}$) so your system settles down into a single well defined state. In this way all the partition functions for the different ensembles can be found by Laplace transformation and you will get the corresponding Legendre transformed thermodynamic potential.
I suggest you read this article which demonstrates this result for the micro-canonical to canonical and gives a very good review of the Legendre transformation.  Then from there it is easy to go gibs or grand(which is really just gibs when you consider $\mu$ a force):
So starting from $Z = \int e^{-\beta H}$ you need to add energy from the force,$J$, you are constraining instead of its conjugate $x$: $H-> H' =H+Jx$.  Then since you are now constraining $J$ instead of $x$, $x$ now parametrizes your probability and you need to integrate over it to get the correct normalization($Z$).
so $Z->Z'=\int dx \int e^{-\beta(H+Jx)}=  \int dx e^{Jx}\int e^{-\beta(H)}=  \int dx e^{Jx}Z$
Thus you have your Laplace transform which by following the steps above will get you the desired Legendre transform of the Helmholtz free energy; the Gibs free energy.
A: The relationship between the Laplace and Legendre transforms is through the method of steepest descent, which is usually exact in the thermodynamic limit (since the configuration space typically goes with the system size as $C(N)\Omega_0(E)^N$). For finite $N$, the microcanonical entropy (density) is slightly different from the canonical entropy since it does not include fluctuations about the average energy. Here $\Omega_0(E)=e^{\log(S_M(E))}$ is the same as your $Z_M(E)$.  
