# Superconducting Phases in Neutron Star Cores
## Appendix B Long-Range Interaction between Fluxtubes  
The dimensionless free-energy density (12), when written in terms of the real variables \(f,g\), \(\mathbf{V}\) and \(\chi\) defined in Section 4.2, takes the form  
\[F[f,g,\mathbf{V},\chi] = \frac{1}{2}(f^{2}-1)^{2}+\frac{R^{2}}{2\epsilon}(g^{2}-1)^{2}+ \frac{\alpha}{\epsilon}(f^{2}-1)(g^{2}-1) \tag{10}\] \[+|\mathbf{\
abla}f|^{2}+f^{2}|\mathbf{V}|^{2}+\frac{1}{\epsilon}| \mathbf{\
abla}g|^{2}+\frac{1}{\epsilon}g^{2}|\mathbf{\
abla}\chi|^{2}+\kappa^{2}|\mathbf{ \
abla}\times\mathbf{V}|^{2}\] \[+\frac{h_{1}}{\epsilon}\Big{[}f^{2}|\mathbf{\
abla}g|^{2}+g^{2}|\mathbf{ \
abla}f|^{2}+f^{2}g^{2}|\mathbf{V}-\mathbf{\
abla}\chi|^{2}\Big{]}\] \[+\frac{h_{2}}{2\epsilon}\mathbf{\
abla}f^{2}\cdot\mathbf{\
abla}g^{2}+ \frac{h_{3}}{4}\left(\frac{1}{\epsilon^{2}}\Big{|}\mathbf{\
abla}g^{2}\Big{|}^{2} +\Big{|}\mathbf{\
abla}f^{2}\Big{|}^{2}\right).\]  
The reason for working with these real variables will be explained shortly. Recall that \(F=0\) in the absence of fluxtubes, vortices and magnetic flux, i.e., for \(f=g=1\) and \(\mathbf{V}=\mathbf{\
abla}\chi=\mathbf{0}\). In what follows, we will refer to this as the Meissner solution. Our goal is to determine the free energy per unit length per Wigner-Seitz cell, \(\mathcal{F}(a)\), in the asymptotic limit of a widely-spaced fluxtube lattice, \(a\to\infty\). In this limit, we know that \(\mathcal{F}\) converges to the value for a single fluxtube, i.e., \(\mathcal{F}\to\mathcal{F}_{\infty}\), and we wish to estimate the \"interaction energy\" \(\mathcal{F}-\mathcal{F}_{\infty}\). If its value is positive, the lower transition is of second-order, whereas a negative value implies a first-order transition. To do so, we will first generalize the method introduced by [PERSON] [54] to the case of a free energy in the completely general form \(\mathcal{F}=\langle F[\mathbf{\
abla}]\rangle\), where \(\mathbf{\
abla}\) represents the complete set of independent, real variables, and the angled brackets represent a domain integral. We will then apply the results to the particular case given by Equation (10). We consider an infinite lattice of parallel fluxtubes that are widely separated, in the sense that the size of each Wigner-Seitz cell is large in comparison with both the coherence length and the London length. Any such lattice, characterized by \(\mathbf{\
abla}\), is a steady state, in that it is a solution of the Euler-Lagrange equations that are obtained from the functional derivative  
\[\frac{\delta}{\delta\mathbf{\
abla}}\langle F\rangle=0\,. \tag{11}\]  
We assume that each fluxtube is located far inside its Wigner-Seitz cell, which allows us to make two approximations:  
1. Within each cell, the solution can be approximated as a linear perturbation to the single fluxtube solution;
2. On the boundary of the cell, the solution can be approximated as the Meissner solution plus a superposition of linear, _independent_ perturbations produced by the fluxtubes. Note that we do not assume that the fluxtube is located exactly at the center of the cell, and we will verify later that the exact location of the fluxtube within the cell does not affect our result for the interaction energy. We will use the notation \(\delta^{n}F[\delta\mathbf{\
abla};\mathbf{\
abla}]\) to represent the \(n\)-th variation of \(F\), i.e., the terms up to order \((\delta\mathbf{\
abla})^{n}\) in the Taylor expansion of \(F[\mathbf{\
abla}+\delta\mathbf{\
abla}]-F[\mathbf{\
abla}]\). If \(\mathbf{\
abla}\) is a solution of the Euler-Lagrange Equation (11), then \(\delta^{1}F[\delta\mathbf{\
abla};\mathbf{\
abla}]\) is an exact derivative. This follows directly from the definition of the functional derivative, which dictates that  
\[\delta^{1}F=\delta\mathbf{\
abla}\cdot\underbrace{\left(\frac{\delta}{\delta\mathbf{ \
abla}}\langle F\rangle\right)}_{\text{EL equations}}+\mathbf{\
abla}\cdot\mathbf{Q}, \tag{12}\]  
for some vector field \(\mathbf{Q}[\delta\mathbf{\
abla};\mathbf{\
abla}]\).