Ginzburg-Landau Theory as Taylor Expansion: Why are there Gradient Terms? I am trying to get the relation between developing a Ginzburg-Landau theory, let's say for a ferromagnet with magnetization field $\vec{m} = \vec{m}(\vec{r})$, and the formal expansion of the free energy density $\mathcal{F} = \mathcal{F}(\vec{m})$ in terms of a Taylor series.
Considering an isotropic ferromagnet, the lowest-order terms in our Ginzburg-Landau theory should be given by
$$
\mathcal{F} = \frac{r}{2} \vec{m}^2 + \frac{U}{4} \left(\vec{m}^2 \right)^2 + \frac{J}{2} \left[ \left(\partial_x \vec{m}\right)^2 + \left(\partial_y \vec{m}\right)^2 + \left(\partial_z \vec{m}\right)^2 \right]
$$
with $r < 0$ and $U, J > 0$.
However, when I think of a Taylor expansion of $\mathcal{F}(\vec{m})$ around the origin
$$
\mathcal{F} = \mathcal{F}_0 + \vec{m}^T \cdot D\mathcal{F} + \frac{1}{2} \vec{m}^T \cdot D^2\mathcal{F} \cdot \vec{m} + \dots 
$$
this is giving me terms of all the individual powers in $\vec{m}$, which are either zero or identified with the $r$- and $U$-term, but no gradient terms for the $J$-term? How to motivate these through a Taylor expansion?
 A: Note that this is rather an opinion than a fully rigorous statement:
$\qquad$ For vanishing gradients, i.e. for uniform systems (the case originally considered by Landau), the expansion of the free energy is indeed a Taylor expansion (in even powers of $m$) near the transition. However the addition of gradient terms in the case of non-uniform systems removes this interpretation as is rather a phenomenological modification. However, you could still see this an expression for a classical field theory.
A: It looks to me like you are Taylor expanding $\mathcal{F}$ as a function of $\vec{m}$ without considering that $\vec{m}$ is a function of space. In particular, your $D$ and $D^2$ involve things like $\frac{\partial}{\partial m_x}$ but not $\frac{\partial}{\partial x}$. You are implicitly assuming that $\mathcal{F}(\vec{x})$ only depends on $\vec{m}(\vec{x})$ and not also for example $\vec{m}(\vec{x} + d\vec{x})$ for small $d\vec{x}$.
A: The whole term for the free energy is within volume integral (it is "free energy density" to be integrated for the total free energy), thus integrating by parts your expression you receive the given one (neglecting the surface term which adds up to $F_0$).
$$\int m\frac{\partial}{\partial x}\frac{\partial m}{\partial x}dx\sim\int(\frac{\partial m}{\partial x})^2dx$$
