i0_over_i1

pmrf.math.i0_over_i1(x: Array) Array

Ratio \(I_0(x)/I_1(x)\) of modified Bessel functions, for complex \(x\).

Mathematical Formulation

Below \(|x|=20\) the ascending series is summed directly,

\[I_0(x)=\sum_{k\ge0}\frac{(x/2)^{2k}}{(k!)^2},\qquad I_1(x)=\sum_{k\ge0}\frac{(x/2)^{2k+1}}{k!\,(k+1)!},\]
to 40 terms; above it the ratio is taken from the large-argument expansion
\[\frac{I_0(x)}{I_1(x)}\sim 1+\frac{1}{2x}+\frac{3}{8x^2} +\frac{3}{8x^3}+\frac{63}{128x^4}+\frac{27}{32x^5}.\]
The small-argument limit \(I_0/I_1\to2/x\) falls out of the series with no special case, which is what makes the dc limit of a cylindrical conductor exact rather than patched.

Validity

Measured against scipy.special.ive() over \(|x|\in[10^{-6},10^4]\): worst relative error 3.1e-8, at the switch point, for \(|\arg x|\) up to \(60^\circ\) – which covers the \(45^\circ\) ray \(\gamma=\sqrt{j\omega\mu\sigma}\) that a good conductor sits on. The large-argument expansion is an asymptotic series about the positive real axis and degrades as \(\arg x\to90^\circ\) (2e-6 at \(70^\circ\), 6e-2 at \(85^\circ\)); this function is not for arguments near the imaginary axis. See tests/test_math/test_bessel.py for the per-regime tolerances. Both branches are evaluated on safe arguments, so jax.grad() is finite throughout; the derivative jump at the seam is 1.4e-4 relative. \(x=0\) is a genuine pole of the ratio and is the caller’s to handle.

Parameters:

x (jnp.ndarray) – Argument, real or complex.

Returns:

\(I_0(x)/I_1(x)\).

Return type:

jnp.ndarray