Maple 2021 Questions and Posts

These are Posts and Questions associated with the product, Maple 2021

I'm having an issue with MacOS Big Sur 11.4 recognizing a package from saved documents. The package works great from new documents! 

I've followed the instructions on
to add  a .mapleinit
file to my user home directory under MacOS Big Sur 11.4

The .mapleinit file has code as follows to run the VLA package: 
VLAlibpath := "/VLA/library/":
libname := `VLAlibpath`, libname:
and I have the VLA package files with the library inside of it in my home directory too. 

When I open a new Maple document and run and use the package, it works just fine! 

The problem though is that if I save the Maple file and reopen it, it will no longer recognizes the package. I get: 
Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received VLA

It is very odd since the file still recognizes the libname just fine:
libname;   "VLA/library/", "/Library/Frameworks/Maple.framework/Versions/2021/lib"

The workaround is to copy and paste into a new document and start a fresh but that is obviously not ideal. 

Any ideas? It is a really really old package, but great for visualization.



I am using Maple in Document mode and I want to print my worksheet. Is there a possibility to show the page margins as an overlay so that I can adjust the lines of my worksheet in order to avoid automatic breaks making the print difficult to read?


I have a function of 3 variables (PiM) which I can use in plot3d given the first argument while the other two arguments are functions of the two variables I use in plot3d.

In the code I attached below, I am plotting 2 planes using plot3d, but I cannot implicitplot where these two planes intersect. COuld you please take a look at my code?





Is there a way to change the font type and size when printing a table of data using DocumentTools:-Tabulate? Also can I change the column width?

I can't figure this one out.

I need to pick out the subexpression   anything*sin(3*x) from an expression.

it works, when the expression is   anything*sin(3*x)+something else. But when the expression is exactly  anything*sin(3*x) then select returns and not anything*sin(3*x) as I was expecting.

So I must be doing something silly, but do not see it.

TypeTools:-AddType('type_1', '`*`'({anything,identical(exp(3*x))}));

returns true. good. Now I test it on 

select(type,expr+sin(x),type_1) ;

and this returns what is expected. 25*A[1]*exp(3*x) but when I type

select(type,expr,type_1) ;

it return

reading select help page did not help.  Tried flatten, inplace.

I can do this using patmatch


But why is select not working in the above? What is the correct way to do this so it works for a*expr+anything and also for a*expr only? This is done inside a function and not interactive. So I need it to work for both cases, since the input can be anything, but I only need the term anything*exp(3*x) pulled out.


I want to have a proc, which returns an expression using an indexed symbol. The proc needs to basically generate constansts to use to build an expression, similar to how dsolve uses _Cn.  But I do not want to use _Cn for this so not to confuse the expression with another one that was generated using _Cn already.

So I thought to use a local symbol say A.  (I could have used _Zn also, but I think _Z is also used by Maple).

The symbol A is first declared local to the proc, and then the proc returns the expression using A[n]. For example  A[0]*x+A[1]*x^2 etc... The number of A[n]'s is not known before hand, but should not be more than 10. 

I want to make sure that A[n] returned is really part of the local symbol and not different symbol to avoid clash with any global A[n] 

When I do the following check

 local A;
 return A[99]
end proc;




good. So Maple says that A[99] is not global. But when I do


it also says false!

My question is: When making local A , will A[1] and A[2] also be local, or are they different symbols? Maplemint says nothing about it, so I assume A[n] is local also?

Procedure foo() 
  These local variables were used but never assigned a value:  A

It did not say that A[99] was never declared local. This tells me that A[99] is local, because A is local. But then why did type(expr,`local`)  say false?


I was wondering why each time solve is executed, I get a different of number of solutions and can I specify the number of solutions?


Thanks so much for taking time to answering this question.


Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/ .

I don't way the above error happened. But here is my worksheet below.


Given an expression, how to best find the constants _C1, _C2, etc.... in this expression?  Currently I do the following, but I think there should be a better way.

select(x->`if`(type(x,symbol) and convert(x,string)[1..2]="_C",true,false),indets(sol))

The above works, at least on the few examples I tried it on, but is there a better way to do it?  All constants will have the form _Cn where n is integer. 



Why is this integral so difficult -- so slow to execute?

     hypergeom([1/k*I],[1],k*v*I)*v^n,v = 0 .. 1/2*R), s=0..s_max)), n=0..1);

Hints to improve the efficiency of execution would be appreciated.

The conversion of a maple formula in latex version 2021 produces some

commands which are not defined , see

Perhaps more informations should be given  in the news about the command latex in Maple 2021


I need to find all the variants (I am not sure if this is the correct term to be used but I hope this will be clear in the example) of a specific indeterminate in a given expression.  Here is an example:

alpha[3, 5]*xi[1]*xi[8] + alpha[3, 5]*xi[4]*xi[5] + alpha[3, 3]

For this particular example, xi[1], xi[8], xi[4], and xi[5] are the variables I am looking for. The indexes of xi change depending on the previous calculation.  Also, in some cases, I need the alpha variables instead, that is, alpha[3,5], and alpha[3,3].  

I could not figure out how to use indets in this case.

Many thanks for your help. 

I may be misunderstanding the documentation of implicitplot.  Can someone set me straight?

This is extracted from the implicitplot's help page:

implicitplot(-x^2 + y, x = 0 .. 2, y = 0 .. x);

The plotting range is limited to y ≤ x, as intended.  Let us verify that it does the right thing:

	implicitplot(-x^2 + y, x = 0 .. 2, y = 0 .. x, color=red),
	plot(x, x=0..2, color=blue)

Yes, indeed it does.

Now let us try limiting the plotting range to y ≤ 1 − x2. Here is what we get:

	implicitplot(-x^2 + y, x = 0 .. 2, y = 0 .. 1-x^2, color=red),
	plot(1-x^2, x=0..2, color=blue)

I expected the red curve to lie entirely below the blue curve but it doesn't. Am I misunderstanding implicitplot?

Download worksheet:

Sorry to bother you with a basic question again.

How do I get both the indexes and the values of a table?


The following code completes apparently without error on Maple 2020.2, but with Maple 2021.1 I get a deconnection from the kernel:


The crash occurs when running the last line.

The code works on both versions with a smaller matrix (256x256).

Is there something obviously wrong with this piece of code, or a change in Maple 2021 that could explain this?

Note: I'm running Maple on Windows 10, the machine has 16 GB RAM, and the memory usage stays low.

Which one of these two versions, is the recommened one to use? For example, to check for type  integer*x, where x is literal x. i.e. identical(x)

TypeTools:-AddType('type_1', `&*`(integer,identical(x)));

TypeTools:-AddType('type_1', '`*`'({integer,identical(x)}));

Both work.  The difference is that `*` needs {} while `&*` does not.

I read the help page  and I do not understand what it says about the difference, and when is one supposed to use `*` vs. `&*`. it says 

              | `*`(type)  a product of factors of the given type
              | `&*`(type*)  a product of factors in which the nth factor is of the nth type specified in type*

Could possibly someone please explain in simple plain english what is the difference? If I use `&*`  vs. `*` with {}, will they work the same all the time or are there cases when to use one vs. the other?  Any rules of thumb to follow?

First 16 17 18 19 20 21 22 Last Page 18 of 27