bessel_K( n , z )

The modified Bessel function of the second kind of z in SageMath. A solution of the differential equation

$\frac{d^2 f}{dz^2} + \frac{1}{z} \frac{df}{dz} - \left[ 1 + \frac{n^2}{z^2} \right] f = 0$

The second linearly independent solution of this equation for integer order is bessel_I.

Plot on the real axis: