Questions tagged [special-functions]

For questions about evaluating or implementing special functions, e.g. Bessel, hypergeometric, gamma, Lambert W.

Filter by
Sorted by
Tagged with
26 votes
4 answers

Method for numerical integration of difficult oscillatory integral

I need to numerically evaluate the integral below: $$\int_0^\infty \mathrm{sinc}'(xr) r \sqrt{E(r)} dr$$ where $E(r) = r^4 (\lambda\sqrt{\kappa^2+r^2})^{-\nu-5/2} K_{-\nu-5/2}(\lambda\sqrt{\kappa^2+...
torbonde's user avatar
  • 491
10 votes
3 answers

How to use polylogarithm function in c++?

Is there any preprocessor directives that could be used to use the polylog function? Or is it included in cmath? If so, do you call it by Li or by polylog? EDIT: What I really am trying to do is give ...
flamingohats's user avatar
4 votes
1 answer

Compute hypergeometric function ratio: $\frac{_{2}F_{1}(a+1,b;c;x)}{_{2}F_{1}(a,b;c;x)}$?

I need a numerically stable way to compute the following ratio: $$\frac{_{2}F_{1}(a+1,b;c;x)}{_{2}F_{1}(a,b;c;x)}$$ All the parameters are real numbers, with $a< 0$,$\ $ $b,c > 0$ and $0<x&...
a06e's user avatar
  • 1,729
10 votes
1 answer

Polynomials that are orthogonal over curves in the complex plane

Various important sets of polynomials (Legendre, Chebyshev, etc.) are orthogonal over some real interval with some weighting. Are there known families of polynomials that are orthogonal over other ...
David Ketcheson's user avatar
8 votes
1 answer

Accurate and efficient computation of the inverse Langevin function

The Langevin function $\mathcal{L}(x) = \mathrm{coth}(x) - \frac{1}{x}$ occurs in computations related to elastomers and paramagnetic materials. It is easily computed accurately and with high ...
njuffa's user avatar
  • 1,865
7 votes
3 answers

Finding the first N roots of transcendental equation

I need to find the first $n$ roots of the transcendental equation \begin{equation} F(k) = J_m'(kr)Y_m'(k)-J'_m(k)Y'_m(kr) \end{equation} for integer values of $m$ and any $r \in [0,1)$ where $J'$ ...
Dipole's user avatar
  • 873
4 votes
1 answer

Numerical evaluation of the Exponential Integral Ei by rational Chebyshev approximations fails

I am trying to evaluate the Exponential Integral $Ei(x)=-\int^{\infty}_{-x}\frac{e^{-t}}{t}dt$ for $x>0$ (interpreted as the Cauchy principal value) by using rational Chebyshev approximations, ...
jitter's user avatar
  • 155
4 votes
2 answers

Interpolation with the roots of orthogonal polynomials & Spectral expansion

I'm a bit confused about the relationships between these two approximation methods mentioned in the title. Does this kind of interpolation also belongs to the field of spectral methods? Are the ...
user123's user avatar
  • 679
2 votes
2 answers

Kummer's confluent hypergeometric for complex arguments in C/C++?

I need to evaluate Kummer's confluent hypergeometric function for imaginary arguments: $$_1F_1(a,b;ix)$$ where $i$ is the imaginary unit, $a,b,x$ are real, and $a,b>0$. Is there a routine ...
a06e's user avatar
  • 1,729
2 votes
2 answers

Integration of a diverge function in c++ GSL Library

I am trying to perform an Integral of Hypergeometric function 2F1(a,b,c,x) from -1 to 1 for some good values of $a,b,c$ (lets say $a=1,b=2,c=3$) . I did it in ...
Kamran Salehi Vaziri's user avatar