# Questions tagged [special-functions]

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

58 questions
Filter by
Sorted by
Tagged with
76 views

153 views

• 21
113 views

### Calculations to constraint a value with only min and max functions

I have an X value that can go from 0.0000001 to infinite. I want, if this value is less than 0.8, get 0.8 And if that value is equal to or more than 0.8, get 0 How would you do that using only min ...
• 111
392 views

### What is an efficient way to calculate zeros of Bessel functions?

One approach is the brute force method of evaluating at all points at fixed intervals and when it nears zero write value, this can be combined with adaptive step size. Another approach is ...
• 203
92 views

### Is expm1 the right primitive?

I'm writing some code to calculate $\int_0^1 e^{ax} \mathrm{d} x$. Annoyingly there does not seem to be a way of doing this without if statements: ...
• 335
285 views

### How can I calculate the exponential integral?

(I originally asked this in a different exchange.) I'm writing a program that uses the prime-counting function. Right now, I'm using x/log(x), but I want to ...
• 109
88 views

### Robust ways to find zeros of the Tricomi confluent hypergeometric function as a function of its parameters

I'm solving a quantum mechanical problem, and the quantization condition requires me to solve the equation $$U\left(\frac12(\ell+1-E), \ell+1, r^2\right) = 0,$$ where $U(a,b,z)$ is the confluent ...
120 views

### Best way to numerically compute elliptic integrals of the third kind with complex arguments?

I need to compute elliptic integrals of the third kind with complex arguments, preferably in C++. Is there code out there to do this? I have discovered the Arb library, but that does much more than I ...
351 views

### What algorithm does (or did?) Excel use for Bessel functions that is discontinuous at x=8?

Writing this comment reminded me of something I noticed years ago about evaluating Bessel functions of the first kind $J_n(x)$ in Excel. (BESSELJ) I don't use Excel now but at the time I'd checked ...
• 852
419 views

### 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 ...
• 1,030
642 views

### 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 ...
2k views

### Finding the first N roots of transcendental equation

I need to find the first $n$ roots of the transcendental equation $$F(k) = J_m'(kr)Y_m'(k)-J'_m(k)Y'_m(kr)$$ for integer values of $m$ and any $r \in [0,1)$ where $J'$ ...
• 873
1 vote
2k views

### Continuum removal algorithm in python

I'm using python 2.7 (on jupyter notebook, win10 64 bit) to perform my analysis. I need to perform continuum removal (CR) on a reflectance spectrum data. I need it to be as described here. EDITED: ...
• 117
198 views

### Normalization of MATLAB HermiteH

I was wandering - what kind of normalization does Matlab use in hermiteH, its implementation of the Hermite polynomials? It is certainly not the case that they use ...
• 245
1 vote
335 views

220 views

### 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, ...
• 155
294 views

### Numerical integration using interval arithmetic, nowadays

Is there now a package for rigorous numerical integration that uses interval arithmetic and has access to a well-developed library of special functions? By "well-developed", I mean something that, at ...
• 269
107 views

### Numerical computation of the complex elliptic integral $E(k)$ for medium $|k|$

I have implemented Carlson's algorithm for $E(k)$ from Numerical computation of real or complex elliptic integrals (available from ArXiv eprint, see also DLMF). It is essentially his formula (46) ...
• 276
473 views

### 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 ...
• 649
1k views

### I am searching for a C++ code implementing the complex polygamma function

I googled about some code on the complex polygamma function especially C++ code, but can't find anything. Does anyone know where to find such code? The complex digamma function does exist but not the ...
8k views

### Python Vectorizing a Function Returning an Array

I have the following function that has been vectorized so that for every element in input array t, an array is output: ...
• 33
158 views

### How do I develop numerical routines for the evaluation of my own special functions?

This question was previously posted to Math.SE here and had received no answers at the time of this posting. When performing computational work, I often come across a univariate function, defined in ...
• 223
460 views

• 1,629
23 views

• 1,629
440 views

### Appell function implementation in C++?

Is there a C++/C implementation of the Appell series? GSL and Boost do not seem to have this function.
• 1,629