Maple 2022 Questions and Posts

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

When The subgraph is too many, the label will hide automatically. Such as:

DrawSubgroupLattice(SmallGroup(200, 31), labels = ids)

But the labels is important to me. I can accept a more larger graph and more smaller text in labels. Is it possible?

Generators(SmallGroup(60, 10))

Wii get this result:

But I hope to copy this junk information into my clipboard.

But my clipboard just get such information:

[module() ... end module,module() ... end module,module() ... end module,module() ... end module]

Or I copy it as Latex format, I will get those extra \left\right:


\left[\left(1,4,5\right)\left(2,9,10\right)\left(3,13,14\right)\left(6,17,19\right)\left(7,18,20\right)\left(8,23,24\right)
\\
\left(11,27,29\right)\left(12,28,30\right)\left(15,33,35\right)\left(16,34,36\right)\left(21,39,41\right)
\\
\left(22,40,42\right)\left(25,43,45\right)\left(26,44,46\right)\left(31,49,51\right)\left(32,50,52\right)
\\
\left(37,53,55\right)\left(38,54,56\right)\left(47,57,59\right)\left(48,58,60\right),
\\
\left(1,6,21,22,7\right)\left(2,11,31,32,12\right)\left(3,15,37,38,16\right)
\\
\left(4,17,39,40,18\right)\left(5,19,41,42,20\right)\left(8,25,47,48,26\right)
\\
\left(9,27,49,50,28\right)\left(10,29,51,52,30\right)\left(13,33,53,54,34\right)
\\
\left(14,35,55,56,36\right)\left(23,43,57,58,44\right)\left(24,45,59,60,46\right),
\\
\left(1,2\right)\left(3,8\right)\left(4,9\right)\left(5,10\right)\left(6,12\right)\left(7,11\right)\left(13,23\right)\left(14,24\right)
\\
\left(15,26\right)\left(16,25\right)\left(17,28\right)\left(18,27\right)\left(19,30\right)\left(20,29\right)\left(21,32\right)
\\
\left(22,31\right)\left(33,44\right)\left(34,43\right)\left(35,46\right)\left(36,45\right)\left(37,48\right)\left(38,47\right)
\\
\left(39,50\right)\left(40,49\right)\left(41,52\right)\left(42,51\right)\left(53,58\right)\left(54,57\right)\left(55,60\right)
\\
\left(56,59\right),
\\
\left(1,3\right)\left(2,8\right)\left(4,13\right)\left(5,14\right)\left(6,15\right)\left(7,16\right)\left(9,23\right)\left(10,24\right)
\\
\left(11,25\right)\left(12,26\right)\left(17,33\right)\left(18,34\right)\left(19,35\right)\left(20,36\right)\left(21,37\right)
\\
\left(22,38\right)\left(27,43\right)\left(28,44\right)\left(29,45\right)\left(30,46\right)\left(31,47\right)\left(32,48\right)
\\
\left(39,53\right)\left(40,54\right)\left(41,55\right)\left(42,56\right)\left(49,57\right)\left(50,58\right)\left(51,59\right)
\\
\left(52,60\right)\mathrm{
\\}\right]

But I just want to copy the output what I have seen

Hello there, 

Would you allow me to ask this question?

Is there any way to apply 'collect' command using a term by multiplication of variables?

The following worksheet shows an example. What I wanted to see is the 'desired' expression, while multiple attempts with 'collect' command failed. 


 

restart;

eq_e5_10z := Psi[q0]*Delta*delta = 1/(omega[0])*p(Delta*Psi[q])+Delta*Psi[d]+Psi[d0]*1/(omega[0])*p(Delta*delta);

Psi[q0]*Delta*delta = p(Delta*Psi[q])/omega[0]+Delta*Psi[d]+Psi[d0]*p(Delta*delta)/omega[0]

(1)

eq_e5_10za := Delta*Psi[d] = Psi[q0]*Delta*delta - op(1, rhs(eq_e5_10z)) - op(3, rhs(eq_e5_10z));

Delta*Psi[d] = Psi[q0]*Delta*delta-p(Delta*Psi[q])/omega[0]-Psi[d0]*p(Delta*delta)/omega[0]

(2)

eq_e5_10zb := subs({p(Delta*Psi[q])=0}, eq_e5_10za);

Delta*Psi[d] = Psi[q0]*Delta*delta-Psi[d0]*p(Delta*delta)/omega[0]

(3)

collect(rhs(eq_e5_10zb), {Delta*delta});# error

Error, (in collect) cannot collect Delta*delta

 

collect(rhs(eq_e5_10zb), [Delta*delta]);# error

Error, (in collect) cannot collect Delta*delta

 

collect(rhs(eq_e5_10zb), [Delta, delta]);# did not work  

Psi[q0]*Delta*delta-Psi[d0]*p(Delta*delta)/omega[0]

(4)

Desired := (psi__q0 - psi__d0*p/omega__0)*(Delta*delta);

