Section 1.1 & 5.3: Error Function

Here we provide the code to compute the complimentary error function $$\mathrm{erfc}\, z \triangleq \frac{2}{\sqrt{\pi}} \int_z^\infty \mathrm{e}^{-s^2} \mathrm{d} s$$ that is discussed in both Sections 1.1 and 5.3. The code allows the production of the following plot.

Mathematica Notebook

Section 1.2 & 5.5: Elliptic Integrals

The code to compute the elliptic integral $$g(z;a) \triangleq \int_0^z \frac{\mathrm{d}\zeta}{\sqrt{1-\zeta^2}\sqrt{a^2-\zeta^2}}$$ that is discussed in both Sections 1.2 and 5.5. Note that there is a typo in the final formula for $g(z;a)$: $M^{-1}(\pm z)$ should appear in all of the logarithms. The following figure is for $a = 1$.

Mathematica Notebook

Section 1.3 & 6.3: Airy Function

Computing the Airy function $$\mathrm{Ai}''(z) = z \mathrm{Ai}(z), \quad \mathrm{Ai}(z) \sim \frac{1}{2 \sqrt{\pi}} z^{-1/4} \mathrm{e}^{-\frac{2}{3} z^{3/2}}$$ is more involved. It requires setting up and solving a matrix RH problem. This is discussed in both Sections 1.3 and 6.3. The code allows for evaluating the Airy function of any complex argument.

Mathematica Notebook

Section 1.4 & 6.4: Monodromy

We consider computing $Y(z)$ which satisfies $$Y'(z) = \sum_{k=1}^3 \frac{A_k}{z-k}Y(z), \quad Y(0) = I$$ from the monodromy data $$M_1 =Y_-^{-1}(3/2) Y_+(3/2), \quad M_2 =Y_-^{-1}(5/2) Y_+(5/2),\quad M_3 =Y_-^{-1}(7/2) Y_+(7/2).$$ The code allows for computing $Y(z)$ throughout the complex plane using only the monodromy data.

Mathematica Notebook