Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Contour integration notation

" (∫)[+infinity]^(+infinity)((-x)^(z))/((e)^(x)-1). (ⅆx)/(x)"


The limits of integration are intented to indicate a path of integration which begins at + ∞, moves to th e left down the positive real axis, circles the orign once in positive ( counterclockwise) direction, and returns up to the positive real axis to  +∞

-How does this contour look like  in a  graph ?
- the "(ⅆx)/(x)" notation  ?
- calculating this complexe contour integral?

Seems that the concept of the contour integration is similar wit a line integral in real calculus ?



Just wanted to post that I had some data loss because I opened two different workbooks with the same name from different locations.

This could lead to loss of data.

I had code attachments from the "old" workbook implemented in the "new" workbook, while the new code was gone.

Thought always that the round d is reserved for function of two variables x,y , but  that seems to be not the case here ?


Comparing Different Answers


Een antwoord ergens gegeven is

Int(sqrt(x^2+1), x) = (1/2)*x*sqrt(x^2+1)+(1/2)*ln(x+sqrt(x^2+1)) + C                                                             (vb)


Mple geeft



Int((x^2+1)^(1/2), x) = (1/2)*x*(x^2+1)^(1/2)+(1/2)*arcsinh(x)+C[1]



De twee antwoorden lijken nog niet opelkaar !
In het gegeven antwoord staat er een ln en in Maple kan een expressie omgezet worden in ln termen


Int((x^2+1)^(1/2), x) = (1/2)*x*(x^2+1)^(1/2)+(1/2)*ln(x+(x^2+1)^(1/2))+C[1]


(2)  is hetzelfde (vb)

Dezelfde integraal i sook gegeven als


Int((x^2+1)^(1/2), x) = (1/8)*(x+(x^2+1)^(1/2))^2+(1/2)*ln(x+(x^2+1)^(1/2))-(1/8)/(x+(x^2+1)^(1/2))^2+C[2]



een effectieve manier om twe antwoorden t evergelijken voor hetzelfde probleem is het verschil te berekenen van een vergelijking met de twee integralen








(x^2+1)^(1/2)-(1/4)*(x+(x^2+1)^(1/2))*(1+x/(x^2+1)^(1/2))-(1/2)*(1+x/(x^2+1)^(1/2))/(x+(x^2+1)^(1/2))-(1/4)*(1+x/(x^2+1)^(1/2))/(x+(x^2+1)^(1/2))^3 = 0



0 = 0


Strange that  diff(lhs(%)-rhs(%)=0,x);  is translated by 2 d input with round d notation for functions with two variables ?
The two integrals are functions of one variable
diff(f, x)




Digits := 30; with(PDEtools); with(plots); Ops1 := numpoints = 100; Ops2 := color = magenta; Ops3 := color = blue; Ops4 := color = "BlueViolet"; Ops5 := axes = boxed, shading = zhue, orientation = [40, 50]; a := 0; b := 1; Tf := .5

axes = boxed, shading = zhue, orientation = [40, 50]




E := 1480



Ebes := 5990



n0 := 900000



ro := 1200



m := 12.6



f := sig(x, t)-Ebes*`ϵij`(x, t)

sig(x, t)-5990*`ϵij`(x, t)


n := 900000*exp(-(sig(x, t)-E*`ϵij`(x, t))/m)

900000*exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t))



P := 5



w := 4



k := 7



i := 5



eq1 := diff(sig(x, t), x, x) = ro*(diff(sig(x, t), x, x))/E+ro*(diff(sig(x, t), t)-Ebes*f/(9000000*exp(-(sig(x, t)-E*`ϵij`(x, t))/m)))*(1+f/m)/(9000000*exp(-(sig(x, t)-E*`ϵij`(x, t))/m))

diff(diff(sig(x, t), x), x) = (30/37)*(diff(diff(sig(x, t), x), x))+(1/7500)*(diff(sig(x, t), t)-(599/900000)*(sig(x, t)-5990*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t)))*(1+0.793650793650793650793650793651e-1*sig(x, t)-475.396825396825396825396825397*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t))



