# A problem to find the the chemical potential from the free energy (Ginzburg-Landau/Cahn-Hillard)

I have a problem to derive exactly the spatial term of the chemical potential from the free energy of the Cahn-Hillard equation

So, let us start with the free energy of a binary mixture (A and B). The free energy density in the Cahn-Hillard equation writes (with $$c$$ the variable related to density):

$$f(c, \nabla c) = \frac{1}{4}{\left(c^2-1 \right)^2 + \frac{\gamma}{2} \lvert \nabla c \rvert^2}\tag{1}$$

Let us define, $$\mu (c) = \frac{\delta F}{\delta c}$$, where $$F(c) = \int d^n x f(c, \nabla c)$$, with $$n$$ the spatial dimension.

The result is:

$$\mu (c) = c^3 -c - \gamma \nabla^2 c\tag{2}$$

How can we derive (2) from (1) ?

• Look up how functional derivative of a gradient is evaluated en.wikipedia.org/wiki/Functional_derivative. Define grand potential $G = F - \int d^n x \mu c$ (the free energy in the Grand Canonical ensemble). Then, obtain the equation of motion from the Lagrangian density $\mathcal{L}(c,\nabla{c}) = \frac{1}{4}{\left(c^2-1 \right)^4 + \frac{\gamma}{2} \lvert \nabla c \rvert^2} - \mu c$. Commented Apr 4 at 14:11
• Thanks for your reply. But can we not get more simply the result from (1) by applying the chain rule? Commented Apr 4 at 14:18
• No. $c$ and $\nabla c$ are to be treated as independent variables. Chain rule does not apply here. Commented Apr 4 at 14:20
• Suppose I take the derivative of the last term: d/dc ($\gamma/2 \lvert \nabla c\rvert^2$). This would give, $\gamma/2 \lvert\nabla c\rvert d/dc (\lvert \nabla c \rvert)$. There is no way to evaluate this last term ? Commented Apr 4 at 14:47
• Derivative with respect to what? Note that you can uniformly change $c$ for all values of $x$, which will not affect the value of $\nabla c$ Commented Apr 4 at 14:48

The free energy is $$F[c] = \int d^n x \frac{1}{4}{\left(c^2-1 \right)^2 + \frac{\gamma}{2} \lvert \nabla c \rvert^2}$$.

In the grand canonical ensemble, the chemical potential is fixed, and the density is allowed to vary. The grand potential function is $$G[c] = F[c] - \mu \int d^n x c$$.

The free energy is obtained by minimizing the grand potential functional of the density, $$\frac{\delta G}{\delta c(\vec{r})} = 0$$.

For an infinitesimal variation $$\delta c$$, the change in the grand potential is

$$\delta G = \int d^n x \left[\frac{1}{4}2(c^2 - 1) 2c \delta c + \gamma \nabla c \cdot \nabla \delta c - \mu \delta c\right]$$

$$= \int d^n x \delta c\left[c(c^2-1) - \mu \right] + \int d^n x \gamma \nabla c \cdot \nabla \delta c$$.

Integrating by parts, we can rewrite the above as $$\int d^n x \gamma \nabla c \cdot \nabla \delta c = -\int d^n x \gamma \delta c \nabla^2 c$$. The boundary terms have to be zero because $$\delta c$$ has to be zero at the boundaries, to match the boundary conditions.

Combining everything,

$$\delta G = \int d^n x \delta c\left[c(c^2-1) - \gamma \nabla^2 c - \mu \right]$$.

Since $$\delta G$$ has to be zero (when $$G$$ is minimized) for arbitrary variations of $$\delta c$$, we must have $$\boxed{c(c^2-1) - \gamma \nabla^2 c - \mu = 0}$$.

An alternative way is to notice $$G[c]$$ is the "action" of a Lagrangian, $$\mathcal{L}(c,\nabla{c}) = \frac{1}{4}{\left(c^2-1 \right)^4 + \frac{\gamma}{2} \lvert \nabla c \rvert^2} - \mu c$$, i.e., $$G[c] = \int d^n x \mathcal{L}(c,\nabla{c})$$.

The equilibrium properties are given by the value of $$c$$ such that $$G$$ is minimized, which can be found from Lagrange's equation of motion, $$\frac{\partial \mathcal{L}}{\partial c} = \nabla\cdot \frac{\partial \mathcal{L}}{\partial \nabla c}$$, which produces the same equation for $$\mu$$.

Another alternative is to equate the functional derivative $$\frac{\delta G}{\delta c(\vec{r})}$$ with $$0$$.

We will use the property $$\frac{\delta}{\delta c(\vec{r})} \int d^n x c(\vec{x}) = \int d^n x \delta(\vec{r} - \vec{x})$$.

Then, $$0=\frac{\delta G}{\delta c(\vec{r})} = \int d^n x \left[c(\vec{x})(c^2(\vec{x})-1) -\mu\right]\delta(\vec{r} - \vec{x}) + \gamma \nabla_x c(\vec{x}) \cdot \nabla_x \delta(\vec{r}-\vec{x})$$.

Integrating the last term by parts, $$\frac{\delta G}{\delta c(\vec{r})} = \int d^n x \left[c(\vec{x})(c^2(\vec{x})-1) -\mu\right]\delta(\vec{r} - \vec{x}) - \gamma \nabla^2_x c(\vec{x}) \delta(\vec{r}-\vec{x})$$ $$= c(\vec{r}) (c^2({r})-1)-\gamma \nabla_r^2 c(\vec{r}) - \mu$$.

Since this is zero, we get back the same equation.

By following the suggestion of @ArchismanPanigrah. (2) follows straightforwardly from (1) by using the relation of functional derivative (provided in ref. 2) and by noticing that $$c$$ and $$\nabla c$$ are independent variables.