From 0000fd8c04698cc1406e6a26dd20a7ce025d7450 Mon Sep 17 00:00:00 2001
From: Jaron Kent-Dobias <jaron@kent-dobias.com>
Date: Tue, 19 Oct 2021 17:43:53 +0200
Subject: Writing.

---
 data/phi_comparison.dat | 10 ++++++++++
 ising_scaling.tex       | 48 +++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 53 insertions(+), 5 deletions(-)
 create mode 100644 data/phi_comparison.dat

diff --git a/data/phi_comparison.dat b/data/phi_comparison.dat
new file mode 100644
index 0000000..9193688
--- /dev/null
+++ b/data/phi_comparison.dat
@@ -0,0 +1,10 @@
+2	0.002860955318525926	0.004496459219585747	0.0025781014469987568	0.0004361990091461404
+3	0.0005720429508622171	0.0010847239134089692	0.000805365486839224	0.00006427186448818359
+4	0.00003961608489011503	0.0001278039316774393	0.00018174532718064074	0.00013408467605927413
+5	0.0000622987443403833	0.00016919055775577174	0.0002085264051783775	0.0001300161350704411
+6	0.00005016392362722222	0.00014150435296594877	0.00016732830408854038	0.00007562595035311148
+7	0.000015703311988302104	0.00005762691693961264	0.00009304388663239349	0.00007579125219901034
+8	8.173890766238756e-6	0.000021607891761421527	0.000022883111337773654	6.9772437447900015e-6
+9	2.4873158455118727e-6	7.768088409076945e-6	9.816343265717231e-6	3.88602466879287e-6
+10	3.7198724605058686e-6	0.000011866786064407275	0.00001594714070687897	8.677026311975505e-6
+11	0.00006257848162638524	0.00006629563696586294	0.0000134012475765527	0.0000386060655095978
\ No newline at end of file
diff --git a/ising_scaling.tex b/ising_scaling.tex
index 2301e73..be5364d 100644
--- a/ising_scaling.tex
+++ b/ising_scaling.tex
@@ -491,11 +491,29 @@ This leaves as unknown variables the positions $\theta_0$ and
 $\theta_{\mathrm{YL}}$ of the abrupt transition and Yang--Lee edge singularity,
 the amplitude $A_\mathrm{YL}$ of the latter, and the unknown functions $F$ and
 $h$. We determine these approximately by iteration in the polynomial order at
-which the free energy and its derivative matches known results. Gradients can be computed with
-
-A Levenburg--Marquardt algorithm is performed
-
-\begin{table}
+which the free energy and its derivative matches known results. We write as a
+cost function the difference between the known series coefficients of the
+scaling functions $\mathcal F_\pm$ and the series coefficients of our
+parametric form evaluated at the same points, $\theta=0$ and $\theta=\theta_c$,
+weighted by the uncertainty in the value of the known coefficients or by a
+machine-precision cutoff, whichever is larger. A Levenburg--Marquardt algorithm
+is performed on the cost function to find a parameter combination which
+minimizes it. As larger polynomial order in the series are fit, the truncations
+of $F$ and $h$ are extended to higher order so that the codimension of the fit
+is constant. A term is added to $F$ whenever a new coefficient of the high
+temperature series is added, and one is added to $h$ whenever a new coefficient
+of the low temperature series is added.
+
+We performed this procedure starting with $n=2$, or matching the scaling
+function at the low and high temperature zero field points to quadratic order,
+through $n=9$. The resulting fit coefficients can be found in Table
+\ref{tab:fits} without any sort of uncertainty, which is difficult to quantify
+directly due to the truncation of series. However, precise results exist for
+the value of the scaling function at the critical isotherm, or equivalently for
+the series coefficients of the scaling function $\mathcal F_0$, and the
+accuracy of the fit results can be checked against the known values here.
+
+\begin{table}\label{tab:fits}
   \begin{tabular}{c|ccc}
     $n$ & $\mathcal F_-^{(n)}$ & $\mathcal F_0^{(n)}$ & $\mathcal F_+^{(n)}$ \\\hline
     0   & 0                    & $-1.197733383797993$ & 0                    \\
@@ -619,6 +637,26 @@ A Levenburg--Marquardt algorithm is performed
   \end{tabular}
 \end{table}
 
+\begin{figure}
+  \begin{gnuplot}[terminal=epslatex, terminaloptions={size 8.65cm,5.35cm}]
+    dat = 'data/phi_comparison.dat'
+
+    set xlabel '$n$'
+    set ylabel '$|\mathcal F_0^{(n)}-|$'
+
+    set style data linespoints
+    set logscale y
+
+    plot \
+      dat using 1:2 title '0', \
+      dat using 1:3 title '1', \
+      dat using 1:4 title '2', \
+      dat using 1:5 title '3'
+  \end{gnuplot}
+  \caption{
+  }
+\end{figure}
+
 \begin{figure}
   \begin{gnuplot}[terminal=epslatex, terminaloptions={size 8.65cm,5.35cm}]
     dat9 = 'data/h_series_ours_9.dat'
-- 
cgit v1.2.3-70-g09d2