Questions tagged [special-functions]
For questions about evaluating or implementing special functions, e.g. Bessel, hypergeometric, gamma, Lambert W.
61
questions
6
votes
5
answers
298
views
Evaluate the sum
I want to evaluate the sum $$\sum_{k=1}^\infty \left(\frac{i+1}{\sqrt{2}}\right)^k\cdot k^{-\alpha}$$ where $i=\sqrt{-1}$ and $\alpha\in[\frac{3}{4},1]$ with 8 digits accuracy.
If I am willing to ...
15
votes
1
answer
341
views
Does transforming $J_0(x)\to\int\cos(x\sin\theta)$ help with numerical integration?
I've heard anecdotally that when one is trying to numerically do an integral of the form
$$\int_0^\infty f(x) J_0(x)\,\mathrm{d}x$$
with $f(x)$ smooth and well-behaved (e.g. not itself highly ...
26
votes
4
answers
10k
views
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+...
8
votes
2
answers
146
views
Computing ratio of trigonometric functions
I have need to compute the functions:
$$ f(x) = \frac{\sin^{-1}x}{x}$$
and
$$ g(x) = \frac{\sin a x}{\sin x} $$
where $a\in[0,1]$ and $ x\in[0,\frac{\pi}{2}]$ and is often very small ($x\ll 1$). Are ...
16
votes
2
answers
1k
views
What are the efficient, accurate algorithms for evaluation of hypergeometric functions?
I'm curious to know what good numerical algorithms exist for evaluation of the generalized hypergeometric function (or series), defined as
$${}_pF_q(a_1,\ldots,a_p;b_1,\ldots,b_q;z) = \sum_{k=0}^{\...
8
votes
3
answers
689
views
Evaluating sine and cosine of an integer multiple of an angle
When evaluating cylindrical harmonics, one needs to evaluate trigonometric functions $\cos(m\theta)$ and $\sin(m\theta)$, potentially for large integer $m$ and $\theta\in[-\pi,\pi]$. What is the best ...
3
votes
2
answers
124
views
Representing an integral as a special function
In my research I have come across the following integral
\begin{equation}
f = \int_0^{2\pi} \text{d}\theta \exp\left\{\frac{3}{2}(h_1 \cos^2\theta + h_2 \sin^2\theta + 2 h_{12} \sin\theta \cos\theta)\...
16
votes
2
answers
2k
views
Open source implementation of rational approximation to a function
I am looking for some open source implementation (any of Python, C, C++, Fortran is fine) of rational approximation to a function. Something along the article [1].
I give it a function and it gives me ...
10
votes
4
answers
4k
views
Fast and accurate double precision implementation of incomplete gamma function
What is the state of the art way of implementing double precision special functions? I need the following integral:
$$
F_m(t) = \int_0^1 u^{2m} e^{-tu^2} d u
= {\gamma(m+{1\over 2}, t)\...
6
votes
2
answers
3k
views
An efficient way to numerically compute Stirling numbers of the second kind?
Is there an efficient way to numerically compute Stirling numbers of the second kind?
An approximate (not exact) method would suffice. Something similar to the connection between factorials and gamma ...
10
votes
1
answer
208
views
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 ...