Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I want to plot a 2D graph without labels. The labes=["",""] option does half of the job—it prints the empty string for labels (that's good) but it reserves room for them (that's bad).  In the following code I use a large size labelfont in order to exaggerate the effect:

plots:-setoptions(labelfont=[TIMES,64]);  # large labelfont selected on purpose
p1 := plot([[0,0],[1,1]], labels=["", ""]);

Note the large blank space at the bottom reserved for the the non-existent label.

I know one way to eliminate the label altogether:

p2 := subs(AXESLABELS=NULL, p1);

This does the right job but is there a more orthodox way of doing that?

Afterthought:  It would be good if the labels option to the plot command  accepted none as argument, as in labels=[none, none].

Why Maple likes to extract exp() outside the sqrt when its argument has minus sign vs. not?  Compare the following

eq2 := ln(2*u^2 + u - 1) = -c - 2*ln(x);


eq2 := ln(2*u^2 + u - 1) = c - 2*ln(x);

I like the above much better than the first one. Mathematica keeps both same form (i.e. keeps the exp() inside):

Maple's answers are correct ofcourse, I just do not understand the logic why when there is a minus sign on it likes to format it differently as shown.

Is there a way to make not do that?


I am trying to get Maple to recognize that

diff(x^n,x) does not equal n*x^(n-1), but rather 0 if n=0, or n*x^(n-1) otherwise.

This comes up when differentiating an infinite sum (power series). The constant term gets transformed into n/x instead of becoming zero. Maybe this is really a bug/lack of feature in how sum/Sum works.

For example: diff(Sum(x^n, n = 0 .. infinity), x) yields


Does anybody have a fix to get the differentiation right (other than expanding some terms of the series before taking the derivative)? 

(edited) Please note I am not trying to get an answer to this specific question. It is just illustrates a simplified example of behavior that leads to other bizarre results. Please see the attached worksheet for more weirdness:

how can i remove, zero after dot from my result

V := 4;
K := 16.56;

H := 0.5;

q1 := evalf(diff(y[1](x), x) = V*y[2](x)/H - K*y[1](x)/H);





I need to calculate the Jacobian of phi in relation to x and y (and finally to t)  but using VectorCalculus[Jacobian] does not work. I guess it is because of the time dependence.   What am I missing?  

Can the Physics package be used?

Many thanks.





I want to update Alphabets in my ‘for loop’ instead of numbers. Please look at the code below:

for Tl from 263 by 5 to 313 do
   for Ql from 25 by 25 to 300 do
        myvel:= my_porous(Ql, Tl, ratiol);
        Export(<myvel>, "HPporousmodel.xlsx", 1, my_alph[vcount]);
        vcount := vcount+1;

   end do

end do

Here, my_alph is a manually created alphabets corresponding to excel columns as below:

my_alph:=[ "A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1", "I1", "J1", "K1", "L1", "M1", "N1", "O1", "P1", "Q1", "R1", "S1", "T1", "U1", "V1", "W1", "X1", "Y1", "Z1", "AA1", "AB1", "AC1", "AD1", "AE1", "AF1", "AG1", "AH1", "AI1", "AJ1", "AK1", "AL1", "AM1", "AN1", "AO1", "AP1", "AQ1", "AR1", "AS1", "AT1", "AU1", "AV1", "AW1", "AX1", "AY1", "AZ1", "BA1", "BB1", "BC1", "BD1", "BE1", "BF1", "BG1", "BH1", "BI1", "BJ1", "BK1", "BL1", "BM1", "BN1", "BO1", "BP1", "BQ1", "BR1", "BS1", "BT1", "BU1", "BV1", "BW1", "BX1", "BY1", "BZ1"]:

The idea is to export the velocity vector that I get from proc (my_porous(Ql, Tl, ratiol)) in to an excel sheet (HPporousmodel.xlsx)with the command (Export(<myvel>, "HPporousmodel.xlsx", 1, my_alph[vcount]);). I want to export the velocities into a new column for every iteration starting from A, B, C,….. and so on. However, since I don’t know how to do that I’ve used a manually created list my_alph. This has a big disadvantage of restricting the number of times I can loop. For this case, I can only loop (3*26=78 times). Anything more asks for manually increasing the entries of my my_alph list. I want to loop for 100's of times which is becoming a big problem with this method.

Can anyone please help me in automating this without any such constraints as we do with numbers (like we have done for vcount here)?

Thank you.

I am trying to export a 3D plot from Maple (2021) in a vector format that can be imported into Adobe Illustrator without too much trouble. The graphic artist says the PDF files are not useful (“at the base of every PDF is an image file, inside layers and layers of clipping paths; not helpful”). “SVG does not appear to produce usable vectors – well, maybe not, but the one you sent me was super difficult to wrangle”. She had hoped that EPS would be useful, but she was unable to open the EPS file I created (not enough memory).

