To Special Function - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Conversions : To Special Function

convert/to_special_function

convert to a function or function class

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

convert(expr, SF, opt_1, opt_2, ...)

Parameters

expr

-

expression

SF

-

name of a mathematical function or function class

opt_i

-

(optional) arguments; they can be given in any order and are described as follows

{x, y, ...}

-

set or list of names; only functions depending on the set or list of names are converted

evaluate

-

optional, default is false, to evaluate the resulting functions

only = F

-

convert only the function(s) F, where F is a function name, a list or set of them, or a function class name

exclude = F

-

do not convert the function(s) F, where F is as in only = ...

include = F

-

convert the function(s) F even if that is not the default behavior

include = powers

-

when converting to hypergeom, MeijerG, or Sum, also convert powers

include = radicals

-

when converting to hypergeom, MeijerG, or Sum, also convert fractional powers (not other powers)

include = all

-

when converting to hypergeom, MeijerG, also convert all powers and elementary functions

skip = ...

-

the right-hand side could be the keyword Global or Local, to skip any of the Global or Local conversion steps

simplifier = S

-

use S instead of the internal default simplifier when performing conversions

simplifier = NONE

-

use no simplifier, thus speeding up processing when performing conversions

rule

-

one or a sequence of keywords indicating conversion rules to be applied additionally, after the main conversion has been performed

Description

• 

A flexible conversion facility in the mathematical language is as important as a dictionary in spoken languages. This page describes such a tool, implemented as a net of conversion routines permitting the expression of any mathematical function in terms of another one, whenever that is possible as a finite sum of terms with rational coefficients. When converting to special functions these coefficients may also involve elementary functions. When the parameters of the functions being converted depend on symbols in a rational manner, any assumptions on these symbols made by the user are taken into account at the time of performing the conversions (see assuming).

• 

The first argument given to convert, expr, is the object being converted. expr can be any Maple mathematical object, such as an expression, equation, a list or set of them.

• 

The second argument, SF, is the name of a mathematical function or that of a function class. The conversion routines attempt to express expr in terms of SF.

• 

The rewriting of expr in terms of SF is performed in two sequential steps, by attempting first a Global and then a Local conversion. A Global conversion is one where the expr to be converted is treated as a whole. Global conversions are implemented for only few target SF functions and typically result in simpler output expressions. A Local conversion is one where only the mathematical functions found in expr are rewritten in terms of SF. Local conversions are implemented for most Maple mathematical functions (see table below).

• 

Two given functions - say, F and G - could in principle be expressed in terms of each other if they belong to the same function class. That condition, however, is in many cases not sufficient: F may be more general than G, or simply the conversion may only be possible for some particular values of the function parameters.

• 

Some mathematical functions automatically evaluate to other functions. So, to perform the conversion to one of these functions, say F, it is sometimes necessary to delay the evaluation of F; see the Examples section.

• 

The functions to which you can convert - the second argument could be one of these - are:

AiryAi

AiryBi

AppellF1

AppellF2

AppellF3

AppellF4

arccos

arccosh

arccot

arccoth

arccsc

arccsch

arcsec

arcsech

arcsin

arcsinh

arctan

arctanh

BellB

BesselI

BesselJ

BesselK

BesselY

ChebyshevT

ChebyshevU

cos

cosh

cot

coth

CoulombF

csc

csch

CylinderD

CylinderU

CylinderV

dilog

Ei

EllipticE

EllipticK

erf

exp

GAMMA

GegenbauerC

HankelH1

HankelH2

HermiteH

HeunB

HeunC

HeunD

HeunG

HeunT

hypergeom

JacobiP

KummerM

KummerU

LaguerreL

LambertW

LegendreP

LegendreQ

ln

MeijerG

polylog

Psi

sec

sech

sin

sinh

SphericalY

tan

tanh

WhittakerM

WhittakerW

Wrightomega

 

 

 

• 

When a function class name is given as second argument the routines attempt to express expr using any of the functions of that class. The function classes understood by convert are:

`0F1`

`1F1`

`2F1`

Airy

arctrig

arctrigh

Bessel_related

Chebyshev

Cylinder

Ei_related

elementary

Elliptic_related

erf_related

GAMMA_related

Hankel

Heun

Kelvin

Kummer

Legendre

trig

trigh

Whittaker

 

 

  

* (note spaces between words are filled with _ )

• 

Despite the large number of function classes, most of the functions of mathematical physics belong to one of the three hypergeometric classes: 2F1, 1F1, and 0F1 where these three classes also include as particular cases all the elementary functions (trig, hyperbolic trig, their arcs, exp, and ln).

  

That gives a superficial but straightforward and usually sufficient idea of how the mathematical functions are / could be related between themselves. This division into three sets also tells about the possible elementary form of the special functions of each of the classes 2F1, 1F1, and 0F1: since functions of each class can be transformed between themselves, and each of these three classes contain both special and elementary functions, the elementary form of the special functions of each class can only be obtained using the elementary functions belonging to the same class. For instance, 0F1 includes all the Bessel related and trigonometric functions, from where, for particular values of the parameters entering the Bessel functions, they can be expressed as sin or cos. In the same line, the 2F1 functions include the Legendre and arctrig ones, from where, for particular values of the parameters in the Legendre functions they admit an arctrig form.

The Optional Arguments

  

Optional arguments that can be used to restrict the conversion in different manners are as follows.

  

 

• 

{x,y,...}

  

By default, convert attempts to convert all the mathematical functions found in the given expr (the first argument). To convert only the functions having certain dependency (for example, depending on some variables x, y,...), pass these objects enclosed in a set, for instance as in {x,y,...}.

  

 

• 

only = F

  

You can convert only some specific functions among those found in expr, regardless of their arguments. For that purpose use the option only=F, where F is the name of a function, or a set or list of them, or the name of a function class as a shortcut representing all the functions of that class. For information on which functions are associated to each classes, click the hyperlinks in the table above.

  

 

• 

exclude = F

  

To selectively exclude some functions from the conversion process, use the exclude=F optional argument, where F is as in only=F explained above.

  

 

• 

include = F

  

When converting to a special function - say SF - depending on what SF is, some conversions possible in principle are nevertheless not performed by default. For example, all elementary functions are particular cases of the hypergeometric or MeijerG functions but their conversion is by default avoided. This is because the conversion formulas introducing these rather general functions typically involve elementary functions in the coefficients and to express all of them using hypergeom or MeijerG would frequently clutter the output in an undesired way. This default behavior is automatically overridden when using the only = F option and also when passing the extra argument include = F, where F is a function name, or a list or set of them, or a function class name.

  

 

• 

include = powers

  

In the same line, powers - with fractional exponent or not - can always be expressed as hypergeom or MeijerG, and thus as a Sum but that should be explicitly requested using the optional argument include = powers (all powers will be converted) or include = radicals (only fractional powers will be converted).

  

 

• 

include = all

  

When converting to hypergeom or MeijerG, use this optional argument to have all elementary functions and powers also converted.

  

 

• 

skip=Global or skip=Local

  

To skip any of the Global or Local conversion steps, use skip = Global or skip = Local.

  

 

• 

simplifier=S

  

By default some normalization and combination of powers and Gamma functions are performed before returning a result. Although these simplifications are soft and convenient in most cases, in other cases you may prefer that they not be performed or you may want to perform a different simplification instead of the default one. For these purposes use the optional argument simplifier=NONE (thus, speeding up processing) or simplifier=S, where S could be anything - from a simplification procedure of your choice to just an unassigned name.

  

 

• 

rule

  

When a conversion to a special function - say, SF - is successful, the functions SF appearing in the returned expression are expressed in the way the routines achieved them first. However, most of these functions can be re-expressed in terms of themselves using identities or contiguity rules. For example,

HermiteH(a,z);

HermiteHa,z

(1)

(1) = convert((1), HermiteH, "raise a");

HermiteHa,z=zHermiteHa+1,zHermiteHa+2,z2a+1

(2)
  

To handle this situation conveniently, the conversion routines accept an optional extra argument indicating a rule; it could be one rule or a sequence of them, to be applied after the conversion has been performed. The rules known by the system are:

"raise a",

"lower a",

"normalize a",

"raise b",

"lower b",

"normalize b",

"raise c",

"lower c",

"normalize c",

"mix a and b",

"1F1 to 0F1",

"0F1 to 1F1"

"quadratic 1",

"quadratic 2",

"quadratic 3"

"quadratic 4",

"quadratic 5",

"quadratic 6"

"2a2b",

"raise 1/2",

"lower 1/2"

Examples

Conversion routines may be of use in many different frameworks, for instance when studying the mathematical functions, when simplifying expressions - for example, to detect zeros - or to express some results in terms of the functions of certain class, or just to express non usual functions in terms of simpler and more familiar ones. The following examples then do not match any particular framework but illustrate how the conversion routines work.

When the parameters of a special function are so that it admits a trigonometric form, an exponential representation is also possible.

WhittakerM0,12,z

WhittakerM0,12,z

(3)

=convert,exp

WhittakerM0,12,z=ⅇz21ⅇz2

(4)

When converting to the two more general functions hypergeom and MeijerG, by default elementary functions are not converted

convert,MeijerG

zMeijerG0,,0,−1,zⅇz2=ⅇz21ⅇz2

(5)

This default behavior can be overridden using the appropriate optional arguments. For example, to convert the expression above to hypergeom including the exponential, (for simplicity) first take the numerator in both sides of the equation:

mapnumer,

zMeijerG0,,0,−1,z=ⅇz221

(6)

convert,hypergeom,include=exp

zhypergeom1,2,z=hypergeom,,z221

(7)

The above is in fact an identity for hypergeometric functions; lhs - rhs is zero.

simplifylhsrhs

0

(8)

Generally, most of the special functions of mathematical physics are particular cases of the hypergeometric 2F1, 1F1, and 0F1 functions, where the p in pFq indicates the number of parameters in the first list of hypergeom([...],[...],z) and q represents the number of parameters of the second list. This fact naturally splits the set of functions into three subsets or classes, such that conversions are possible among functions belonging to the same class. For example, starting with a function of the 2F1 class you can typically represent it using other 2F1 type of functions:

JacobiP12,0,1,z

JacobiP12,0,−1,z

(9)

convert,EllipticE

2EllipticE2z+22π

(10)

convert,LegendreP

1+zLegendreP12,z+LegendreP12,3z1+z211+z4

(11)

convert,GegenbauerC

1+zGegenbauerC12,12,z+GegenbauerC12,12,3z1+z211+z4

(12)

convert,hypergeom

1+zhypergeom12,12,1,12z2+hypergeom12,32,1,z11+z211+z4

(13)

In the 2F1 class there are the LegendreP, LegendreQ ChebyshevT, GegenbauerC, JacobiP, and all the arctrig functions.

The convert routines also allow converting to a function class making possible to achieve more non-obvious cancellations. In this example, arctrig represents any of the arc trigonometric functions.

12LegendreP12,12,1+4z2z24z2z21421+z2141+zarcsin1+zπ12

LegendreP12,12,2z2+4z12z2+4z14z122z1214arcsinz1π

(14)

convert,arctrig

0

(15)

The relation between LegendreP and arcsin becomes more visible by representing both in terms of the more general hypergeometric function.

convert,hypergeom,include=elementary

0

(16)

In the 1F1 class, that is, as particular cases of hypergeom([a],[b],z), you have mainly the Kummer, Whittaker, Cylinder, Laguerre, HermiteH, Ei, erf, and the incomplete Gamma functions, the latter represented in Maple by GAMMA with two arguments.

erfz

erfz

(17)

convert,HermiteH

2HermiteH−1,zπⅇz2+1

(18)

convert,KummerU

2zKummerU1,32,z22πⅇz2zz22z2πⅇz2+1

(19)

evalanormalconvert,WhittakerW

z214πⅇz2WhittakerW14,14,z2ⅇz22z214ⅇz2zπ

(20)

convert,hypergeom

z214πⅇz2z214πhypergeom,,z2+2z234hypergeom1,32,z2z214ⅇz2zπ

(21)

simplify

erfz

(22)

The 0F1 class, includes the Bessel, Hankel, Airy, Kelvin, and trigonometric functions; that is, all of them are particular cases of hypergeom([],[a],z) for some a. For example,

AiAiryAiz

AiAiryAiz

(23)

Ai=convertAi,BesselJ

AiryAiz=z3213BesselJ13,2z3233zBesselJ13,2z3233z3213

(24)

For Re(z) < 0 a simpler formula is valid

Ai=convertAi&comma;BesselJassumingz<0

AiryAiz=zBesselJ13&comma;2z323+BesselJ13&comma;2z3233

(25)

For Re(z) > 0 a representation in terms of BesselK is given by

Ai=convertAi&comma;BesselKassuming0<z

AiryAiz=3zBesselK13&comma;2z3233π

(26)

One of the properties of the 0F1 functions is that they can always be expressed in terms of the more general 1F1 functions (the opposite is not always true). Hence, all the Bessel, Airy, Hankel, and Kelvin functions - so called Bessel related - can be expressed in terms of Kummer, Whittaker, or other 1F1 functions.

Ai=convertAi&comma;KummerUassuming0<z

AiryAiz=316z413z3213KummerU56&comma;53&comma;4z3233π&ExponentialE;2z323

