Mean field 3d Ising model in Landau theory I am solving a problem for some course I am following. I am given the Hamiltonian: 
$$H = 3NJ \langle \sigma\rangle ^2 -6J\langle \sigma\rangle \sum_i\sigma_i,$$
where $i$ sums over all sites ($=N$). This is the Hamiltonian for the 3D mean field Ising model. The average spin per site is $\langle\sigma\rangle\equiv m$ from now on. $J$ is some interaction energy, most references take here $J/2$ but we had to use $J$, does not matter that much of course. 
I found the canonical partition function as follows:
$$Z= \sum_{configs} e^{-\beta H} = e^{-3\beta NJm^2} \sum_{configs} \prod_{i}e ^{6\beta Jm \sigma_i} = e^{-3\beta NJm^2} \prod_i 2^{N-1} (2\cosh(6\beta Jm)) = e^{-3\beta JNm^2}(2\cosh(6\beta Jm))^N,$$
where $configs$ denotes the sum over all configurations and $\sigma_i = \pm1$ is used. 
From this I found the consistency equation for $m$:
$$m = \tanh(6\beta Jm),$$
using $h=  6Jm$ and $m = \frac{1}{N\beta} \frac{\partial \ln(Z)}{\partial h}$.
From this I derived the critical temperature:
$$T_c = \frac{6J}{k_B}.$$
From this I had to derive the Landau parameters $a$ and $b$. I had to do this by expanding the consistency equation around $m\approx 0$ and $T\approx T_c$ using the reduced temperature $t=(T-T_c)/T_c$. For the problem I had to use $t$ and $M = mN$ for the total magnetization. 
This gives: 
$$1 \approx \frac{T_c}{T} - \frac{M^2}{3 N^2}(\frac{T_c}{T})^3 + \frac{2M^4}{15 N^4}(\frac{T_c}{T})^5,$$
and using $1+t  = \frac{T}{T_c}$ we find: 
$$1 \approx \frac{1}{1+t} - \frac{M^2}{3N^2}(1+t)^{-3}+ \frac{2M^4}{15N^4}(1+t)^{-5}.$$
We can taylor expand this for $t \approx 0$ as follows:
$$1 = 1 -t -t^2 - \frac{M^2}{3N^2}(1-3t+6t^2) + \frac{2M^4}{15N^4}(1-5t+15t^2).$$
I had to expand this expression to second order in $t$ and second order in $M^2$. Now I have to find the coefficients $a,b$ in the following where $\phi$ is the canonical potential so $\ln(Z)$:
$$\phi(T,M) = \phi_0(T) -aJtM^2 -bJM^4.$$
Does anyone have an idea how to connect my previous equation to this one? I am really stuck at this point and I do not see how to connect these two equations. 
 A: So the free energy functional, with parameters $m$ and $T$ is given by the logarithm of the partition function:
$$ F(m,T) = - \frac{1}{\beta} \log Z = 3 J N m^2 + \frac{N}{2\beta} \log \cosh(6\beta J m)^2 - \frac{N}{\beta} \log 2 \ . $$ 
It is convenient of replacing $\cosh$ by $\cosh^2$ for the following reason: we have
$$ \tanh(6\beta J m)^2 = \frac{\cosh(6\beta J m)^2-1}{\cosh(6\beta J m)^2} $$
and thus, using the consistency equation
$$ \cosh(6\beta J m)^2 = \frac{1}{1- \tanh(6\beta J m)^2} = \frac{1}{1-m^2} \ . $$
Hence we get
$$ F(m,T) = 3 J N m^2 + \frac{N}{2\beta} \log \frac{1}{1-m^2} - \frac{N}{\beta} \log 2 $$
Expanding in $m$:
$$  F(m,T) = (1 - 6\beta J) \frac{N m^2}{2} + \frac{N m^4}{4 \beta} + \mathcal{O}(m^6)  \ .$$
Note that if $t = \frac{T-T_c}{T}$, then
$$ (1 - 6\beta J) = \frac{T}{T_c} \frac{T-T_c}{T_c} = t + t^2 $$
and
$$ \frac{1}{\beta} = T_c + t T_c $$
So 
$$ F(m,t) = \frac{t N m^2}{2} + \frac{T_c N m^4}{4} + \mathcal{O}(t^2,m^6,m^4 t) $$
Which is a sensible Landau free energy functional, but is not formulated in terms of the total magnetization $M$, so that remains unclear to me.