Here is the example that I have been using as I've asked others for help with this question.


T := torus([0, 0, 0], 1/2, 1/2);
C0 := spacecurve([cos(t), sin(t), 0], t = 0 .. 2*Pi, color = red, thickness = 9);
C1 := spacecurve([0.5*cos(t), 0.5*sin(t), 0.5], t = 0 .. 2*Pi, color = red, thickness = 9);
C2 := spacecurve([0.5*(1 + cos(t)), 0, 0.5*sin(t)], t = 0 .. Pi, color = blue, thickness = 9);
C3 := spacecurve([0.5*(-1 + cos(t)), 0, 0.5*sin(t)], t = 0 .. Pi, color = blue, thickness = 9);
Fig9510 := display([T, C0, C1, C2], view = [DEFAULT, DEFAULT, 0 .. 1/2], scaling = constrained, transparency = 0.75);

Direct links to the worksheet and the PDF, EPS, and SVG files on DropBox are provide below in the hope that something will be useful to somebody. (MaplePrimes links are provided for the MW and PDF files are also provided - but EPS and SVG files are not permitted.)

  2. Fig9510.pdf:
  3. Fig9510.eps:
  4. Fig9510.svg:

This question has been asked for more than ten years. The best solution to has been to use the command-line-interface version of Maple.

  1. Is the command-line interface still the best/only option for vector-based graphics output?
  2. If so, how do i access the command-line version of Maple 2021 on MacOS?

Hello, I have a program which works fine in maple but get stuck when I use it in maple 2021 please I need your help thank you in advance

Hi all,

This is my first time working on a problem using Maple, and I've run into some issues regarding plotting my findings. After putting in the information for the plot (p:= plot([y1], t = 0..56562.16837, y = 0.10]), I keep receiving the warning "Expecting only range variable t in expression y[1] to be plotted but found name y[1]. I attached the Maple worksheet below for more information, trying to work my way through plotting in Maple.


I would like the display of a piecewise-function F with DocumentTools:-Tabulate to look like the one I get with print.
How is it possible to do this?

Here is an example


MV := kernelopts(version);
Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895

# Extract the version number for subsequent use
MV := parse(substring(StringTools:-Split(convert(MV, string), ",")[1], 7..-1))

# I want to display F and G while using DocumentTools
# As you see the display of F is not very pretty.
# This is not a problem related to the "height" of the formula for G is pretty-displayed
# even if it as roughly the same "height" than F

F := piecewise(seq(op([x<k, k]), k=1..5)):
g := x -> 1/(1+x):
G := (g@@5)(x):
Tabulate([F, G]):

# using DocumentTools:-Layout doesn't help

C1 := Cell( Textfield(style=TwoDimOutput,Equation(F))):
C2 := Cell( Textfield(style=TwoDimOutput,Equation(G))):
T  := Table(Column(),Column(),
         Row( C1, C2 )

if MV < 2018 then
  InsertContent(Worksheet(Group(Input( T )))):
  InsertContent(Worksheet( T )):
end if;

This is what DocumentTools:-Tabulate displays


The attached worksheet is a stripped down version of some notes I am creating concerning the solution of vector equations in geometric algebra.  For the purposes of explanation it is best to show the math in its conventional typeset form before showing how to solve the equations in maple. The non-excutable math is in the text which is contained in a paragraph inserted before the execution group. In the first instance, the typesetting engine seems content to leave the text alone, but in the second case (which I created in the same way) it insists on parsing the equations and generating errors. I have tried repeatedly to make the second set of equations non-executable (since in maple terms they are nonsense) to no avail.
Can anyone suggest how I can use maple's text features to make the explanatory text inert.

Note that I have included the calls to my geometric algebra module in case they have some relevance to the problem, but they will not execute without the module.

Sample worksheet:

After using Maple for about a year now, I have quite a few worksheets and documents that I have created.  Often I would like to use code that I know I wrote in a previous document but I don't remember which file that was in.  It appears that those files are in a binary format.

Is there a Maple search utility or another way that would allow me to search a group of Mapele files for text?



Let expr defined this way

expr := piecewise(x(t)<0, -1, x(t)<1, 0, 1) + f(t) + piecewise(t<0, 0, t<1, 1, 0) + x(t)*piecewise(t<0, 1, t<1, 0, 1) + a*piecewise(t<0, 3, t<1, -1, 2)

How can I extract all the operators which contain a piecewise function of  t alone (the three bold operators in the expression above)?


I'm looking for a simple example on how to use the Edit Code Dragged (event), in a plot (embedded component). 

I couldn't find it in the Maple Documentation of elsewhere. 


2 3 4 5 6 7 8 Last Page 4 of 1828