# Questions tagged [special-functions]

Questions on the special mathematical functions implemented in Mathematica.

212 questions
Filter by
Sorted by
Tagged with
12k views

### About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
4k views

### Numerical underflow for a scaled error function

I calculate a scaled error function defined as f[x_] := Erfc[x]*Exp[x^2] but it can not calculate f[30000.]. ...
1k views

### Why does Expand not work within a function?

I'm writing this fairly simple function: ...
13k views

### What is the difference between a few simplification techniques?

I am trying to understand the difference between Refine, Simplify and FullSimplify, and when ...
559 views

### Possible bug in hypergeometric function AppellF1

In the context of sums over Legendre polynomials ((1), (2)) I stumbled upon the interesting hypergeometric function AppellF1[]. Unfortunately, the implementation ...
465 views

### Integrating a real function I get a complex value, while after variable transformation the result is real. Bug?

I have the following integral: Integrate[1/Sqrt[0.7 + 0.3*(1 + z)^3], {z, 0, ∞}, Assumptions -> z ∈ Reals] >> -3.36354 - 3.85013 I The output is complex, ...
540 views

### When does the real part of Zeta vanish on the critical line?

This seems to be a quite a simple problem but I cannot make it work. I am trying to find all values within a given range for which the real part of the Zeta ...
2k views

### Incorrect results for elementary integrals when using Integrate

There is a rather simple integral ($K_0$ is the 0-th order MacDonald function) $$\int_0^\infty e^{-x \cosh\xi}\, d\xi = K_0(x)$$ which mathematica cannot solve. This even though the documentation ...
742 views

### Is MathieuC for moderately large imaginary arguments broken?

Bug introduced in 3.0 and persisting through 12.0 (reported as CASE:3208982) I'm trying to plot MathieuC[-3,0.3,I x] for $x\in[0,10]$, and here's what I get even ...
2k views

### Checking if the roots of a function are real

I'm trying to determine if the roots of a function are real. How would you do that? (In particular I'm interested in verifying that the roots of LegendreP[6, x] ...
7k views

### Plotting a Bifurcation diagram

I have the following system equation v'(t)=2*G*J1[v(t-τ)]cos(w*τ)-v(t) How do you plot the bifurcation diagram, τ in the x ...
502 views

### Precompiling a Whittaker function

Is there a way to speed up the evaluation of special functions in Mathematica? I am particularly interested in the Whittaker W function. For instance, the following piece of code: ...
605 views

296 views

### Optimization of ODE with respect to the initial condition

One has a (system) of ODEs with a one-parameter family of initial conditions. For example, ...
4k views

### Visualizing vector spherical harmonics

I have painstakingly derived the vector-spherical harmonics $\mathbf{V}_{J,\,M}^\ell(\theta, \phi)$, which are the generalization of ordinary spherical harmonics $Y_\ell^m(\theta, \phi)$ to vector ...
1k views

### How to improve performance of BesselJ to the level of GSL?

Consider the following code: zs = N /@ Range[0, 12, 10^-5]; AbsoluteTiming[bessels = BesselJ[1, #] & /@ zs;] Length @ zs I've tried to measure only ...
888 views

### What kind of hypergeometric function is it?

I found a formula for an integral of a product of three Bessel functions at The Wolfram Functions Site: I cannot understand what kind of hypergeometric function it is. The Mathematica code given for ...
626 views

### Mathematica implementation of Zeilberger's algorithm (previously done in Maple)

I have this Mathematica code: ...
2k views

### Solve stiff system by shooting method

I'm trying to solve a second order differential equation with the shooting method but, it appears to be a stiff system. This is worst for a larger parameter $\mu$. I've tried different methods: ...
1k views

### Replacing gamma at half integers by double factorial

It is well-known that for any positive integer $n$ the equality $\Gamma(n+\frac12)=\sqrt\pi\,(2n-1)!!/2^n$ holds, where $!!$ stands for the double factorial. I am using ...
370 views

### Fine tuning compiled code that computes dilogarithm function

As an exercise in writing a good Compile function, I want to do the simple task of coding a routine that outputs the real part of the dilogarithm function ...
569 views

### Terrible accuracy of DawsonF

DawsonF[30.] returns 0. The correct value is 0.016676... At least it prints a warning message, ...
466 views

905 views

### Hypergeometric function with a matrix argument

I am looking for the evaluation of a Hypergeometric function with a matrix argument as for example in Koev and Edelman or as showcased in this Wikipedia article. From what I understand from ...
3k views

775 views

### How to simplify an expression with special functions to zero

The following is a well-known Bessel function identity: $$J_{-n}(z)=(-1)^n J_n(z),\qquad n\in\mathbb Z$$ To check this, I used the following code and the result is as what I expected. ...
759 views

### Analytical approximation of indefinite integral on a given interval to a given precision

I'm looking for an analytical approximation of $\int_a^b e^{-x^2}\mathrm{erf}(x+c) dx$ that would be accurate to precision $\varepsilon$ for $a,b,c$ within a certain range. How do I ask Mathematica ...
1k views

### Implementing a compilable Faddeeva function of complex argument

For those, who are looking at Halirutan's answer and thinking "gee, I wish I was that good at LibraryLink, then I could really speed up my code!" I leave here the ...
1k views

### Compiling the VoigtDistribution PDF

According to List of compilable functions, Erf and Erfc are compilable functions. However, I want to make a compiled version ...
4k views

### problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
399 views

### Taylor expansion of a function containing QPochhammer[q, q, n]

I want to get the following series expansion: Series[QPochhammer[q, q, 3], {q, 0,4}] but in Mathematica 11.0, I obtain the following gibberish: There weren't ...
998 views