Questions tagged [special-functions]

Questions on the special mathematical functions implemented in Mathematica.

Filter by
Sorted by
Tagged with
46
votes
9answers
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 ...
19
votes
5answers
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.]. ...
7
votes
2answers
1k views

Why does Expand not work within a function?

I'm writing this fairly simple function: ...
63
votes
2answers
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 ...
8
votes
1answer
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 ...
6
votes
3answers
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, ...
5
votes
2answers
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 ...
20
votes
2answers
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 ...
33
votes
1answer
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 ...
10
votes
3answers
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] ...
10
votes
4answers
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 ...
6
votes
1answer
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: ...
16
votes
2answers
605 views

How can I get the solutions of $x^n-x-t=0$ in hypergeometric form?

$x^3-x-t=0$ has three roots that can be expressed in hypergeometric form, for example $$x_1=-1-\frac{t}{2}{_2F_1\left(\frac{1}{3},\frac{2}{3};\frac{3}{2};\frac{27t^2}{4} \right)}+\frac{3t^2}{8} {...
10
votes
3answers
707 views

is it possible to change/customize some conversions done by TeXForm?

I use TeXForm to convert output of some computation to Latex. I'd like to ask if there is a way to override/change/customize some of these conversions, related to just the name Mathematica assigns to ...
10
votes
3answers
722 views

Labeling solutions of an Eigenvalue equation involving Bessel functions

I'm solving the Schrödinger equation for a particle in an annular geometry with hard wall boundary conditions and I've reduced it to the following equation: $$J_m(k\,R_1)\,Y_m(k\,R_2) - J_m(k\,R_2)\,...
2
votes
3answers
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, ...
32
votes
2answers
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 ...
28
votes
3answers
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 ...
17
votes
2answers
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 ...
10
votes
1answer
626 views

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

I have this Mathematica code: ...
6
votes
2answers
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: ...
4
votes
2answers
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 ...
11
votes
1answer
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 ...
14
votes
4answers
569 views

Terrible accuracy of DawsonF

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

Problem solving Third order non-linear differential equation in Mathematica

I am trying to find an analytical solution of the following 3rd order non-linear differential equation in Mathematica: $a (f'(x))^2+f'''(x)=0$ with boundary conditions $f(0)=0$, $f'(0)=0$, $f(1)=1$, $...
4
votes
4answers
479 views

Evaluate the defining Integral of the Bessel functions of the first kind

I am trying to evaluate the integrals $$ \int\limits_{-\pi}^{\pi} \mathrm{e}^{\mathrm{i}(x\sin t - nt)} \mathrm{d}t $$ and $$ \int\limits_{-\pi}^{\pi} \mathrm{e}^{\mathrm{i}x\sin t} \mathrm{d}t $$ ...
1
vote
3answers
732 views

Find all roots of a function with parabolic cylinder functions in a range of the variable

I want to find all roots of a function involving Parabolic Cylinder Functions. In what follows, I define 2 variables $\xi1$ and $\xi2$, which in turn depend on $\omega$. My function is then defined as ...
2
votes
3answers
275 views

Why do these two different zetas produce the same value? [closed]

Zeta[-13] == Zeta[-1] == -1/12 Why do these two different zetas produce the same value?
12
votes
2answers
207 views

Why NIntegrate is badly-behaved on $J_{\frac{9}{2}}(x)$ by default?

A friend of mine showed me this example: Plot[BesselJ[9/2, x], {x, 0, 1}, PlotLabel -> Style["The integrand seems to be simple", 14]] ...
4
votes
2answers
786 views

Roots of Whittaker W function

I am interested in finding the roots $u$ of the equation $$ W_{1,\imath b}(a)=0, $$ where $W_{\kappa,\mu}(z)$ denotes the Whittaker $W$ function, $a>0$ is a fixed parameter, $\imath=\sqrt{-1}$ and $...
3
votes
4answers
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 ...
27
votes
3answers
3k views

Eisenstein Series in Mathematica?

Mathematica doesn't seem to have built-in tools to deal with the Eisenstein series: $$\begin{align*} E_{2}(\tau)&= 1-24 \sum_{n=1}^{\infty} \frac{n e^{2 \pi i n \tau}}{1-e^{2 \pi i n \tau}}\\ E_{...
37
votes
4answers
1k views

Is there a Mathematica API for the functions.wolfram site?

Is there a Mathematica API for the functions.wolfram site? If there's not, has anyone implemented a web scraper for it? For example it would be nice to be able to access http://functions.wolfram.com/...
15
votes
2answers
4k views

Solve an integral equation numerically

I am trying to find a numerical solution for an equation of the form: $$ f(t) = \int_{t_{min}}^{t} \mathrm{d}t' {\exp[2 (t^\prime - t)] E(t^\prime) f(t^\prime)} + \int_{t}^{0}{\mathrm{d}t' \exp(t^\...
10
votes
2answers
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. ...
8
votes
2answers
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 ...
14
votes
4answers
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 ...
14
votes
2answers
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 ...
11
votes
2answers
4k views

problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
8
votes
2answers
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 ...
7
votes
2answers
998 views

Approximation to the prime counting function

Is there a function similar to PrimePi that gives approximate value for large numbers? In particular, I need a reasonably good approximation for $\pi(x)$, where $x\...
3
votes
1answer
1k views

FindRoot giving false roots with Bessel Functions [duplicate]

I have read in some places about the errors associated with FindRoot, but the closest thing I can find on this website seems to be due to the imaginary unit. I am dealing with what should be a ...
2
votes
2answers
610 views

Solving Inequalities with Gamma Function

I am wondering why Mathematica outputs that the following system "cannot be solved with the methods available to Reduce". $\frac{\Gamma(\frac{1}{2}+n)}{n-1}<\frac{\Gamma(\frac{1}{2}+k)}{k-1}$ ...
0
votes
3answers
208 views

Solving equations involving integrals

I need to find the value of $z$ for a particular value of $D_c$ (eg. $500$), but $z$ is inside an integral, and I'm not able to use Solve since the integral is ...
19
votes
1answer
4k views

Creating a Mathieu stability diagram

I am attempting to re-create a Mathieu stability diagram like the one shown in a paper by Leary and Schmidt [1]: I expected that I could use MathieuC to generate ...
8
votes
4answers
3k views

Visualizing the Riemann zeta function

How to visualize in a nice geometric way (e.g., like in this YT video) the Riemann zeta function, $\zeta (z)$?
18
votes
1answer
1k views

How to represent a continuous monotonic phase of Airy functions?

Note: In this question I am concerned only with real-valued variables and functions. DLMF, §9.8 Airy Functions, Modulus and Phase, formula $9.8.4$ defines the phase of Airy functions: $$\theta(x)=\...
11
votes
2answers
606 views

Number of divisors visualized with the QPochhammer function, how to improve performance of code?

I have this code that is originally Jeffrey Stopple's code for the Riemann zeta function in the complex plane. Because I discovered yesterday that the number of divisors can be generated with the $q$-...
11
votes
1answer
837 views

Expanding derivatives of hypergeometric functions

Sometimes Mathematica expresses results of integration or summation in terms of symbolic derivatives of Hypergeometric2F1 function, and cannot further simplify ...
7
votes
6answers
7k views

Series expansion in terms of Hermite polynomials

I am trying to expand a polynomial in terms of orthogonal polynomials (in my case, Hermite). Maple has a nice built-in function for this, ChangeBasis. Is there a ...

1
2 3 4 5