(psi__q0-psi__d0*p/omega__0)*Delta*delta

(5)

 


 

Download Q20220602.mw

We have just released an update to Maple, Maple 2022.1.

Maple 2022.1 includes improvements to the math engine, Plot Builder, Print Layout mode, and more.  We strongly recommend that all Maple 2022 users install these updates.

This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2022.1 download page, where you can also find more details.

In particular, please note that this update includes fixes to problems with Units:-Simple (here and here), evala, sum, and deleting tasks from a task template, all reported on MaplePrimes. As always, thanks for the feedback!

pointplot works with units, textplot apparently doesn't

"with(DocumentTools):   with(Units[Simple]):  with(plots):"

 

    a := 15*Unit('m')

15*Units:-Unit(m)

(1)

b := 10*Unit('m')

10*Units:-Unit(m)

(2)

displayPoints := pointplot([a, b])

 

displayText := textplot([a, b, "text"])

Error:TEXT location must be numeric; received: [`+`(`*`(15., `*`(Unit(m)))), `+`(`*`(10., `*`(Unit(m))))]

 

NULL

Download Textplot.mw

  1. I use both Maple and Matlab
  2. I also install (a stripped down version of) Maple as the "symbolic toolbox" for Matlab using the executable MapleToolbox2022.0WindowsX64Installer.exe, which lives in C:\Program Files\Maple 2022. This gives me acces to (some) symbolic computation capability from within Matlab.
  3. This installation process has been working for as long as I remember, certainly more than 10 years
  4. With Maple 2022 and Matlab R2022a, this installation process ran with no problems and I can perform symbolic computation within Matlab
  5. However, although the Matlab help lists the Maple toolbox as supplemental software (as in all previous releases), I can no longer acces help for Maple from within Matlab - I just get a "Page not found" message
  6. The relevant Maple "help" is at the same place within the Matlab folder structure which is C:\Program Files\MATLAB\R2022a\toolbox\maple\html
  7. I have just spoken to support at Matlab and they claim tha this must be a Maple (or Maple toolbox installer issue) - so nothing to do with them!
  8. Has anyone else had a similar problem andd found a workaround?

I've been asking a similar question:

How does Maple call external programs such as nauty?

Recently I used Mathematica to call these gadgets very succinctly, so I revisit the topic, and maybe Maple can do it as well, but I just didn't do it the right way.

  • nauty and Traces are programs for computing automorphism groups of graphs and digraphs. There is a small suite of programs called gtools included in the package. For example, geng can generate non-isomorphic graphs very quickly. 
  • plantri and fullgen are programs for generation of certain types of planar graph.

We note that binary executables of above two programs for Windows are not officially available. Fortunately, I recently compiled them by cygwin.  Of course, other operating systems can make it easier to use them. See attached two compressed files of compiled nauty and plantri programs for Windows.

The official websites of the two programs are listed below.

So, I found that Mathematica works very well for running these programs by Import. We list the following two examples: first example is to get all non-isomorphic 10-order 2-partite connected graph, and the second example is to get all 14-order non-isomorphic  quadrilateral graphs (the planar graphs in which any face is 4-face).

glist10 = Import["!D:/nauty27r3/geng -c -b 10", "Graph6"]; // AbsoluteTiming
Length[glist10]

g14 = Import["!D:/plantri52/plantri 14 -q -g ", "Graph6"] // AbsoluteTiming

 

I tried maple's Import or ImportGraph functions, but both failed.

restart: 
with(GraphTheory):
L:=ImportGraph("!D:/nauty27r3/geng -c -b 10 -g",output=list):
L2:=Import("!D:/nauty27r3/geng -c -b 10 -g"):

Error, invalid input: GraphTheory:-ImportGraph uses a 2nd argument, format (of type {string, symbol}), which is missing
Error, (in Import) must specify format for this input

The problem seems to be not recognizing compilations symbols " !".  I don't know if Maple can do this like mathematica.

Hi everyone, Could you help me to get a general solution to the following ode? Here rho and z are constants.

