# Derivative of the modified Bessel function of third kind with respect to its order in R

How can I find the derivative of the modified Bessel function of third kind ($K_{\nu}(x)$) with respect to its order ($\nu$)? Specifically, how can I evaluate

$$\frac{\partial K_{\nu}(x)}{\partial \nu}$$

in R, where $\nu$ and $x$ are assumed real to be real.

R package Bessel evaluates Bessel functions for a variety of arguments ($x$) and order ($\nu$). There is also R package fAsianOptions that evaluates the Bessel functions for integer order and has functions for evaluating

$$\frac{\partial K_{\nu}(x)}{\partial x} \; (\text{note } x \text{ not } \nu).$$

A related, but not similar, question is here.

The recurrence relation between the $\frac{\partial K_{\nu}(x)}{\partial \nu}$ and other Bessel function can be found here.

$$\frac{\partial K_{\nu}(x)}{\partial \nu} = K_{\nu}(x)\bigg[1 - \frac{1}{2\nu} - \log \big(\frac{ex}{2\nu} \big)\bigg].$$

I was wondering if there are better approximations.

• Perhaps this can help? I find it pretty usefull. – Federer34 Oct 23 '17 at 19:30
• Why not just compute a finite difference approximation? Simple and fast. – whuber Oct 23 '17 at 20:57