Working with Special Functions

automatic evaluationexact results for specific arguments
N[expr,n]numerical approximations to any precision
D[expr,x]exact results for derivatives
N[D[expr,x]]numerical approximations to derivatives
Series[expr,{x,x0,n}]series expansions
Integrate[expr,x]exact results for integrals
NIntegrate[expr,x]numerical approximations to integrals
FindRoot[expr==0,{x,x0}]numerical approximations to roots

Some common operations on special functions.

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

The Wolfram System automatically writes this in terms of standard mathematical constants.
In[1]:=
Click for copyable input
Out[1]=
Here again the Wolfram System reduces a special case of the Airy function to an expression involving gamma functions.
In[2]:=
Click for copyable input
Out[2]=

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

There is no exact result known here.
In[3]:=
Click for copyable input
Out[3]=
This gives a numerical approximation to 40 digits of precision.
In[4]:=
Click for copyable input
Out[4]=
The result here is a huge complex number, but the Wolfram System can still find it.
In[5]:=
Click for copyable input
Out[5]=

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]:=
Click for copyable input
Out[6]=
This evaluates the derivative of the gamma function at the point 3.
In[7]:=
Click for copyable input
Out[7]=
There is no exact formula for this derivative of the zeta function.
In[8]:=
Click for copyable input
Out[8]=
Applying N gives a numerical approximation.
In[9]:=
Click for copyable input
Out[9]=

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

Here is a series expansion for a Fresnel function.
In[10]:=
Click for copyable input
Out[10]=
The Wolfram System knows how to do a vast range of integrals involving special functions.
In[11]:=
Click for copyable input
Out[11]=

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.

FullSimplify[expr]try to simplify expr using a range of transformation rules

Simplifying expressions involving special functions.

This uses the reflection formula for the gamma function.
In[12]:=
Click for copyable input
Out[12]=
This makes use of a representation for Chebyshev polynomials.
In[13]:=
Click for copyable input
Out[13]=
The Airy functions are related to Bessel functions.
In[14]:=
Click for copyable input
Out[14]=
FunctionExpand[expr]try to expand out special functions

Manipulating expressions involving special functions.

This expands the Gauss hypergeometric function into simpler functions.
In[15]:=
Click for copyable input
Out[15]=
Here is an example involving Bessel functions.
In[16]:=
Click for copyable input
Out[16]=
In this case the final result does not even involve PolyGamma.
In[17]:=
Click for copyable input
Out[17]=
This finds an expression for a derivative of the Hurwitz zeta function.
In[18]:=
Click for copyable input
Out[18]=