ODE := cos(g(t))^2*(diff(T(t), t, t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(g(t), t, t))*rho+2*(cos(g(t))^2)(diff(g(t), t))^2*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

cos(g(t))^2*(diff(diff(T(t), t), t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho+2*(cos(g(t)))(diff(g(t), t))^4*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

(1)

dsolve(ODE, T(t))

T(t) = DESol({-(-Omega^2*cos(g(t))^z+8*rho^2*(diff(g(t), t))^2*sin(g(t))^2-2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho-2*(cos(g(t)))(diff(g(t), t))^4*rho-2*rho*(diff(g(t), t))^2*sin(g(t))^2)*_Y(t)/cos(g(t))^2-3*rho*(diff(g(t), t))*sin(g(t))*(diff(_Y(t), t))/cos(g(t))+diff(diff(_Y(t), t), t)}, {_Y(t)})

(2)

NULL


Thanks.

Download ode_rlmt.mw

When using the built-in fsolve function to find the roots of a polynomial, how does exponentiation occur? For example, x3 is found​​​​​​first, and then to find x4, will he start again from the beginning, that is, x*x*x*x, or will he take the value of x3​​​​​​ and multiply by x? The teacher is interested in finding out this, but I don't know how to find out myself. 

Hello,

maybe some of you can help me with this. 

In the equations are variables F_[i][j] and GG_[i][j] (for i=1,2,3 and j=1,2,3). There are 5 Equations that equal 0 and 1 Equation that equals Q(given). 
Is there a better way to try and solve this equations? 

Thank you

A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

restart;
ScientificConstants:-GetValue(Constant(g))

Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

 

 

 

We suggested to either

[Edit May 13 after Acer's improvements]

A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

restart;
with(ScientificConstants):
GetValue(Constant(g));

9.80665

(1)

Download scientificConstantsGetValueShortFormsWithPackage.mw

or

B) use long forms for both command names:

restart;
ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormLongForm.mw

or

C) to test that a long form command and a short form command work together, import the package for the short form command:

restart;
with(ScientificConstants):
ScientificConstants:-GetValue(Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormWithPackage.mw

Further details can be found in the article ?UsingPackages

Have you ever wanted to create practice problems and quizzes that use buttons and other features to support a student making their way to an answer, such as the following?

Let’s take a look at how you can use Maple 2022 to create documents like these that can be deployed in Maple Learn. I know I’ve always wanted to learn, so let’s learn together. All examples have a document that you can use to follow along, found here, in Maple Cloud.  

The most important command you’ll want to take a look at is ShareCanvas. This command generates a Maple Learn document. Make sure to remember that command, instead of ShowCanvas, so that the end result gives you a link to a document instead of showing the results in Maple. You’ll also want to make sure you load the DocumentTools:-Canvas subpackage using with(DocumentTools:- Canvas).

If you take a look at our first example, below, the code may seem intimidating. However, let’s break it down, I promise it makes sense!

with(DocumentTools:-Canvas);
cv := NewCanvas([Text("Volume of Revolution", fontsize = 24), "This solid of revolution is created by rotating", f(x) = cos(x) + 1, Text("about the y=0 axis on the interval %1", 0 <= x and x <= 4*Pi), Plot3D("Student:-Calculus1:-VolumeOfRevolution(cos(x) + 1, x = 0 .. 4*Pi, output = plot, caption=``)")]);
ShareCanvas(cv);

The key command is Plot3D. This plots the desired graph and places it into a Maple Learn document. The code around it places text and a math group containing the equation being graphed. 


Let’s take a look at IntPractice now. The next example allows a student to practice evaluating an integral.

with(Grading):
IntPractice(Int(x*sin(x), x, 'output'='link'));

 This command allows you to enter an integral and the variable of integration, and then evaluates each step a student enters on their way to finding a result. The feedback given on every line is incredibly useful. Not only will it tell you if your steps are right, but will let you know if your last line is correct, i.e if the answer is correct.

Finally, let’s talk about SolvePractice.

with(Grading):
SolvePractice(2*x + 3 = 6*x - 9, 'output' = 'link');

This command takes an equation, and evaluates it for the specified variable. Like the IntPractice command, this command will check your steps and provide feedback. The image below shows how this command looks in Maple 2022.

These commands are the stepping stones for creating practice questions in Maple Learn. We can do so much more in Maple 2022 scripting than I realized, so let’s continue to learn together!

Some other examples of scripted documents in the Maple Learn Document Gallery are our steps documents, this document on the Four Color Visualization Theorem, and a color by numbers. As you can see, there’s a lot that can be done with Maple Scripting.

 Let us know in the comments if you’d like to see more on Maple 2022 scripting and Maple Learn.

To Maple support,

Why when removing symbol a from these equations makes Maple warning go away? This is from a textbook. Attached worksheet. 

 

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

worksheet attached also

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*a*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

Warning, it is required that the numerator of the given ODE depends on the highest derivative. Returning NULL.

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

 

Download warning_may_10_2022.mw

I tried to graph the function f(x)=x^(1/3) but it only gives me a graph for non-negative x's, when the function f has all real numbers as its domain.

Maybe I'm doing it wrong.

Thank you.

Hi, with Units[Simple] package loaded, I tried to differentiate a few functions using D[n] but it does not work. problem.mw

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; exp(y*x) end proc

(1)

D[1](a)

proc (x, y) options operator, arrow; y*exp(y*x) end proc

(2)

D[2](a)

proc (x, y) options operator, arrow; x*exp(y*x) end proc

(3)

retart

retart

(4)

"with(Units[Simple]):"

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; Units:-Simple:-exp(Units:-Simple:-`*`(x, y)) end proc

(5)

D[1](a)

Error, (in tools/gensym) too many levels of recursion

 

D[2](a)

Error, (in tools/gensym) too many levels of recursion

 

NULL

Download problem.mw

First 27 28 29 30 31 32 Page 29 of 32