Hex  1.0
Hydrogen-electron collision solver
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
special::integral Namespace Reference

Functions

template<class T >
trapz (double h, NumberArray< T > const &y)
 Uniform trapezoidal integration. More...
 
template<class T >
trapz (NumberArray< T > const &x, NumberArray< T > const &y)
 Non-uniform trapezoidal integration. More...
 
template<class T >
simpson (double h, NumberArray< T > const &y)
 Uniform Simpson integration. More...
 
template<class T >
pow_exp_hyperg1F1 (T a, T b, T c, T u, T v, T x, double epsrel=1e-10, unsigned maxiter=1000)
 Compute integral of the confluent hypergeometric function. More...
 
template<class T >
NumberArray< T > romberg (const ArrayView< T > y)
 Romberg integration. More...
 

Function Documentation

template<class T >
T special::integral::pow_exp_hyperg1F1 ( a,
b,
c,
u,
v,
x,
double  epsrel = 1e-10,
unsigned  maxiter = 1000 
)

The function template will return the scaled value of the indefinite integral

\[ I(a,b,c,u,v;z) = \frac{1}{x^{a+1}} \int x^a \mathrm{e}^{bx} {}_1\!F_1\left(\matrix{u \cr v}\Big|\,cx\right) \mathrm{d}x \ . \]

The series representation, which is used here, is obtained by a term-by-term integration. The result is

\[ I(a,b,c,u,v;z) = \sum_{k=0}^\infty \frac{1}{a+1+k} \sum_{n=0}^k \frac{(u)_n}{(v)_n} \frac{(bx)^{k-n}}{(k-n)!} \frac{(cx)^n}{n!} \ . \]

This is an analytic function in all arguments except for \( a \in \mathbb{Z}^- \).

The function also accepts optional arguments that govern the precision and the maximal number of iterations (terms of the outer sum). Due to the template character the arguments "a", "b", "c", "u", "v" and "z" are expected to be either all real or all complex. The result has the corresponding type as well.

Note
This method fails in inexact arithmetic.
template<class T >
NumberArray<T> special::integral::romberg ( const ArrayView< T >  y)
template<class T >
T special::integral::simpson ( double  h,
NumberArray< T > const &  y 
)
template<class T >
T special::integral::trapz ( double  h,
NumberArray< T > const &  y 
)
template<class T >
T special::integral::trapz ( NumberArray< T > const &  x,
NumberArray< T > const &  y 
)