Maple 2022 Questions and Posts

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

As the code:

poly := x^4 + 8*x + 12:
galois(poly, x)

"4T4", {"A(4)"}, "+", 12, {"(1 2 4)", "(2 3 4)"}

 Then I know it's Galois group has to be (isomorphic to) A4. And I can draw its Subgroup Lattice:

DrawSubgroupLattice(GaloisGroup(poly, x), 'indices')

But according to Galois's theory, each subgroup represents an intermediate field. As far as I know, ⑤⑥⑦⑧ are Q(r1),Q(r2),Q(r3) and Q(r4), respectively, where ri is the root of equation x^4+8x+12. But I have no idea what fields ②③④⑨ means. How do you calculate out those intermediate fields with maple?

Hello guys,

I created a palette, but when I click on an entry, the following occurs:

If the entry line, where the mouse cursor is, is empty, insertion takes place on this line.
If the input line has any expression and the mouse cursor is to the left of the expression, insertion takes place on the line above.

If the input line has any expression and the mouse cursor is to the right of the expression, insertion takes place on the line below.

Does anyone know how to fix this?

Sincerely,

Oliveira

Hello guys
Could someone help me create a simple palette to contain, for example, three functions that I use constantly?

           conve1(a), conve2(a) and conve3(a).

I tried through the help documentation, but I couldn't.

Sincerely,
Oliveira

Mathematica's Dimensions returns a list of the allowed levels, which has been implemented in Maple as . But 

MmaTranslator:-Mma:-Dimensions(<<1 | 2>, <1 | 0>>);

returns [6], and 

MmaTranslator:-Mma:-Dimensions([[1, 2], [1, 0]]);

returns [2, 2, 4]. What happened here?

It should be [2, 2].

restart;

MmaTranslator:-Mma:-Dimensions(linalg[matrix]([[1, 2], [1, 0]]));

[0]

(1)

MmaTranslator:-Mma:-Dimensions(< 1 , 2 ; 1 , 0 >);

[6]

(2)

MmaTranslator:-Mma:-Dimensions(convert(`{{1, 2}, {1, 0}}`, FromMma));

[2, 2, 4]

(3)

MmaTranslator:-FromMma(`Dimensions[{{1, 2}, {1, 0}}]`, evaluate);

[2, 2]

(4)

NULL

Download Mma[Dimensions].mws

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.

I'm trying to use Maple to take the following integral for positive values of a, b, c and non-negative integers i and j.

I know that for fixed values of j and k this doable — for example, for j=k=0 Mathematica gives

I'm trying the following code in Maple:

int(exp(-(x + y)/2)/(a*x + b*y + c), [x = 0 .. infinity, y = 0 .. infinity]) assuming (a::real, 0 < a, b::real, 0 < b, c::real, 0 < c)

Am I doing anything wrong?

How can we unveil all the possible transformations that reduce the number of independent variables of a given pde? I tried it by using "InvarientSolutions" which gives eight possible transformations. But under those transformations, I got only two different odes. Is there any other method/command from which we can get other possible odes of a given pde?

 

pde_ode.mw

I would like to be able to use python's matplotlib from Maple. I am doing the following currently

with(Python)
Start('home' = "/opt/anaconda3/lib/python3.9", 'path' = "/opt/anaconda3/lib/python3.9/site-packages")
ImportModule("matplotlib as mpl")

and the error I get back is

Error, (in Python:-ImportModule) ModuleNotFoundError: No module named 'matplotlib'
['Traceback (most recent call last):\n', '  File "<string>", line 1, in <module>\n', "ModuleNotFoundError: No module named 'matplotlib'\n"]

The string I passed into path is the directory where matplotlib seems to be located as far as I can tell. I looked this up in my IDE Spyder, but using the command print(matplotlib__file__).

UPDATE: but actually if I open a new worksheet and execute 

with(Python)
Start('home' = "/opt/anaconda3/lib/python3.9", 'path' = "/opt/anaconda3/lib/python3.9/site-packages")

The error is that 

Error, (in Python:-Start) unable to start Python: could not create process, mpython

So Maple isn't finding Python apparently.

I tried for 'home' also "/opt/anaconda3/bin", did not work.
 

I have a fairly simple worksheet with a 56x2 matrix M1 which I am trying to export to Excel with the following 

ExcelTools:-Export( M1, "C:/Temp/M1.xlsx", 1, "B2")

This causes the following message to appear

After that the program is frozen and totally unresponsive.  The only way to proceed is end the task in Task Manager..

I am trying to upload the worksheet but am not sure if I have succeeded

Download Calculation_of_pH_from_known_values_of_Vb.mwCalculation_of_pH_from_known_values_of_Vb.mw

I created a Github repository with files to reproduce the example that my question is based on.

I am using Grid:-Run to compute a 10000x3 matrix in each of 100 parallel runs. I then average the 100 matrices to obtain a final 10000x3 matrix, which I saved to an .m file.

It contains a variable called with the matrix.

Each row of the matrix is a 3d point, and the entire matrix represents a trajectory on a sphere. I'd like to display an animation of this trajectory. Now, my question is not about how to do this, but rather about the memory requirements necessary to do so.

I can plot trajectories with, say, 1000 points, but apparently 10000 requires too much memory.

The Github repository I linked to contains an example of all of this.

The worksheet matrixTest.mw reads the matrix from the .m file and reads some procedures defined in the .mpl file that are used for creating the animation data.

Then, a call to the procedure animateMatrices basically calls plots:-display to display the matrix as an animation.

