Maple 2022 Questions and Posts

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

I have few questions on this subject.

1) One can view internal maple procs using the command showstats. For example showstat(`dsolve`) prints the dsolve proc. And showstat(`dsolve/SERIES`)  prints the proc called  dsolve/SERIES(). And this i s what I do not understand. What is the signifcance of in the above?    Since dsolve itself is a proc, what does mean? does this means SERIES is an internal proc inside dsolve proc? That is not likely. I see things like convert/tan/simpler again, what does the mean here? it can't be that simpler is an inner proc inside tan proc which is inside convert proc? I never used /  myself in mycode in a proc name.

How are these procs organized physically? I mean inside Maplesoft computers. Is each proc in separate .mpl file? How does the /  comes into play?  I tried to make a proc myself with forward / but got syntax error. So this / must mean some other logical relation, but I do not know to emulate it myself.

 

2) Why one must add ` ` around the names when using showstats for system procs, but not for my own module? For example, I did the following

A:=module()
  export foo:=proc()
      NULL;
  end proc;
end module;
                    
showstat(A:-foo)

And that worked. But if I type showstat(`A:-foo`)  maple gives error Error, (in showstat) procedure name expected

but with system proc, must have the `` there. If I type showstat(convert/tan/simpler) it is an error.

 

3) Why showstat(`DEtools/odeadvisor`)  gives Error, (in showstat) procedure name expected? But help says odeadvisor is in DEtools module.

 

4) Why can't one display the source of the module itself, and it has to be a proc? For example showstat(`DEtools`) gives error, because `DEtools` is not a proc, but a whole module.

Are these things described more somewhere? I only know about with(LibraryTools); 
Browse(); 

I am using GraphTheory:-AutomorphismGroup() command in order to obtain all the automorphisms of a graph. However, the command appears to return a set of generators. How can I get all the automorphisms listed?

Here is an example of my work.

with(GraphTheory)

AutomorphismGroup(CycleGraph(4))

_m4568996768

(1)

NULL

Download auto.mw

anyone has smart tricks to verify this Maple solution to this first order ode? I think the solution is correct. But can't figure how to make odetest result simplify to zero.

restart;
ode:=diff(y(x),x)=x*(y(x)^2-1)^(2/3);
sol:=dsolve(ode);
odetest(sol,ode);
coulditbe(%=0);

I tried few simplification on the output of odetest to see if will become zero, but no success.  This is one of those solutions which is hard for odetest to show it is zero because of the signum there, so thought to ask, may be someone will find a smart trick.

Maple 2022.2 on windows 10.

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

Hi,

So I have two issues currently. One is involved with units, and the other is involved in this preculiar issue I have with a solve.

The units issue is probably pretty simple. I tried converting the units to the more readable prefix unit (ex: nanofarads instead of farads). The conversion worked, as in the number changed, but the unit in the output didn't. How do I fix that?

The second issue is that I have a solve execution like above to solve for some resistor values. The problem is, for some reason, it's not actually giving me an output. I have no idea why, what am I doing wrong?

LLC_converter.mw

I recently upgraded from Maple 2019.2 directly to Maple 2022.2. I now have a problem with any double or triple literal subscripted variable in old worksheets or in new ones under Maple 2022.2. Double and triple indexed subscripts work just fine under Maple 2019.2.

If in Maple 2022.2 I enter X__a I get a proper Xa.  If I enter Y__a,b I get 'Ya,b' Note the leading prime preceeding the Y and the trailing prime following the subscript b down at the subscript level. This behavior holds for triple literal subscripts.

On the other hand, indexed subscripts work just fine in Maple 2022.2. If I enter X[a] I get Xa. If I enter Y[a, b] I get Ya,b .

How do I fix this behavior? When did it start? My jump from Maple 2019.2 to Maple 2022.2 was due to changing companies during the Covid period. I am using Maple on a Mac.

I have not tested literal superscripts or combinations of literal subscripts and superscripts.

Any help will be greatly appreciated. I use literal double and triple suscripts all the time to distinguish between vector and matrix components in different coordinate systems.

Neill Smith

