# Questions tagged [special-functions]

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

63 questions
Filter by
Sorted by
Tagged with
62 views

### Hyperbolic integral of the second kind

The elliptic integral of the second kind is given by $$E(t,m) = \int_{0}^t \sqrt{1-m \sin(s)^2} \operatorname{ds}$$ and there is for instance a scipy function ellipeinc that computes it. The ...
• 121
1 vote
121 views

### Calculating Hypergeometric1F1 for large arguments

Cross posted on StackOverflow I am trying to use the gsl library for calculating 1F1. I have some C code. The following works and matches Mathematica's results for ...
• 111
142 views

### Solving Transcendental equation involving special functions becoming nightmare any one can help?

Simply i want to solve for schrodinger equation for finite potential well problems in spherical coordinates. For case in which l=0 . It is simple but when l changes. The solution are spherical ...
200 views

### Numerical evaluation of Fourier transform of a scaling function

Given a set of filter taps $\{h_n\}_{n=0}^{m-1}$, define a scaling function $\phi$ by $$\phi(x) = \sqrt{2}\sum_{n} h_n \phi(2x-n).$$ In keeping with the notation from Daubechies "Ten Lectures on ...
• 2,155
319 views

### What problems does softmax() solve and when should I think of using it - in simple terms

I just for the first time saw the function softmax() in this SO answer to How do I use a minimization function in scipy with constraints and was intrigued. Another way of weighting variables where ...
• 1,048
85 views

160 views

• 21
118 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
768 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 ...
• 223
117 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: ...
• 363
329 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
131 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 ...
178 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 ...
470 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 ...
• 1,048
680 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,865
791 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
3k 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][1]. EDITED:...
• 121
252 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
368 views

250 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
338 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
118 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
578 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 ...
• 679
2k 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
168 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
503 views

• 1,729
23 views

• 1,729
505 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,729
203 views

### Radial integration of expensive function with Bessel weights

I need to calculate the integral $$I = \int_0^R f(r)J_n\left(\frac{z_{nm}r}{R}\right)rdr$$ where $J_n$ is the $n^{\mathrm{th}}$ order Bessel functions of the first kind, $z_{nm}$ is its \$m^{\mathrm{...
• 81