I have been very confused with calculating the heat capacity when dealing with a Mean Field Hamiltonian.
The Hamiltonian I am working with describes a spin lattice of fermions in 2D. I only count the nearest neighbor interactions. When I apply the mean field theory, of course I end up with the magnetization $(m=\frac{1}{N} <S_i>)$ in my Hamiltonian.
When I calculate the self consistency equation for the magnetization, I get something like: $m=tanh(\beta m J)$ Where $\beta=\frac{1}{kT}$ and J is just the combined coupling between the spins.
Now here is where I struggle. When calculating the specific heat I came across several definitions, which without MFT are always equal to each other, but in MFT just get really messy.
For example $C=\beta^{2} \frac{\partial^{2}}{\partial \beta^{2}} ln(Z_{MFT})$. But $Z_{MFT}$ contains m which itself is also dependent on $\beta$. Because $\frac{\partial^{2}}{\partial \beta^{2}}$ is a partial derivative, I would assume I do not derive m with respect to b. But for example when I use the definition $C=\frac{\partial U}{\partial T}$ where $U=<H_{MFT}>$ I have to also derive m with respect to T, even though it is a partial derivate, because otherwise the two definitions do not become equal.
I have also come across a masters thesis, where they used the definition $C=\beta^{2} \frac{\partial^{2}}{\partial \beta^{2}} ln(Z_{MFT})$ and proceeded to derive also m in respect of $\beta$ and of course ended up with terms $\frac{\partial^{2} m}{\partial \beta^{2}}$. In another calculation, they used the definition $C=\frac{\partial U}{\partial T}$. When I try to replicate their result using the $C=\beta^{2} \frac{\partial^{2}}{\partial \beta^{2}} ln(Z_{MFT})$ definition I just can not get it right.
Of course, it could just be a simple mistake in my calculations, especially because using the first definition gives a much more elegant calculation, but at this point I am just very confused and unsure about my understanding about these definitions.
There is probably a really trivial explanation to my question, but at this point I just can not wrap my head around this problem, so I would be very grateful if somebody could help me understand this. Thanks!