lis := SearchSmallGroups('order' = 10 .. 100, 'soluble'): 
seq(DrawSubgroupLattice(SmallGroup(g), 'highlight' = CompositionSeries(SmallGroup(g))), g in lis[10 .. 20])

I want to see if these red nodes are present in each layer and connected at each level, so I need to detect a large number of images. But if I put them in the same row, these images will be very small and I have to zoom in one by one with the mouse to see them. How can I set the size of these images?

ps:I'm currently using my eyes to determine if these red nodes are present at each layer and connected at each level, and I'd be happy if there was code to do this

I want to do some memory management in Maple for large arrays.

To clarify this question: What do I have to do in Maple to free memory allocated to an array? The indications I have are that memory probably is not freed, but rather a new variable of null is created that replaces the old one, but the old one is still sitting around.

Is this a bug?

I was cleaning my code using mint. It told me that

             These names were used as global names but were not declared:  right

which is the direction used in a limit. When this happens, I just replace the name with 'right' to make it happy. This works for everything so far. But now limit fails with

      Error, (in assuming) when calling 'limit'. Received: 'invalid directional argument'

the strange thing this happens only when adding assuming after the limit.

It seems to me to be some parsing issue?  Attached is worksheet showing the problem.

Maple 2022.2 on windows 10. So for now I will remove the '' and let mint just complain.

interface(version)

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

c:=0:
m:=1:
n:=0:
f:=1/4*x^2:
limit(diff((x-c)^m*f,x$(m-n)),x = c,right)/(m-n)!;
limit(diff((x-c)^m*f,x$(m-n)),x = c,'right')/(m-n)!;

0

0

limit(diff((x-c)^m*f,x$(m-n)),x = c,right)/(m-n)! assuming real;

0

limit(diff((x-c)^m*f,x$(m-n)),x = c,'right')/(m-n)! assuming real;

Error, (in assuming) when calling 'limit'. Received: 'invalid directional argument'

 

Download issue_with_limit_oct_31_2022.mw

Hi,

Since a couple of years ago,  SQLite has been enriched with a bunch of new math functions not existing in previous versions: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. 

Examples: In SQLite version 3.39.4 2022-09-29 15:55:41 we can invoke:

sqlite> select pi();
3.14159265358979

sqlite> select power(2, 3);
8.0

sqlite> select floor(2.35);
2.0

Package Database[SQLite] in Maple 2022.2 does not recognize these functions.