eq2 := diff(`ϵij`(x, t), t) = f/(9000000*exp(-(sig(x, t)-E*`ϵij`(x, t))/m))

diff(`ϵij`(x, t), t) = (1/9000000)*(sig(x, t)-5990*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t))



sys := {eq1, eq2}

{diff(diff(sig(x, t), x), x) = (30/37)*(diff(diff(sig(x, t), x), x))+(1/7500)*(diff(sig(x, t), t)-(599/900000)*(sig(x, t)-5990*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t)))*(1+0.793650793650793650793650793651e-1*sig(x, t)-475.396825396825396825396825397*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t)), diff(`ϵij`(x, t), t) = (1/9000000)*(sig(x, t)-5990*`ϵij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`ϵij`(x, t))}



IBC1 := {sig(0, t) = P*sin(w*k*i), sig(10, t) = P*sin(w*k*i), sig(x, 0) = 0, sig(x, 1) = 0, `ϵij`(x, 0) = 0}

{sig(0, t) = 5*sin(140), sig(10, t) = 5*sin(140), sig(x, 0) = 0, sig(x, 1) = 0, `ϵij`(x, 0) = 0}


S := 1/100; Ops := spacestep = S, timestep = S; Sol1 := pdsolve(sys, IBC1, [sig, `ϵij`], numeric, time = t, range = a .. b, Ops)



spacestep = 1/100, timestep = 1/100


Error, (in pdsolve/numeric) unable to handle elliptic PDEs




I have defined a function II1norm of one variable. The variable has units "microns". It plots perfecting using a range defined in microns, but gives an error when I try to find the root using NextZero. If I just leave off the "microns" in the second argument, NextRoot just reports "FAIL". If I rewite the worksheet without units, then the NextZero executes fine. Why? How to I use units when finding roots?

This is so useful to see geometrical mapping diagram to visualize Complex analysis

Something that also can be made for Maple 

Mapping Diagram for Cauchy Integral Formula – GeoGebra

Using GeoGebra for visualizing complex variable. (

I highly encourage everyone interested in complex variable to read Tristan Needham „Visual Complex Analysis” and try to solve problems with or without aid of GeoGebra. I hope that in this workshop we will manage to get a feeling of complex functions and as a final point understand how complex integration works. It is a common misconception that complex integration can't be visualized, and using Tristan Needham's ideas we will try to explore this idea. It's a pity that we don't have a lot of time, thus we will skip a lot of important information and construct only some graphs. 

There is so much experimenting with Geogebra software and doing too this in Maple ?

Hello there, 

Would you allow me to ask one question?

Is there any way to get a saturated water vapor pressure value with a temperature outside of the range?

The range here means [273.06 K, 647.096 K]. The pressure value certainly exists (T<273.06 K), but the API only comes up with an error. 

Here is the Maple worksheet where I got into this issue:






T2 := (-40.0 + 273.15) * Unit('K');



xbb := 1: # 100% steam, saturated.

Pg2 := PropsSI("P", "T", T2, "Q", xbb, "water");

Error, (in ThermophysicalData:-CoolProp:-PropsSI) Temperature to QT_flash [233.15 K] must be in range [273.06 K, 647.096 K] : PropsSI("P","T",233.15,"Q",1,"water")




I must feed the not trivial zeros numbers into this aproximation formula ?


Riemann hypothese and staircase of primes













numelems(select(isprime, [seq(1 .. 10000)]))



The prime counting function is approximated by Li(x) and x/ln(x).

plot([PrimeCounting(x), Li(x), x/ln(x)], x = 1 .. 500, legend = [pi(x), Li(x), x/ln(x)])

The staircase of primes approximated by two functions
Interesting is the video: How i learned to love and fear the Riemann Hypothesis


for n from 1 to 30 do
 if is(n,prime)
     then ps[n]:=plot([[n,y],[n,y+1],[n+1,y+1]]):
     else ps[n]:=plot([[n,y],[n+1,y]]):
 end if ;

plot([PrimeCounting(x)] ,x = 1 .. 35, legend = [pi(x)]):

plot([PrimeCounting(x), Li(x), x/ln(x)], x = 1 .. 35, legend = [pi(x), Li(x), x/ln(x)])





Prime counting function
What found RIEMANN for the prime counting function in relation to the zeta function after he defined the zeta function?


He found further a function what follows exactly the shape of the prime counting function

Final discovery v. Riemann.  

- step in the omhoog in de priemtelfunctie = log(p) (zie video)


Using the logarithmic primecount function( from Chebyshev) (approximation)
Further  analyse with this Chebyshev approximation formula in relation to the not trivial zero points from Riemann zeta function ( zeros) gives another real function for approximating the primecounting function what uses the non trivial zeros from Riemanns zeta function  in this function:


"(not trivial zeros ) u[k ] = "i*w[k]+v[k]   
Number now all nottrivial zeros in the upperhalfplane from down to bottom,  as u[1], u[2], u[3, () .. ()]

"`&varphi;`(x)  := x-ln(2Pi)-1/(2 )ln(1-1/(x^(2))) - (&sum;)2/(|u[k]|) x^(v[k]) cos(w[k] ln(x)-alpha[k])"


Its only alpha[k] that must be calculated out of the not trivial zeros and i must have a list of  serie of not trivial zeroes from the zeta function. => see Hardy's Z(t) ? from this ..... alpha[k]  can be calculated ?
All not trivial zeros are complex numbers laying on a line ,but  orginating from (0,0) in the complex plane as  vectors to the points    

varphi(x):= x - ln(2*Pi) - 1/2*ln(1 - 1/x^2) - sum(2*x^v[k]*cos(w[k]*ln(x) - alpha[k])/abs(u[k]), k = 1 .. infinity);

x-ln(2*Pi)-(1/2)*ln(1-1/x^2)-(sum(2*x^v[k]*cos(-w[k]*ln(x)+alpha[k])/abs(u[k]), k = 1 .. infinity))


This formula seems to be correct .
Now how to make a plot ?
Hardy's Z(t) function shows the not trivial zeros in the upperhalfplane of the critical strip of the Riemann zeta function  as zeros in this Z(t) real function : derived from a alternating serie ?


It's sad when a bug is found for such a simple problem!

sys := [x*y*z = 0, x*y*z + x*z + z = 0, x*y*z + x*y + x = 0]:
solve(sys, {x,y,z});    # OK
#         {x = 0, y = y, z = 0}, {x = x, y = -1, z = 0}

solve(sys, [x,y,z]);    # ???
#                               []



Happy New Years All

Can anyone explain two document formating features I am trying to implement?

1.)  Sections.  I select numbering with follow previous selected and I get three sections with a 1. in front of them vs 1, 2, 3.  


I would expect Technical to become 3.1 when properly following Section 3. header.   Also, I have seen how to manually type the section number, but that seems to defeat the document layout and formatting if it gets "jumbled up". 

2.)  Headers.   Can you suppress headers on pages 2 through X to have a unique cover page header?   This would be similar to word (headers and footers linked to previous section, or not(?) with section breaks as new pages)


I am working on a modelling (simulation) program for an rf system involving DDSs, rf mixers and other components. Each component is programmed as a submodule with methods (procs) and other exports, the whole shebang wrapped into a main package loaded using with(). A loop simulates a number of scenarios with differing starting conditions. Most calculations are numeric in nature.

The code runs but is too slow and in addition seems to keep allocating memory as the main loop runs. I suspect these two are related. I am using profile() to get an idea where the time is spent and where the memory gets eaten up.

I am doing the following:

profile(DDS__Boo:-SetTW,rf__Boo:-cycles,rf__SR:-cycles); # profile these three methods (procs):
# the main loop:
# Loop over injection cycles

for cycle from 1 to Cycles do

  for ii from 0 to Points-1 do
  end do:

  BooRfPeriodsList[cycle]:=BooRfPeriods-evalf(rf__Boo:-cycles(c__B0/f__SR)); # rf periods cB0 to extr.
  evalf(BooRfPeriodsList[cycle])/432; # Booster turns c__B0 to extr  
  targetErrors[cycle]:=(%-round(%))*432; # targeting error in bucket width
end do:
# end loop

function           depth    calls     time    time%         bytes   bytes%
SetTW                  1    10240  230.877    51.52   22851828384    72.80
cycles                 1      110  108.607    24.24    4269176160    13.60
cycles                 1      110  108.607    24.24    4269176160    13.60
total:                 3    10460  448.091   100.00   31390180704   100.00

My question is: how do I interpret the table of results?

"time" is in seconds? (this should really be written in the Help files). Also, SetTW() and cycles() call other routines from the package, are they included in the times reported or not?

"bytes" is my biggest concern. "SetTW" has a whopping 22 GB against it. Since the total allocation goes up to about 290 MB in this particular run (per Maple's info line) this cannot be the total memory used. Can this be the total allocation (and most of it ending up as garbage and cleaned out)?? Even the 4 GB against cycles seems out-of-line.

The two lines for "cycles" are exactly the same even though the routines differ (belong to different instances of the module and operate on differnt parameters). Is profile aware of that, or not?

I realize that people like to see the whole program or worksheet; but given that this is dependent on a large-ish package and the sheet itself is of some size and difficult to penetrate for the uninitiated I want to spare you from trying to read it. Right now I need to understand what showprofile() is reporting. Once I better understand profiling, and if I need more help, I will try to make a MWE, but I am not that far yet. I did check the Programming Guide but I did not find the info I am looking for.

Thanks much for any insight you can share.

Mac Dude.

I have been experiencing an error in the 2-D math text in Maple 2021. Every time I use the shift button the command seems to double. So if I for instance want to define A:=2 it will write; AA::==2 making the command useless. This only happens in 2-D math.

I have tried restarting Maple, my PC and uninstalling then installing maple 2021 again but nothing changes. This error appeared after updating maple the 6th of january 2022 to Maple 2021.2. I have a MacBook Air M1 2020. 

Please help as I have an exam soon

i have a long proc i am defining in a loop inside the proc for some reason it calculates the value of a1[j+1] and a2[j+1] and assigns it(in the case of the picture j=1 and in j=2 it doesnt sub) but when it is called again in the next iteration  it doesnt sub the value it just calcluated ! 
i would be so thankful for any help ive been stuck on this for a while now 

I installed the cloud version of Syrup with xmaple, by clicking the cloud icon, etc. It is loaded with xmaple and cmaple. But, not in maple running in emacs.

(**) Error, invalid input: with expects its 1st argument, pname, to be of type
{module, package}, but received Syrup

Tom Dean

In this example, i have a top module A. Inside it, I have module named my_RECORD (which happened to be option object) that I want to return back to caller when they call a proc.

Maple allows me to declare the proc to return my_RECORD. No problem., But when making a local variable inside the proc and using o::my_RECORD it complains  that my_RECORD does not exist. 

The solution is to change o::my_RECORD to o::A:-my_RECORD

My question why it did not complain the same way on the return value on the proc?   for me, they are both semantically the same. One says the proc returns this type, and the other says the local variable is this type. So why had to do A:-my_RECORD on one but not the other? 

Here is an example. Maple 2021.2 on windows 10.




 #this is the RECORD to return
  local module my_RECORD()
   option object;
   export data::string:="";
  end module;
  export do_analysis:=proc()::my_RECORD;   
    local o::my_RECORD; #error here. But this is the same above line above?    
    return o;        
  end proc;
end module;



Error, (in do_analysis) type `my_RECORD` does not exist


    #this is the RECORD to return
    local module my_RECORD()
        option object;
        export data::string:="";
    end module;
    export do_analysis:=proc()::my_RECORD;
          local o::A:-my_RECORD;    
          return o;        
    end proc;
end module;



module my_RECORD () export data::string; option object; end module



1 2 3 4 5 6 7 Last Page 1 of 1877