I've been able to display the first 5000 rows of the matrix.

What type of memory is running out when I try to display the animation of the full 10000 rows?

Here is a screenshot of my Activity Monitor right before I get the

Error, out of memory error while processing result

This question is based on the following worksheet I created specifically to show my question: Animation_Test.mw

Unfortunately, MaplePrimes gives me an error when I try to insert the contents here directly.

Basically my question is about the syntax of plots:-display.

I have a sphere

sphereDisplay := plottools:-sphere([0, 0, 0], 1, transparency = 0.9);

and something which is the result of calling plots:display on a sequence of two other other plots:-display.

arrowAndTrailDisplay := plots:-display(seq(plots:-display(computeArrowPlotFrame(m, t, red), computeTrailPlotFrame(m, t, windowSize, red)), t = times), insequence = true)

You can see in the attached worksheet what computeArrowPlotFrame and computeTrailPlotFrame are, but they are basically lists of plot structures. arrowAndTrailDisplay is thus an animation containing two different sequences of frames.

I wish to have Maple plot the sphere and the animation together. This works as expected (a static sphere and the animation of an arrow and a trail of the path of the tip of the arrow)

plots:-display([sphereDisplay, arrowAndTrailDisplay]):

but the following does not work as expected (instead it plots each frame separately)

plots:-display([arrowAndTrailDisplay])

adding insequence=true to the latter makes it work. But my question is why do I have to add that? I can't understand, from syntax standpoint why the former plots arrowAndTrailDisplay as an animation but the latter does not.

Hello everyone,

I am trying to solve a system of six equations through a matrix and a vector. The matrix is 6x6, so the function "LinearSolve" should find a solution 

The matrix is

Matrix(6, 6, [[1., -1., 1., -1., 1., -1.], [1., 1., 1., 1., 1., 1.], [-2., 1.618033989, 30.94427190, -153.8246851, 371.1559479, -572.9674774], [-2., 0.6180339876, 22.94427191, -41.15905356, -37.04759741, 149.3606798], [-2., -0.6180339876, 13.05572810, 22.82468509, -20.15594802, -81.03252254], [-2., -1.618033989, 5.055728096, 28.15905368, 68.04759752, 104.6393203]])

and the vector associated with the system is

Vector[column](6, [-1/3, -1, 0, 0, 0, 0])

I am trying to solve this system with

a := LinearSolve(M3, v);

but it stays evaluating.

I have solved a similar system (5x5) with this function (LinearSolve) and it took less than a second, so I dont understand why it takes so long in this case.

Thank you in advance.

During my reaserch on diffusion I am arrived at the integral with argument

exp(-1/sqrt(x^2 + 1)) which Maple is not able to solve.

If some experts in solving integrals is able to solve it please keep me informed.

The file in Maple 2022 is below

primes_integral_diffusion.mw

in the context of solving an ode, sometimes the constant of integration that will satisfy an initial condition is +infinity or -infinity.

But Maple's solve does not find such solutions to the constant of integration. It only can solve for finite value if it can.

When this happens, I manually try taking the limit as the constant of integration goes to +- infinity, until I get an equation where both sides are the same or fail, and then give up.

I was wondering if there is a way or different command/package which will find solution such as infinity (which is valid solution to constant of integration).

Here are two examples

ode:=diff(y(x),x)=1/(LambertW(-exp(-1+_C1+x))+1);
ic:=[diff(y(x),x)=1,x=0];
eq2:=eval(ode,ic);
solution_for_constant := solve(eq2,_C1,'allsolutions'=true,'tryhard'=true);

Maple can not solve for _C1. It gives

But when trying manually few values, I find that _C1=-infinity satisfies the equation

limit(rhs(eq2),_C1=0);
limit(rhs(eq2),_C1=1);
limit(rhs(eq2),_C1=-1);
limit(rhs(eq2),_C1=infinity);
limit(rhs(eq2),_C1=-infinity);

The above shows that _C1 = -infinity is the constant of integration. Another simpler example

eq:=exp(-1 + _C1) = 0;
solution_for_constant:=solve(eq,_C1) assuming real;
limit(lhs(eq),_C1=-infinity)

The above shows that _C1=-infinity is solution for exp(-1+C_1)=0.  which one can see by just looking at it as exp(-infinity)=0.  Adding assumptions did not help.I also tried symbolic option.

I am not familar with SolveTools package, may there is something there.

So for now, my code just try the limit until it finds solution or gives up.

Any suggestions if Maple itself can find such solutions?

Maple 2022.2

if isolate fail, then it returns back the input equation. But if solve failed to solve for the variable in question, it returns either NULL or empty list, or empty set (depending on the input). So it is easy to check if it failed or not.

How does one check that isolate failed? Should I check the left side of what isolate returns is the variable I am solving for? For an example,

sol:=isolate(-2*y-cos(y)+x+sin(x)-_C1 = 0,y)

returns back -2*y-cos(y)+x+sin(x)-_C1 = 0

Is the following the correct way to check if isolate solved the equation or not:

sol:=isolate(-2*y-cos(y)+x+sin(x)-_C1 = 0,y);
if lhs(sol)=y then
   print("it solved it. Soltion is ",sol);
else
   print("Failed to solve it. Try solve command now ");
fi;

Just wanted to make sure as help for isolate does not mention anything about what happens if isolate can't solve the equation.

Maple 2022.1

3 4 5 6 7 8 9 Last Page 5 of 42