Maple 2017 Questions and Posts

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

I am trying to count of the number of primes p such that when p is concatenated with 1 (ie p1, or 10*p+1),  if p1 is composite then we record the result 1, else  2. This gives the minimum k for which the concatenation pk is composite, and k is always either 1 or 2. It would be interesting to compare the number of primes with 1 and those with 2 up to a given max. I have already written a code which calculates the 1 or 2 for each prime but have not managed to adapt it keep count.

I would like to have a code to keep a count  of the 1s and 2s, thus being able to say that up to 10^k we see {a, b} where a is the number of primes with "1" and b is the number with "2".

Ideally I would like to be able to output plots of these data for any k =1,2,3,... up to a pre declared maximum k value, so as to make comparative graphs. I do not know how to organise the counting process, or if it is possible to get Maple to do the plots as well. Can anyone please assist me with this? I have Maple 2017.

Best regards,




Maple 2017.3 has these problems which hamper my work with it. I shown three examples.

Example 1: Maple cannot recognize automatically that two complex numbers are equal:

[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);

Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).

Example 2:


yields no answer.

Example 3:


Maple fails to substitute the alias and recognize that rt=omega.

Any suggestion on a work-around problems 2 and 3 would be helpful.


Rafal Ablamowicz


Hi everyone, I hope you are staying safe from coronavirus.

I have a table of data points in excel (attached file) and want to plot a smooth surface plot in Maple, the plot will look like in the image below. How can I do it in Maple (2017)? I tried matrixplot(matrix) and the surface is good. However, I couldn't change the X, Y axes value since it should be the default value. 

Thank you very much.PlotTest.xlsx


Unfortunately I run out of ideas on how to solve the problem of searching and removing elements in a variable size list.  Below you can find an example.


the condition to remove the element of the list is given by the following procedure.

conds:= proc(varCoef::list,vars::name:=alpha)
local T1,T2,res;
T1 := table([2=3,3=2,5=6,6=5,7=9,9=7]):
T2 := table([2=3,3=2]):
end proc:

Something like


if it is a member, the element indexed by k should be removed from abc and then the search continues using the next element in abc (that now has one less element).   Otherwise, the element is kept and the search moves to next one.  The process ends when the last element in a short version of abc is tested.

Thanks all for the help and patience.






I need to test a huge amount of subsets and for doing that I was thinking of using combinat:-subset, since it avoids allocating memory for all subsets.  The problem with subset for my specific application is that it generates sets with all possible sizes and I just need subsets with a chosen number of elements.  Can that be done in maple?  

Many thanks




Moving from Mathematica to Maple and back these couple of days is driving me insane.  I get stuck trying to translate very simple things for not knowing each command belongs to each software.  Therefore I do apologize for another silly question. 

Given the list of indexed variables

varA := [A[1, 0], A[1, 1], A[1, 2], A[1, 3], A[1, 4], A[1, 5], A[1, 6], A[1, 7], A[1, 8], A[1, 9], A[2, 0], A[2, 1], A[2, 2], A[2, 3], A[2, 4], A[2, 5], A[2, 6], A[2, 7], A[2, 8], A[2, 9], A[3, 0], A[3, 1], A[3, 2], A[3, 3], A[3, 4], A[3, 5], A[3, 6], A[3, 7], A[3, 8], A[3, 9]]

how to apply the following substitution 

varA/. {Subscript[A, m_, 2] -> Subscript[B, m, 3], 
  Subscript[A, m_, 3] -> Subscript[B, m, 2], 
  Subscript[A, m_, 5] -> Subscript[B, m, 6], 
  Subscript[A, m_, 6] -> Subscript[B, m, 5], 
  Subscript[A, m_, 7] -> Subscript[B, m, 9], 
  Subscript[A, m_, 9] -> Subscript[B, m, 7]}

After trying a couple of commands such as map, subs, etc. I decide to try fromMma but no avail.  

Many thanks for the patience and help.





Hello every one:

I am trying to plat the graph of a function (which has been defined in my code). I use the plat 3D operator but it doesn't give me the correct plot . I even increase the digites and numpoints but appearently it gave me less precise plot . 

The problem of plots is as follows :

First I defined the function V and  asking maple to compute the values of V at some random points, spacially at (0,0) , (0,2*Pi) and (2*Pi,0) . It gave me 0 which means Maple computes the values correctly because it can be mathematically proved  that this function has the value 0 on all the board of a triangle with vertices (0,0) , (0,2*Pi) and (2*Pi,0) . 

As you can see in my code maple doesn't show the correct value (0)  for the boundary points even at (0,0) ! 


I don't know how shoud I fix this problem.You can find my code in attached .Thanks in advanced for your help. 


I have lots of lists of indexed variables (I am not sure if that is the correct name for it. Please correct me if it is not).  One example is (length of the list can change as well as the indices of the variables):

ans1 := [alpha[3, 7], alpha[3, 8], alpha[3, 9]]

and I need to retrieve two lists from it:  1) [3,3,3] and 2) [7,8,9].  I could not figure out how to do it.

Many thanks.




I have used Groebner[UnivariatePolynomial] extensively on my procedures and I wonder whether there is an improvement in speed and memory use in Maple 2020 in relation to the version I am currently using, that is, Maple 2017.  

Many thanks.


I am doing this plot

loglogplot((.45*exp(-0.5e-1*t)+.1*exp(-.1*t))/exp(-0.5e-1*t), t = 1.4*10^4 .. 1.52*10^4);

and I got this weird abrupt change at some point: (please see the attached maple file)

I guess it is due to how Maple implement those very large/small numbers.. Any thoughts?

Sort of revising fourier. I have a graph plot(sin(4*pi)+(1/3)*cos(6*pi)) however it gives result from -2pi to + 2pi. there must be a comand to modify plot to go from 0 to 2pi can someone give me a clue.



I have a graph with 267 nodes and 727 edges. I am trying to produce an eligible visualization of my graph but I'm getting a very crowded network. 


DrawGraph(Graph(M1), style = spring, symbolsize = 10, scaling = unconstrained); 

I have attatched the a JPEG file to my question to show what it looks like. I would like to space out the nodes with a more zoomed out view. How would I go about this?

Hello everyone .

I asked Maple to compute a definite integral of a function, numerically. Unfortunately it does not give me any values . I briefly explain what I did.

As you can see in the picture first I define a real valued function BW_dilog(x) (with complex domain), where the function dilog  already exists in maple. Then I defined another function, V, (with real domain and codomain ). Now I need the approximate value of the bi integral of V, on a triangle. The Maple file is attached.

I would be grateful if any one could help me.

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