In oldest versions of Sqlite3 we were able to add these functions after loading an external extension with sqlite3 api function load_extension() (see  https://sqlite.org/contrib/download/extension-functions.c), but his option is blocked in Maple:

dbName := "d:/sq3_maple/etc.db":
sq3Extension := "d:/sq3_maple/extensions.sq3":

with(Database[SQLite]);
[Attach, Bind, ClearBindings, Close, ColumnCount, ColumnNames, 
  Execute, Fetch, FetchAll, FetchRow, Finalize, Open, Opened, 
  Prepare, RESULT_BUSY, RESULT_DONE, RESULT_ROW, Reset, Step]

conn := Open(dbName):
Execute(conn, sprintf("SELECT load_extension('%s')", sq3Extension));
Error, (in Database:-SQLite:-Execute) not authorized

Am I missing something? Any way to add these functions to SQLite in current version of Maple?

Thanks in advance.

César Lozada

PS: SQLite is updated in Mathematica 13.1

 

 

 

Hello,

I use Maple and Maple Flow and want to work with physical units. However, I am quickly reaching the limits of what is possible. Now the question: Would it be possible to work with units and the piecewise function? In the attached example, the integration of a defined function is no longer possible. Or should I proceed differently in principle? Many thanks for any advice

Clemens

restart

 

Definition of current functions

"`i__1`(t):={[[0&lobrk;A&robrk;,t<0.01&lobrk;s&robrk;],[3&lobrk;A&robrk;*cos((2*Pi*t)/(T)),t>=0.01&lobrk;s&robrk;]]:"

"`i__2`(t):=3&lobrk;A&robrk;*cos((2*Pi*t)/(T)):"

"`i__3`(t):={[[0,t<0.01],[3*cos((2*Pi*t)/(`T__3`)),t>=0.01]]:"

T := 0.2e-1*Unit('s')

plot([i__1(t), i__2(t)], t = 0 .. .1*Unit('s'), color = [blue, red], legend = [i__1, i__2])

 

Calculation of RMS values

RMS__1 := sqrt((int(i__1(t)^2, t = 0 .. T))/T)

Error, (in Tools:-IntegrateExpression) units problem, can't make expression piecewise(t < .1e-1*Units:-Unit(s),0,.1e-1*Units:-Unit(s) <= t,3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s)))^2 unit-free with units [t::Units:-Unit(s)]

 

RMS__2 := sqrt((int(i__2(t)^2, t = 0 .. T))/T)

2.121320344*(Units:-Unit(A^2*s)/Units:-Unit(s))^(1/2)

(1)

and now without Units

T__3 := 0.2e-1

RMS__3 := sqrt((int(i__3(t)^2, t = 0 .. T__3))/T__3)

1.500000000

(2)

Download UnitProblem.mw

Hi, so I'm trying to solve this equation, but it seems that I've ran into two issues with it:

My problems with this this is such:

  • The pi^2 did not get integrated into the solution, it's just a pi^2. I would rather it not be like that, but the actual resulting number from that division
  • The units should result in Ω, but it's not, instead it just added the units from the original variables. How do I make it set to the "correct" unit?

LLC_converter.mw

in some cases, when integral returns result with special function in it, I want to keep the integral as inert instead.

Currently I do an explicit check for some special functions that could show up (and add more if needed). like this

anti := timelimit(60,-int(B/A, x));
if  has(anti,hypergeom) 
               or has(anti,MeijerG) or has(anti,WhittakerM) 
               or has(anti,WhittakerW)or has(anti,EllipticE) or has(anti,EllipticF) then                            
   anti := -Int(B/A, x);
 fi;

It will be nice if I could write

anti := timelimit(60,-int(B/A, x));
if hastype(anti,'special_math_function') then                  
   anti := -Int(B/A, x);
fi;

Function advisor knows about all elementary functions in maple

FunctionAdvisor( elementary );
The 26 functions in the "elementary" class are:

 [arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, 

   arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, 

   coth, csc, csch, exp, ln, sec, sech, sin, sinh, tan, tanh]


Is there a way to make a type in Maple for "special math functions"?  You might ask, what is a special math function. Well, it is all build in math functions in Maple which are not elementary? So I do not have to list them all in name one by one as there are so many of them.

Any suggestions?

Maple 2022.2.

I have not used _Envsignum0 before. Been looking at it, and I am little confused.

My testcase is the following

restart;

_Envsignum0:=1;
fy:=1/2*(a^2/y^2+2*a*b/y-4*a*c/y+b^2-4*b*c+4*c^2+2*a)^(1/2);
limit(diff(y*fy,y),y = 0,right) assuming real;

It still has signum there., I assumed all are real.

Is there a setting that will automatically convert all signum to 1?  as _Envsignum0:=1; does not seem to do it. Or do I have to explicitly add positive each time? as in

restart;
_Envsignum0:=1;
fy:=1/2*(a^2/y^2+2*a*b/y-4*a*c/y+b^2-4*b*c+4*c^2+2*a)^(1/2);
limit(diff(y*fy,y),y = 0,right) assuming real,positive;

The problem with adding assuming real,positive is that it applies to all variables in the expression. I only wanted those that has signum on them, to be replaced by 1.

Maple 2022.2 windows 10

Hi,

I just started to try out maple, as I'm testing out some software. So far it's been fairly easy to work in. I have ran into this interesting solution however

The issue I'm having is that the solution should not be... whatever that is. It should result in, off the top of my head, 2 or 4 numbers, and I'm only interested in one of them. None of the above is the answer to my question however. I don't know exacty what I'm supposed to do to get to that point. looking up the "RootOf" part on the support page didn't really explain it all that well.

First 25 26 27 28 29 30 31 Last Page 27 of 39