Maple 2022 Questions and Posts

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

I've been trying to figure out what i_  means in Maple. In what follows is some experimentation and then my questions.

Just a few initial experiments without loading any packages.

i_

i_

(1)

i_ = i_NULL

_i

_i

(2)

_i = _iNULL

D(_i)

D(_i)

(3)

f := proc (t) options operator, arrow; _i end proc

proc (t) options operator, arrow; _i end proc

(4)

D(f)

0

(5)

f := proc (t) options operator, arrow; t*_i end proc

proc (t) options operator, arrow; t*_i end proc

(6)

D(f)

proc (t) options operator, arrow; _i end proc

(7)

D(t*_i)

D(t)*_i+t*D(_i)

(8)

Impression: _i is treated like an algebraic basis vector when the result of a function; but not in an expression.

NULL

with(Physics)

_i

_i

(9)

_i = _iNULL

D(_i)

D(_i)

(10)

f := proc (t) options operator, arrow; t*_i end proc

proc (t) options operator, arrow; Physics:-`*`(t, _i) end proc

(11)

D(f)

proc (t) options operator, arrow; _i end proc

(12)

Nothing really seemed to change with the Physics package being used. However, if we use the following package

with(Physics[Vectors])

_i

_i

(13)

i_

i_

(14)

_i = _iNULL

i_ = i_NULL

In the middle of v__0 := v__x0*_i = v__x0*_i text. Doesn't work as expected.

In the middle of v__0 = v__x0*_i = v__x0*_i = v__x0*_i text.

 

NULL

My question is: is the symbol _i somehow special by default? Where can I find it in the documentation?

Note the second-to-last line in the Maple document pasted above: "Doesn't work as expected". The difference between this line and the next one is simply the presence of a := instead of an =. The assignment makes the vector notation differ. Is this difference a bug or some feature I am unaware of?

Here is yet another behavior that seems kinda weird to me. Given the function f defined above, D(f) gives us the expected result but D(f(x)) does not. Yet, int(f) gives an error, and we have to use int(f(x))

EDIT: a little more research indicates there is a difference between the operator and the function diff. 

Download PhysicsVectors.mw

Reading another question today I discovered that I can use syntax like

a := 2 _i + 3 _j

b:= _i - _j

a+b  

Maple computes the sum by vector component. This is very useful, and it prompted me to start reading the Multivariate Calculus Study Guide. I am still going through it but haven't seen this particular notation yet. When I check the type of above I get a result that sort of looks like `+` but actually it seems to be tilted to the right (so I guess it is italicized and represents some symbol).

What is this type?

I don't find much searching online, and I did see this page that says 

"Any symbol beginning with an underscore (_) is effectively reserved for use only by library code. It is not available to users. Failure to observe this rule can lead to unexpected results."

Edit: After a bit more looking, looks like my example code is using notation available from the Physics package, which I am now reading a bit about (but it is not clear to my why this package is used since I am not importing it explicitly).

I noticed something that seems to be new to my usage of Maple.

As I am typing in an expression in a Maple Worksheet (Document Mode), it seems Maple goes into "Evaluating" for a split second on every new keystroke.

For context, I have my own worksheet open and also the Maple Study Guide open for Multivariate Calculus. But just now I closed it and restarted Maple. A brand new worksheet has this same behavior. 

Did I just miss this before or is it normal for Maple to show "Evaluating" for a split second on every keystroke (instead of just "Ready")?

I just wrote up a bug report (aka "Software Change Request") but got a "We are currently experiencing technical difficulties" error so the report is not being sent.

I will just post here about the bug in case anyone knows what it is.

I am going through the Multivariate Calculus Study Guide. I went to section 1.1, and was going through the examples. At the end of an example is a link "Next Example", but when I click this I get an error and have to go back to section 1.1 Table of Contents. Kind of annoying. Also, I notice that Maple simply crashes seemingly randomly when going through this study guide. Very annoying.

Here is a screenshot of the write-up to the bug report service that isn't working, for the record

I was wondering if this is something wrong with my Maple installation or if other people experience it too.

For instance, given an adjacency matrix: 

