Mathematical Functions - 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 : System : Information : Updates : Maple 2015 : Mathematical Functions

Mathematical Functions

Maple provides a state-of-the-art environment for algebraic and numeric computations with mathematical functions. The requirements concerning mathematical functions, however, are not just computational: typically, you also need information on identities, alternative definitions and mathematical properties in general. For these purposes Maple provides the MathematicalFunctions package and the FunctionAdvisor command, whose main goals are to provide tools for advanced computations with mathematical functions, and to make the information that the Maple system can provide more complete at each release, providing access to each piece of information through a simple interface.

 

The FunctionAdvisor

The conversion network for mathematical functions

New commands in the MathematicalFunctions package

Numerical evaluation of the Jacobi Amplitude

The FunctionAdvisor

• 

For Maple 2015, an important amount of mathematical formulas were added to the database of the FunctionAdvisor   command.

Examples

• 

The complex components:

FunctionAdvisoridentities,argument

argz=−Ilnzz&comma;argz=−Ilnsignumz&comma;argz=arctanz&comma;z&comma;argza=argz&comma;0<a&comma;argza=argz+arga+2π12argz2πarga2π&comma;argza=argzarga+2π12argz2π+arga2π&comma;argza=aargz&comma;a::realAndπ<aargzAndaargz<π&comma;argza=arg&ExponentialE;Iaargz&comma;a::real&comma;argza=arctansinarctanz&comma;za+alnz&comma;cosarctanz&comma;za+alnz

(1.1.1)

FunctionAdvisoridentities&comma;Re

Iz=z&comma;z=z1+1&ExponentialE;2Iargz2&comma;z=z1+1signumz22&comma;z=z2+z22z&comma;z=z2+z&conjugate0;2&comma;za=az&comma;a::real&comma;za=zaaz&comma;za=za+aza2&comma;za=za&ExponentialE;argzacosargza+alnz

(1.1.2)
• 

The Jacobi elliptic functions:

FunctionAdvisoridentities&comma;JacobiAM

amz|k=arccoscnz|k&comma;0<amz|k<πAndk−1&comma;1oramz|k=0And0amz|kAndk−1&comma;1oramz|k=πAndamz|k0Andk−1&comma;1&comma;amz|k=arcsinsnz|k&comma;π2<amz|k<π2Andk::realoramz|k=π2And0amz|kAndk::realoramz|k=π2Andamz|k0Andk::real

(1.1.3)
• 

A new topic, periodicity, got added:

FunctionAdvisorperiodicity&comma;JacobiAM

am2Kkm+z|k=amz|k+πmk10m::evensignummotherwiseotherwise&comma;Andm::integer&comma;am2IKkn+z|k=−1namz|k+π0n::evensignumzsignumnotherwise&comma;Andn::integer

(1.1.4)

FunctionAdvisorperiodicity&comma;JacobiCN

cnz+2Kkr+2IKks|k=−1s+rcnz|k&comma;r::integerAnds::integer

(1.1.5)

FunctionAdvisoridentities&comma;JacobiCN

cnz|k=πn=−1nsechπKkn+z2KkKk2k2Kk&comma;cnz+Kk|k=k2+1snz|kdnz|k&comma;cnz+IKk|k=−Idnz|kk2snz|k&comma;cnz|1k=dnzk|k&comma;cnIz|k=1cnz|k2+1&comma;cnz|Ik=dckz|1+1k2&comma;cn1+kz|2k1+k2=cnz|kdnz|k1+ksnz|k2&comma;cnz|k=ncIz|k2+1&comma;cn1+k2+1z|1k2+121+k2+12=11+k2+1snz|k2dnz|k&comma;cnz2|k2=dnz|k+cnz|k1+dnz|k&comma;cnz|k2=1snz|k2&comma;cnv+z|k=snz|kdnz|ksnv|kdnv|kcnz|kcnv|kk2snv|k2snz|k21

(1.1.6)

FunctionAdvisoridentities&comma;InverseJacobiSN

(1.1.7)
• 

The JacobiTheta functions:

FunctionAdvisoridentities&comma;JacobiTheta1

ϑ1z+2m+1π2&comma;q=−1mϑ2z&comma;q&comma;m::integer&comma;ϑ1z&comma;qk=k214sn2Kkzπ|kϑ4z&comma;qk&comma;ϑ1zτ&comma;&ExponentialE;−Iπτ=−I−Iτϑ1z&comma;&ExponentialE;Iπτ&ExponentialE;−Iπτ14&ExponentialE;Iz2πτ+Iπ4τ&comma;0<τ&comma;ϑ1z&comma;q2=ϑ20&comma;q2ϑ3z&comma;q2ϑ30&comma;q2ϑ2z&comma;q2ϑ40&comma;q2&comma;ϑ20&comma;q2ϑ1y+x&comma;qϑ1xy&comma;q=ϑ1x&comma;q2ϑ2y&comma;q2ϑ2x&comma;q2ϑ1y&comma;q2&comma;ϑ12z&comma;q=2ϑ1z&comma;qϑ2z&comma;qϑ3z&comma;qϑ4z&comma;qϑ20&comma;qϑ30&comma;qϑ40&comma;q&comma;ϑ1y+x&comma;qϑ1xy&comma;qϑ1c+d&comma;qϑ1cd&comma;qϑ1x+c&comma;qϑ1x+c&comma;qϑ1d+y&comma;qϑ1dy&comma;q+ϑ1x+d&comma;qϑ1x+d&comma;qϑ1y+c&comma;qϑ1y+c&comma;q=0&comma;ϑ1z&comma;q=2ϑ1z&comma;qϑ4z&comma;qϑ20&comma;q&comma;ϑ1z&comma;q=2q14sinzk=11q2k12q2kcos2z+q4k&comma;ϑ1z&comma;q=ϑ2zπ2&comma;q&comma;ϑ1z&comma;q=Iϑ3z+Ilnq2π2&comma;qq14&ExponentialE;Iz&comma;ϑ1z&comma;q=Iϑ4z+Ilnq2&comma;qq14&ExponentialE;Iz

(1.1.8)
• 

The Weierstrass functions:

FunctionAdvisoridentities&comma;WeierstrassP

𝒫Iz;g__2,g__3=𝒫z;g__2,g__3&comma;𝒫z;g__2,g__3=a2𝒫za;g__2a4,g__3a6&comma;𝒫z__1+z__2;g__2,g__3=𝒫z__1;g__2,g__3𝒫z__2;g__2,g__324𝒫z__1;g__2,g__3𝒫z__2;g__2,g__32𝒫z__1;g__2,g__3𝒫z__2;g__2,g__3&comma;𝒫&omega;__j;g__2,g__3=e__j&comma;j1&comma;2&comma;3Andz314g__2z14g__3=ze__1ze__2ze__3And&omega;__1=Ke__2e__3e__1e__32e__1e__3And&omega;__3=Ke__1e__2e__1e__32e__3e__1And&omega;__2=&omega;__3&omega;__1Andg__23g__3227Ore__1=tAndg__2=3t2Andg__3=t3Andg__20Org__30&comma;𝒫z;g__2,g__3=e__1+π2ϑ30&comma;&ExponentialE;Iπ&omega;__3&omega;__12ϑ40&comma;&ExponentialE;Iπ&omega;__3&omega;__12ϑ2πz2&omega;__1&comma;&ExponentialE;Iπ&omega;__3&omega;__124&omega;__12ϑ1πz2&omega;__1&comma;&ExponentialE;Iπ&omega;__3&omega;__12&comma;z314g__2z14g__3=ze__1ze__2ze__3And&omega;__1=Ke__2e__3e__1e__32e__1e__3And&omega;__3=Ke__1e__2e__1e__32e__3e__1Andg__23g__3227Ore__1=tAndg__2=3t2Andg__3=t3Andg__20Org__30&comma;𝒫v;g__2,g__3𝒫w;g__2,g__3𝒫v;g__2,g__3𝒫w;g__2,g__3𝒫u;g__2,g__3𝒫w;g__2,g__3+𝒫u;g__2,g__3𝒫w;g__2,g__3+𝒫u;g__2,g__3𝒫v;g__2,g__3𝒫u;g__2,g__3𝒫v;g__2,g__3=0&comma;Andu+v+w=0&comma;n2𝒫nz;g__2,g__3=j=0n1l=0n1𝒫z+2j&omega;__1n+2l&omega;__3n;g__2,g__3&comma;z314g__2z14g__3=ze__1ze__2ze__3And&omega;__1=Ke__2e__3e__1e__32e__1e__3And&omega;__3=Ke__1e__2e__1e__32e__3e__1Andg__23g__3227Ore__1=tAndg__2=3t2Andg__3=t3Andg__20Org__30&comma;𝒫&omega;__12;g__2,g__3=e__1+e__1e__3csgne__1e__2e__1e__3e__1e__2e__1e__3&comma;z314g__2z14g__3=ze__1ze__2ze__3And&omega;__1=Ke__2e__3e__1e__32e__1e__3Andg__23g__3227Ore__1=tAndg__2=3t2Andg__3=t3Andg__20Org__30&comma;𝒫&omega;__32;g__2,g__3=e__3e__1e__3csgne__2e__3e__1e__3e__2e__3e__1e__3&comma;z314g__2z14g__3=ze__1ze__2ze__3And&omega;__3=Ke__1e__2e__1e__32e__3e__1Andg__23g__3227Ore__1=tAndg__2=3t2Andg__3=t3Andg__20Org__30

(1.1.9)
• 

New specializations for elliptic functions:

FunctionAdvisorspecialize&comma; JacobiSN&comma; JacobiCN

snz|k=1cnz|k2&comma;And0<snz|korsnz|k=0And0<snz|k,snz|k=1cnz|k2&comma;Andsnz|k<0orsnz|k=0Andsnz|k<0

(1.1.10)

 

The conversion network for mathematical functions

• 

Related to the changes in FunctionAdvisor , a relevant number of new conversion routines related to elliptic functions got added to the network of relationships between mathematical functions.

Examples

• 

New conversion routines in connection with these enhancements to the FunctionAdvisor.

The Jacobi elliptic functions:

FunctionAdvisorjacobi

* Partial match of "jacobi" against topic "Jacobi_related".
The 18 functions in the "Jacobi_related" class are:

JacobiAM&comma;JacobiCD&comma;JacobiCN&comma;JacobiCS&comma;JacobiDC&comma;JacobiDN&comma;JacobiDS&comma;JacobiNC&comma;JacobiND&comma;JacobiNS&comma;JacobiSC&comma;JacobiSD&comma;JacobiSN&comma;JacobiTheta1&comma;JacobiTheta2&comma;JacobiTheta3&comma;JacobiTheta4&comma;JacobiZeta

(2.1.1)

Apply them:

(2.1.1)(z,k)

amz|k&comma;cdz|k&comma;cnz|k&comma;csz|k&comma;dcz|k&comma;dnz|k&comma;dsz|k&comma;ncz|k&comma;ndz|k&comma;nsz|k&comma;scz|k&comma;sdz|k&comma;snz|k&comma;ϑ1z&comma;k&comma;ϑ2z&comma;k&comma;ϑ3z&comma;k&comma;ϑ4z&comma;k&comma;Zz&comma;k

(2.1.2)

The elliptic Theta functions start at position 14:

14

JacobiTheta1

(2.1.3)

The following are relationships (conversions) between Jacobi theta functions now implemented in the library:

for m from 14 to 17 do for n from 14 to 17 do      if m  n then printm &equals; convertm&comma;n fiod&semi; od&semi;

ϑ1z&comma;k=ϑ2zπ2&comma;k

ϑ1z&comma;k=Iϑ3z+Ilnk2π2&comma;kk14&ExponentialE;Iz

ϑ1z&comma;k=Iϑ4z+Ilnk2&comma;kk14&ExponentialE;Iz

ϑ2z&comma;k=ϑ1z+π2&comma;k

ϑ2z&comma;k=Iϑ3z+Ilnk2&comma;kk14&ExponentialE;Iz+π2

ϑ2z&comma;k=Iϑ4z+π2+Ilnk2&comma;kk14&ExponentialE;Iz+π2

ϑ3z&comma;k=ϑ1zIlnk2+π2&comma;kk14&ExponentialE;Iz

ϑ3z&comma;k=ϑ2zIlnk2&comma;kk14&ExponentialE;Iz

ϑ3z&comma;k=Iϑ4z+π2&comma;kk&ExponentialE;lnk2Iπ2

ϑ4z&comma;k=Iϑ1z+Ilnk2&comma;kk14&ExponentialE;Iz

ϑ4z&comma;k=Iϑ2z+Ilnk2π2&comma;kk14&ExponentialE;Iz

ϑ4z&comma;k=ϑ3z+Ilnkπ2&comma;kk&ExponentialE;lnk2+2Iz

(2.1.4)

The JacobiPQ elliptic functions are thirteen elliptic functions that in some sense generalize trigonometric functions and have an enormous amount of properties. There are new conversion routines for all of them. For example:

for m from 2 to 13 do m &equals;convertm&comma; JacobiSN od&semi;

cdz|k=Isnzk2+1|Ikk2+1snIzk2+1|1k2+1

cnz|k=Isnz|ksnIz|k2+1

csz|k=IsnIz|k2+1

dcz|k=−IsnIzk2+1|1k2+1snzk2+1|Ikk2+1

dnz|k=Isnkz|1ksnIkz|Ik2+1k

dsz|k=Isnkz|1ksnIkz|Ik2+1ksnz|k

ncz|k=−IsnIz|k2+1snz|k

ndz|k=−IsnIkz|Ik2+1ksnkz|1k

nsz|k=1snz|k

scz|k=−IsnIz|k2+1

sdz|k=−IsnIkz|Ik2+1ksnz|ksnkz|1k

snz|k=snz|k

(2.1.5)

 

New commands in the MathematicalFunctions package

• 

Seven new commands were added to the MathematicalFunctions package:
· &Intersect, &Minus and &Union respectively compute the intersection, minus, and union of regions of the complex plane expressed algebraically as sets of equations and inequations.
· Assume places assumptions similar to what the assume command does but without redefining the variables. Coulditbe and Is compute boolean answers (like the coulditbe and is commands respectively), but also handle a sequence of an arbitrary number of nested conditionals, which possibly include And, Or, and Not (see also convert/boolean_function to relate to and, or, and not respectively), along with the ability to test them directly on lists.
· Evalf is a new command to numerically evaluate the Heun and HeunPrime mathematical functions (in Maple 2015 it is restricted to HeunC and HeunCPrime) using different approaches, including sequences of Taylor functions through paths that go around singularities.

Examples

• 

The MathematicalFunctions package has 7 new commands.

withMathematicalFunctions

&Intersect&comma;&Minus&comma;&Union&comma;Assume&comma;Coulditbe&comma;Evalf&comma;Get&comma;Is&comma;SearchFunction&comma;Series

(3.1.1)

The new commands &Intersect&comma;&Minus&comma; and &Union respectively perform the intersection, union, and minus of regions of the complex plane expressed algebraically as sets of equation and inequations.

Consider:

R__1 x in RealRange2&comma;infinity

R__1x−2&comma;

(3.1.2)

R__2x in RealRangeinfinity&comma; 5

R__2x&comma;5

(3.1.3)

R__1&MinusR__2

5<x

(3.1.4)

R__1&IntersectR__2

−2x5

(3.1.5)

Using algebraic expressions to represent regions:

R__3  0<x2+3x+2

R__30<x2+3x+2

(3.1.6)

R__4  x&Hat;29  0

R__40x29

(3.1.7)

R__3 &amp;Union R__4

x<−2Or−1<x

(3.1.8)

R__3 &amp;Intersect R__4

x−3Or3x

(3.1.9)

R__3 &amp;Minus R__4

−3<x<−2Or−1<x<3

(3.1.10)

The set of new commands Assume, Coulditbe, and Is perform basically the same operations as the standard assume, coulditbe, and is commands but with the following differences, more convenient depending on the situation.

• 

Assume uses the new Physics:-Assume command, capable of placing assumptions without redefining the variables, hence it is possible to reuse expressions entered before placing the assumptions. The result can also be reused after removing the assumptions, computing as in an extended-assuming context.

Consider:

simplifyarccoscosx

arccoscosx

(3.1.11)

This expression cannot be simplified further: it is equal to x only within some restricted range of x values. You can now place the assumption,

Assume0 < x < π2

x::0&comma;π2

(3.1.12)

and reuse the equation (3.1.11) entered before placing the assumption, hence invoke it by entering its label:

simplify

x

(3.1.13)
• 

Coulditbe and Is permit computing the related operations with an arbitrary number of conditions to be tested, that could be nested with no restrictions, involving And and Or, and also lists.

Consider the two conditions:

c__1  Andb < a&comma; b &equals; a

c__1b<aAndb=a

(3.1.14)

c__2  Andb &gt; a&comma; b &equals; a

c__2a<bAndb=a

(3.1.15)

None of them can be true, so:

CoulditbeOrc__1&comma;c__2

false

(3.1.16)

Change the second condition to be:

c__3  Andb  a&comma; b &equals; a

c__3abAndb=a

(3.1.17)

Now c__3 can be true, therefore:

CoulditbeOrc__1&comma;c__2&comma;c__3

true

(3.1.18)

Coulditbe can also receive as sequence of arguments (statements), in which case it only returns true if it would return true for each of the arguments received. In this example, two conditions cannot be true at the same time, but either of them can be true.

a&comma;b&comma;c  A&comma;B&comma;C&comma; a&comma;b&comma;c &equals; A&comma;B&comma;C

a&comma;b&comma;cA&comma;B&comma;C,a&comma;b&comma;c=A&comma;B&comma;C

(3.1.19)

Coulditbe

true

(3.1.20)

Add a condition that cannot be:

Coulditbe&comma; 1 &equals; 0

false

(3.1.21)

Note the difference with Or:

CoulditbeOr&comma; 1 &equals; 0

true

(3.1.22)

Note also the difference between the result (3.1.20) and the one using And:

CoulditbeAnd

false

(3.1.23)

The Is command is entirely based on Coulditbe so that IsA&comma;B&comma;C returns as notCoulditbeNotA&comma;NotB&comma;NotC. This is a generalization to many arguments of the relationship between the output of the standard is and coulditbe commands.

Hence:

Is

false

(3.1.24)
• 

Evalf is a new command to numerically evaluate the Heun mathematical functions using different approaches, including sequences of Taylor functions through paths that go around singularities.

EvalfHeunC1&comma;2&comma;3&comma;4&comma;5&comma;6

      HeunCZ and HeunCZPrime at Z = .500000000000-.559016994375*I using a series expansion around Z = 0

      HeunCZ and HeunCZPrime at Z = 1.06250000000-.559016994375*I using a series expansion around Z = .500000000000-.559016994375*I
      HeunCZ and HeunCZPrime at Z = 1.16204916259-.149352378815*I using a series expansion around Z = 1.06250000000-.559016994375*I

      HeunCZ at Z = 1.200000000 using a series expansion around Z = 1.16204916259-.149352378815*I

CPU time elapsed during evaluation: .426 seconds

−0.0090830565360.004476814952I

(3.1.25)

Compare with the value obtained using a differential equation approach to this problem:

EvalfHeunC1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;DE

C using dsolve/numeric approach for 1 <= abs(z).

-> computing initial conditions for C and CPrime at z = .1
   HeunC at z = .1 using a series expansion around z = 0
   HeunCPrime at z = .1 using a series expansion around z = 0
-> computing an extra step at z = 1.+.2*I

CPU time elapsed during evaluation: 1.009 seconds

−0.0090830565400.004476814953I

(3.1.26)

Perform the same computation requiring accuracy up to the value of Digits:

Digits

10

(3.1.27)

EvalfHeunC1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;withaccuracy

      HeunCZ and HeunCZPrime at Z = .500000000000-.559016994375*I using a series expansion around Z = 0

      HeunCZ and HeunCZPrime at Z = 1.06250000000-.559016994375*I using a series expansion around Z = .500000000000-.559016994375*I
      HeunCZ and HeunCZPrime at Z = 1.16204916259-.149352378815*I using a series expansion around Z = 1.06250000000-.559016994375*I

      HeunCZ at Z = 1.200000000 using a series expansion around Z = 1.16204916259-.149352378815*I
            HeunCZ and HeunCZPrime at Z = .50000000000000000-.55901699437494740*I using a series expansion around Z = 0
            HeunCZ and HeunCZPrime at Z = 1.0625000000000000-.55901699437494740*I using a series expansion around Z = .50000000000000000-.55901699437494740*I

            HeunCZ and HeunCZPrime at Z = 1.1620491625867589-.14935237881501522*I using a series expansion around Z = 1.0625000000000000-.55901699437494740*I
            HeunCZ at Z = 1.200000000 using a series expansion around Z = 1.1620491625867589-.14935237881501522*I

-> Testing accuracy of 10 digits for HeunCZ at Z = 1.200000000 around Z = 1.162049163-.1493523788*I and Z = 1.200000000 using Digits = 15
         HeunCZ at Z = 1.16204916259-.149352378815*I using a series expansion around Z = 1.06250000000-.559016994375*I
            HeunCZ at Z = 1.06250000000-.559016994375*I using a series expansion around Z = .500000000000-.559016994375*I
                  HeunCZ and HeunCZPrime at Z = .499999999999973874825-.559016994374970791168*I using a series expansion around Z = 0
                  HeunCZ at Z = .500000000000-.559016994375*I using a series expansion around Z = .499999999999973874825-.559016994374970791168*I
                  HeunCZ and HeunCZPrime at Z = .272727272727272727250-.408180805829884514696*I using a series expansion around Z = 0
                  HeunCZ and HeunCZPrime at Z = .449885452775968702046-.541443395498165954360*I using a series expansion around Z = .272727272727272727250-.408180805829884514696*I
                  HeunCZPrime at Z = .500000000000-.559016994375*I using a series expansion around Z = .449885452775968702046-.541443395498165954360*I
            HeunCZPrime at Z = 1.06250000000-.559016994375*I using a series expansion around Z = .500000000000-.559016994375*I

         HeunCZPrime at Z = 1.16204916259-.149352378815*I using a series expansion around Z = 1.06250000000-.559016994375*I

<- Reached required accuracy of 10 digits for HeunCZ using Digits = 15

CPU time elapsed during evaluation: 1.507 seconds

−0.0090830565350.004476814952I

(3.1.28)

Options arguments of the new MathematicalFunctions Evalf command include:

• 

DE to numerically evaluate using a differential equation approach

• 

R = ...  to indicate the maximum value of the radius used in each Taylor series in a sequence of Taylor series.

• 

Taylor to indicate the use of a Taylor series approach

• 

Z to use the Z approach to numerically evaluate the confluent HeunC function

• 

fdiff to use numerical differentiation to evaluate any of the five HeunPrime functions

• 

plot &equals; ..&period; to indicate the display of a plot showing the path and centers of the Taylor series used to evaluate the function

• 

withaccuracy = ... to compute with as many accurate digits as the value of Digits

• 

truncate = ... to request truncating the value returned to the indicated number of digits

• 

zoom = ... to zoom within the last plot shown

 

Numerical evaluation of the Jacobi Amplitude

• 

Full rewriting of the numerical evaluation of the Jacobi amplitude, represented in Maple by the function JacobiAM, precisely matching the definition given in the NIST Digital Library of Mathematical Functions.

Examples

The graphs shown in NIST for the Jacobi amplitude:

am  JacobiAMz&comma;k

Color  green&comma;red&comma;blue&comma;orange&colon;

k_val  0.4&comma;0.7&comma;0.99&comma;0.999999&colon;

NIST_22_16_2  seqplotsubsk&equals;k_valj&comma;am&comma;z&equals;0..10 Pi&comma; &apos;color&apos;&equals;Colorj&comma; j&equals;1..4&colon;

amamz|k

(4.1.1)

plots:-displayNIST_22_16_2

k_val  0.5&comma;0.9999&comma;1.0001&comma;2&colon;

NIST_22_19_1  seqplotsubsk&equals;k_valj&comma;am&comma;z&equals;0..10 Pi&comma; &apos;color&apos;&equals;Colorj&comma; j&equals;1..4&colon;

plots:-displayNIST_22_19_1