First-order phase transition in the Ising model? I am doing a simulation of the 2D Ising model with a Monte Carlo algorithm. I think that the model should exhibit a second order phase transition at $\beta=\beta_c$, but when I try to plot the magnetization for $0<\beta<1$, I get the following plot:

Since the the magnetization is discontinuous this is a first order phase transition, right?
But I'm pretty sure it should be a second order one. What am i missing?
 A: Magnetization of the 2d Ising model grows too fast in the critical point vicinity. From the exact solution of the Ising model, we know
$$
M \sim (\beta - \beta_c)^{1/8}.
$$
It is hard to catch power law dependence of M on $\beta$ with such a small exponent by the approximate stochastic method.
A: Just as a complement to the previous answers, here is a plot of the spontaneous magnetization for this model, in the same range of $\beta$ you are considering, so that you can see how steep the increase is at $\beta_{\rm c}$:

The explicit formula is
$$
m(\beta) =
\begin{cases}
\bigl( 1 - \sinh(2\beta)^{-4}\bigr)^{1/8} & \text{if $\beta>\beta_{\rm c}$,}\\
0 & \text{if $\beta\leq\beta_{\rm c}$,}
\end{cases}
$$
where $\beta_{\rm c} = \frac12 \operatorname{arsinh}(1) \cong 0.44$.
It was first announced by Onsager and Kaufman in 1949 and derived by Yang in 1952.
A: It is continuous. You can either try taking more points in the region with the sharp decrease in magnetisation or you can set a convergence criterion on your code. For example, you can check the standard deviation of magnetisation per spin for 100 Monte Carlo steps and see when it goes below a threshold value.
A: Monte Carlo simulation is always done on a finite size lattice, which means that no (second order) phase transition exist in such system and the magnetization changes continuously. Indeed, phase transitions emergy in thermodynamic limit, i.e., when the size of the system become sinfinitely large.
The transition region in the simulation should be narrow, and should decrease with increasing the lattice size. In this sense the figure in the OP does not seem pathological to me. It is worth looking up the texts on Monte Carlo to see how the width of the transition region shoudld ecrease with the lattice size. Landau&Binder's A Guide to Monte Carlo Simulations in Statistical Physics is the classical text here.
