Minimum of the free energy in Landau-Ginzburg theory I'm reading David Tong's lectures and this page:

I understand how to get the solution $m_0$ when $m$ has no spatial dependence. But I do not understand how one can find the solution when $m = m(x)$
$m = m_0\tanh(\sqrt{\frac{-a}{2c}} x)$
In particular, where does tanh come from? I'd appreciate your help. Thank you. 

You need to solve differential equation:
$$
\frac{d^2m}{d x^2} = \frac{am}{c} + \frac{2b m^3}{c}
$$
We multiple this equation by $\frac{dm}{dx}$ (if $\frac{dm}{dx}=0$ we obtain 2 vacuum solutions):
$$
\frac{dm}{dx}\frac{d^2m}{d x^2} = \frac{dm}{dx}\frac{am}{c} + \frac{dm}{dx}\frac{2b m^3}{c}
$$
$$
\frac{1}{2}\frac{d}{dx}\left(\frac{dm}{dx}\right)^2
=
\frac{1}{2}\frac{d}{dx}\frac{am^2}{c} + \frac{1}{2}\frac{d}{dx}\frac{bm^4}{c}
$$
$$
\left(\frac{dm}{dx}\right)^2
=
\frac{am^2}{c} + \frac{bm^4}{c}
$$
Such equation you can easily solve:
$$
\int^{m(x)} \frac{dm}{|m|\sqrt{a+bm^2}} = \frac{x}{\sqrt{c}} + const
$$
Because $a<0$:
$$
\int^{m(x)\sqrt{-\frac{b}{a}}} \frac{dy}{|y|\sqrt{y^2-1}} = \frac{\sqrt{-a}x}{\sqrt{c}} + const
$$
$$
\int^{-m^2(x)\frac{b}{a}} \frac{dy^2}{2y^2\sqrt{y^2-1}} = \frac{\sqrt{-a}x}{\sqrt{c}} + const
$$
We introduce $t^2 = y^2-1$:
$$
\int^{-m^2(x)\frac{b}{a} -1} \frac{dt^2}{2(t^2+1)t} = \sqrt{\frac{-a}{c}} x+ const
$$
$$
\int^{\sqrt{-m^2(x)\frac{b}{a} -1}} \frac{dt}{(t^2+1)} = \sqrt{\frac{-a}{c}} x + const
$$
$$
\arctan(\sqrt{-m^2(x)\frac{b}{a} -1}) = \sqrt{\frac{-a}{c}} x + const
$$
... Maybe I made mistake:(
