Class bessel_K_exp_integ_tl (o2scl)

O2scl : Class List

template<class inte_t, class fp_t = double>
class bessel_K_exp_integ_tl

Compute an exponentially scaled modified Bessel function of the second kind by direct integration.

This class uses an integral representation of the exponentially scaled modified Bessel function of the second kind

\[ K_n(z) e^{z} = \frac{\sqrt{\pi} z^{n}}{2^{n} \Gamma(n+1/2)} \int_1^{\infty} e^{z(1-t)} \left(t^2-1\right)^{n-1/2}~dt \]
(see http://functions.wolfram.com/Bessel-TypeFunctions/BesselK/07/01/01/)

Todo

In bessel_K_exp_integ_tl, better testing of accuracy.

Public Functions

inline int calc_err(size_t n, fp_t z, fp_t &res, fp_t &err)

Compute the integral, storing the result in res and the error in err.

Public Members

inte_t iiu

The integrator.

Protected Types

typedef std::function<fp_t(fp_t)> func_t

Internal function type.

Protected Functions

inline fp_t obj_func(fp_t t, size_t n, fp_t z)

The exponentially scaled modified Bessel integrand.