4
$\begingroup$

I have been looking around the internet for quite some time trying to find a quick way to compute the Modified Bessel Function of the Second Kind, that is $K_n(x)$ where $n$ takes on only positive integer values. I have a recurrence relation to that only requires me to find the values of $K_0(x)$ and $K_1(x)$ to find $K_n(x)$ for any $n$. I am having issues finding a quick way to compute these values in a quick and accurate way. Most representations involve slow converging integrals or summations that give poor results.

I need a method that can give close to full double precision and still run fast enough to find solutions to multiple transcendental equations that involve these Bessel functions. These computations are being done in VBA.

$\endgroup$
0
$\begingroup$

You could try using the following relations: $$\int_0^1 \sqrt{t}e^{\frac{1}{\log(x^t)}}dx=2K_1\bigg(\frac{2}{\sqrt{t}}\bigg) $$

$$ \int_0^1 -\frac{1}{\log(x)}e^\frac{1}{\log(x^t)}dx =2K_0\bigg(\frac{2}{\sqrt{t}}\bigg) $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.