This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Wolfram Research, Inc.

Mathieu and Related FunctionsStatistical Distributions and Related Functions

3.2.13 Working with Special Functions

Some common operations on special functions.

Most special functions have simpler forms when given certain specific arguments. Mathematica will automatically simplify special functions in such cases.

Mathematica automatically writes this in terms of standard mathematical constants.

In[1]:= PolyLog[2, 1/2]


Here again Mathematica reduces a special case of the Airy function to an expression involving gamma functions.

In[2]:= AiryAi[0]


For most choices of arguments, no exact reductions of special functions are possible. But in such cases, Mathematica allows you to find numerical approximations to any degree of precision. The algorithms that are built into Mathematica cover essentially all values of parameters—real and complex—for which the special functions are defined.

There is no exact result known here.

In[3]:= AiryAi[1]


This gives a numerical approximation to 40 digits of precision.

In[4]:= N[AiryAi[1], 40]


The result here is a huge complex number, but Mathematica can still find it.

In[5]:= N[AiryAi[1000 I]]


Most special functions have derivatives that can be expressed in terms of elementary functions or other special functions. But even in cases where this is not so, you can still use N to find numerical approximations to derivatives.

This derivative comes out in terms of elementary functions.

In[6]:= D[FresnelS[x], x]


This evaluates the derivative of the gamma function at the point 3.

In[7]:= Gamma'[3]


There is no exact formula for this derivative of the zeta function.

In[8]:= Zeta'[Pi]


Applying N gives a numerical approximation.

In[9]:= N[%]


Mathematica incorporates a vast amount of knowledge about special functions—including essentially all the results that have been derived over the years. You access this knowledge whenever you do operations on special functions in Mathematica.

Here is a series expansion for a Fresnel function.

In[10]:= Series[FresnelS[x], {x, 0, 15}]


Mathematica knows how to do a vast range of integrals involving special functions.

In[11]:= Integrate[AiryAi[x]^2, {x, 0, Infinity}]


One feature of working with special functions is that there are a large number of relations between different functions, and these relations can often be used in simplifying expressions.

Simplifying expressions involving special functions.

This uses the reflection formula for the gamma function.

In[12]:= FullSimplify[Gamma[x] Gamma[1 - x]]


This makes use of a representation for Chebyshev polynomials.

In[13]:= FullSimplify[ChebyshevT[n, z] - k Cos[n ArcCos[z]]]


The Airy functions are related to Bessel functions.

In[14]:= FullSimplify[3 AiryAi[1] + Sqrt[3] AiryBi[1]]


Manipulating expressions involving special functions.

This expands out the PolyGamma, yielding a function with a simpler argument.

In[15]:= FunctionExpand[PolyGamma[2, 2 + x]]


Here is an example involving Bessel functions.

In[16]:= FunctionExpand[BesselY[n, I x]]


In this case the final result does not even involve PolyGamma.

In[17]:= FunctionExpand[Im[PolyGamma[0, 3 I]]]


This finds an expression for the second derivative of the zeta function at zero.

In[18]:= FunctionExpand[Zeta''[0]]


Mathieu and Related FunctionsStatistical Distributions and Related Functions