convert([[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0]], Matrix): # adjacency

The desired diagram resembles:

The first one comes from Mathematica; the second one comes from MATLAB.
In MMA, we can use GraphLayout -> "LayeredDigraphEmbedding"; in MatLab, we can use Layout = "layered". Note that overlapping edges should be avoided in a layered plot.

Currently, since the vertices of a 2-D graph can be manually positioned, we can click, drag and place them to embed vertices, route edges, and then get a hierarchical structure as follows:

However, it's just a clumsy and fiddly job. Isn't there a fully automatic and less time-consuming method to do so in Maple?

Hey dear friends, in the following code (which is also attached at bottom of this post)

restart;
with(Physics[Vectors]);
Setup(mathematicalnotation = true);
with(Physics);
Setup(op = {H, I__C, I__G, Omega, R, a_, p, r, rho, v_, `α_`, `ω_`, `ϰ_`})
Newton_generalized_MatForm := m*(Omega*rho*H(t)*diff(`ϰ_`(t), t) - rho*diff(H(t), t)*diff(`ϰ_`(t), t) - rho*H(t)*diff(`ϰ_`(t), t, t) + diff(v_(t), t)) = f_[c] + f_[g]

 i wish to get the  (kappa-dot) coefficients 

so I used the "Coefficients" function as follows:

Coefficients(Newton_generalized_MatForm, diff(varkappa_(t), t))

but the results aren't as expected and it's this:

so is there a way around this , thanks in advance
Coeff.mw

Hello!
I have a document which can't be opened that contains several things I need to take my exam in a couple of days. The document has crashed and keeps telling this message: "There were problems during the loading process. Your worksheet may be incomplete". The only thing left in the document is a command and there should be several solved tasks.

I have tried to open the launch.ini file and add some script which MapleSoft suggested could sovle the problem, but I dont have access to the file by some reason. I read somewhere that danish letters such as æøå could be the reason for the document crashing. Is there any way to save the file or is it just lost? Eksamenssæt.mw

This code can draw the subgroup lattice:

DrawSubgroupLattice(GaloisGroup(x^3 - 2, x), 'indices')

But I really want to know what the extension of field about each subgroup corresponds to, like this:

The root of the polynomial r1=21/3, r2=21/3(-1+sqrt(3) I)/2, r2=21/3(-1-sqrt(3) I)/2 in the above graph. Further, how do we draw the extension relation of this polynomial:

x5+15x+44

The maple can draw this graph? If maple can't draw it, what software can?

 

restart;

q := (u,v) -> u^2 + v^2;

proc (u, v) options operator, arrow; v^2+u^2 end proc

D[3](q);

Error, (in D/procedure) index out of range: function takes only 2 arguments

Question: How does D know that q takes two arguments?

In general, if I pass q to another proc, how can I find out, within
that proc, that q takes only two arguments?

download number-of-arguments.mw

Given a vector-valued function z(u,v), I want to calculate the derivative of z with respect to its first argument by applying the D operator to it. I don't see how.  Any suggestions?

restart;

z := (u,v) -> < a(u,v), b(u,v) >;

proc (u, v) options operator, arrow; `<,>`(a(u, v), b(u, v)) end proc

Calculate the derivative of z with respect to its first argument:

P := diff(z(u,v), u);

Vector(2, {(1) = diff(a(u, v), u), (2) = diff(b(u, v), u)})

Express P through the D operator:

Q := convert(P, D);

Vector(2, {(1) = (D[1](a))(u, v), (2) = (D[1](b))(u, v)})

Question:  How do we obtain Q directly by applying the D operator to z

without the help of diff?  This one doesn't work:

D[1](z)(u,v);
type(%, Vector);

(D[1](`<,>`))(a(u, v), b(u, v))*(D[1](a))(u, v)+(D[2](`<,>`))(a(u, v), b(u, v))*(D[1](b))(u, v)

false

Download diff.mw

restart;
with(Physics[Vectors]);
Setup(mathematicalnotation = true);
with(Physics);

Setup(op = {Omega, r});

lprint(m*Omega^2*r);

which outputs this: