The tag has no usage guidance.

learn more… | top users | synonyms

7
votes
1answer
51 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) ...
3
votes
2answers
120 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 ...
3
votes
2answers
81 views

I am searching for c++ code of 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 ...
2
votes
1answer
121 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: ...
4
votes
1answer
115 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 ...
2
votes
1answer
58 views

overflow upper incomplete gamma function

I want to calculate the following equation: $$\frac{\theta \Gamma \left(k+1,\frac{o}{\theta }\right)-o \Gamma \left(k,\frac{o}{\theta }\right)}{\Gamma (k)}+o+s$$ with $s>0, o>0, k>0, ...
1
vote
1answer
118 views

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 ...
6
votes
1answer
106 views

Using Log Gamma function to avoid overflow

I have to do some numerical calculus using gamma functions. I am using the tgamma incluided in the C++ cmath library. The ...
7
votes
3answers
391 views

What is the fastest opensource implementation of Bessel functions computation?

I'm looking for an open-source (to use and learn from) software which computes Bessel functions of integer order of real argument to double precision the fastest among all such implementations. ...
7
votes
1answer
281 views

Newton iteration for cube root without division

It's a fairly well known trick to avoid division in calculating square-roots to apply Newton's method to finding $1/\sqrt{x}$, and probably better known, using Newton's method to find reciprocals ...
3
votes
2answers
165 views

Bessel EVP and fzero

I am trying to solve the Eigenvalue problem $$ x^2 y''+ x y' + x^2 y = \lambda^2 y\,,\quad x\in(0,1)\,,\quad y(0)=0\,,\quad y'(1)=y(1) $$ The differential equation is the Bessel equation. The solution ...
2
votes
0answers
52 views

Accurate computation of $\frac{\mathrm{B}_{x,y}(\alpha + 1,\beta)}{\mathrm{B}_{x,y}(\alpha,\beta)}$ for large paramers?

I need to calculate these ratios: $$\frac{\mathrm{B}_{x,y}(\alpha + 1,\beta)}{\mathrm{B}_{x,y}(\alpha,\beta)} \tag{1}$$ where $\alpha,\beta > 0$ and $0\le x\le y \le 1$. Here ...
0
votes
0answers
21 views

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

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 positive numbers, with $0 < a,b,c$ and $0 < x ...
3
votes
1answer
134 views

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 ...
2
votes
1answer
185 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.
5
votes
2answers
178 views

Second derivative of the Associated Legendre functions

I would like to compute, as part of the solution of the Laplace equation using the Fast Multipole Method, the second derivative of the associated legendre functions of the first kind . Specifically, I ...
3
votes
1answer
93 views

Efficient computation of tangent of fraction of angle

I want to compute $a = \tan(f \theta)$ for $f\in [0,1]$, given $g = \tan\theta$. Obviously, I can compute $a = \tan(f\tan^{-1}g)$, but I'm wondering if there's a more efficient way that avoids having ...
4
votes
2answers
1k views

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 ...
6
votes
5answers
255 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 ...
14
votes
1answer
249 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 ...
22
votes
4answers
5k 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} ...
9
votes
2answers
134 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 ...
12
votes
2answers
552 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) = ...
7
votes
3answers
382 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
2answers
102 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 ...
10
votes
2answers
496 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 ...
8
votes
4answers
1k 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}, ...
4
votes
1answer
382 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 ...
9
votes
1answer
148 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 ...