Working with Special Functions

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:

PolyLog[2,1/2]

Here again the Wolfram System reduces a special case of the Airy function to an expression involving gamma functions:

AiryAi[0]

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 parameters—real and complex—for which the special functions are defined.

There is no exact result known here:

AiryAi[1]

This gives a numerical approximation to 40 digits of precision:

N[AiryAi[1],40]

The result here is a huge complex number, but the Wolfram System can still find it:

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 (RefLink[N, paclet:ref/N]) to find numerical approximations to derivatives.

This derivative comes out in terms of elementary functions:

D[FresnelS[x],x]

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

Gamma'[3]

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

Zeta'[Pi]

Applying (RefLink[N, paclet:ref/N]) gives a numerical approximation:

N[%]

The Wolfram System 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 the Wolfram System.

Here is a series expansion for a Fresnel function:

Series[FresnelS[x],{x,0,15}]

The Wolfram System knows how to do a vast range of integrals involving special functions:

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:

FullSimplify[Gamma[x] Gamma[1-x]]

This makes use of a representation for Chebyshev polynomials:

FullSimplify[ChebyshevT[n,z]-k Cos[n ArcCos[z]]]

The Airy functions are related to Bessel functions:

FullSimplify[3 AiryAi[1]+Sqrt[3] AiryBi[1]]

Manipulating expressions involving special functions.

This expands the Gauss hypergeometric function into simpler functions:

FunctionExpand[Hypergeometric2F1[1/2,3/2,3,x]]

Here is an example involving Bessel functions:

FunctionExpand[BesselY[n,I x]]

In this case the final result does not even involve (RefLink[PolyGamma, paclet:ref/PolyGamma]):

FunctionExpand[Im[PolyGamma[0,3 I]]]

This finds an expression for a derivative of the Hurwitz zeta function:

FunctionExpand[Derivative[1,0][Zeta][-1,4]]