(27)

Ai=convertAi&comma;WhittakerWassuming0<z

AiryAiz=zWhittakerW0&comma;13&comma;4z3232πz32

(28)

Most special functions satisfy identities relating contiguous values of their parameters. These identities can also be computed as "conversions", for instance,

HermiteHa&comma;z

HermiteHa&comma;z

(29)

=convert&comma;HermiteH&comma;raise a

HermiteHa&comma;z=zHermiteHa+1&comma;zHermiteHa+2&comma;z2a+1

(30)

Many "rule conversions" can be requested at once and performed in a specified order; for instance, consider the following expression:

ee18KummerU32&comma;12&comma;z218KummerU1&comma;32&comma;z2sqrtz214KummerU1&comma;32&comma;z2z2sqrtz2+14sqrtz2

eeKummerU32&comma;12&comma;z28KummerU1&comma;32&comma;z2z28KummerU1&comma;32&comma;z2z2z24+z24

(31)

By converting it to 'KummerU' and applying rules for normalizing the first and second indices, here respectively called a and b, and then mixing them, you obtain varied representations for the same expression.

convertee&comma;KummerU&comma;normalize a&comma;normalize b&comma;mix a and b

z2KummerU2&comma;32&comma;z28KummerU12&comma;12&comma;z28KummerU12&comma;12&comma;z2z24+z24

(32)

factorconvert&comma;KummerU&comma;normalize a&comma;normalize b&comma;mix a and b

2z2+1KummerU1&comma;32&comma;z2z2KummerU12&comma;12&comma;z28

(33)

A further manipulation actually shows the expression is equal to zero.

convert&comma;KummerU&comma;normalize a&comma;normalize b&comma;mix a and b

0

(34)

Rules for manipulating 2F1 hypergeometric functions are available as follows. Consider, for instance:

H1hypergeoma&comma;b&comma;c&comma;z

H1hypergeoma&comma;b&comma;c&comma;z

(35)

eeH1=convertH1&comma;hypergeom&comma;raise a

eehypergeoma&comma;b&comma;c&comma;z=z+2a+b1zc+2hypergeomb&comma;a+1&comma;c&comma;z+hypergeomb&comma;a+2&comma;c&comma;zz1a+1c+a+1

(36)

simplifylhsrhsee

0

(37)

Lowering by one the third parameter in all hypergeometric 2F1 functions entering the right-hand side of ee:

lhsee=collectconvertrhsee&comma;hypergeom&comma;lower c&comma;hypergeom&comma;normal

hypergeoma&comma;b&comma;c&comma;z=zabz2a+c+z2c1c2z1hypergeomb&comma;a+1&comma;c2&comma;zc+1+ba+2czc+a+1+zabz2a+c+z2c1za+bz2zc+c+4z2hypergeomb&comma;a+1&comma;c1&comma;zc+1+ba+2czc+a+1c1c2z12a+1hypergeomb&comma;a+2&comma;c2&comma;zc+1+bc+3+azc+a+1c1za+bz2zc+c+5z2z1a+1hypergeomb&comma;a+2&comma;c1&comma;zc+1+bc+3+azc+a+1

(38)

simplifylhsrhs

0

(39)

In all cases conversions can be performed with restrictions. Consider for instance

Gcoszsinx

Gcoszsinx

(40)

convertG&comma;exp

&ExponentialE;z&ExponentialE;Ix&ExponentialE;−Ix22+&ExponentialE;z&ExponentialE;Ix&ExponentialE;−Ix22

(41)

convertG&comma;exp&comma;exclude=sin

&ExponentialE;Izsinx2+&ExponentialE;−Izsinx2

(42)

convertG&comma;exp&comma;only=sin

coshz&ExponentialE;Ix&ExponentialE;−Ix2

(43)

The following only converts functions having z

convertG&comma;exp&comma;z

&ExponentialE;Izsinx2+&ExponentialE;−Izsinx2

(44)

Because some functions automatically evaluate to other functions, in order to perform the conversion to a given function, say F, the network of routines sometimes need to delay the evaluation of F.

convertsinx&comma;sinh

−IsinhIx

(45)

To fully evaluate this result after the conversion has been performed, use eval.

eval

sinx

(46)

References

  

Cheb-Terrab, E.S. "The function advisor project: A Computer Algebra Handbook of Special Functions", Proceedings of the Maple Summer Workshop, University of Waterloo, Ontario, Canada, 2002.

See Also

convert

FunctionAdvisor

MathematicalFunctions