MaplePrimes Questions

How can I rearrange the inequality to isolate p1​ on one side?
I'm currently using the 'isolate' function, but it's returning expressions with the signum function.

Q_isolate.mw

This could be unrelated to V 26 of support tools and it could be a bug that existed in Maple before.

But no time for me to check now. Thought to ask about it before I forget.

When adding Physics:-Setup('assumingusesAssume'=true):  Maple generated internal error that can not be cought.

This is using latest V 26 of support tools

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 26 and is the same as the version installed in this computer, created June 3, 2025, 23:49 hours Eastern Time.`

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2));
try
   timelimit(30,(odetest(sol,ode) assuming positive));
catch:
   print("cought error ok");
end try;

diff(y(x), x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x)

y(x) = exp((-2*_C1)^(1/2))

-(ln(exp(I*2^(1/2)*_C1^(1/2)))^2+2*_C1)^(1/2)*exp(I*2^(1/2)*_C1^(1/2))

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2));
Physics:-Setup('assumingusesAssume'=true):
try
   timelimit(30,(odetest(sol,ode) assuming positive));
catch:
   print("cought error ok");
end try;

diff(y(x), x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x)

y(x) = exp((-2*_C1)^(1/2))

Error, (in type/complex) too many levels of recursion

 

 

Download type_complex_recursion_june_4_2025_V26_support.mw

Doing multibody analysis on a ridig body results in

Turning quaternions on

Since I do not understand quaternions very well I was wondering why q0 is listed two times (why does the system uses 8 generalized coordinates for 7 degrees of freedom).

Ridig body help says about quaternions:Indicates whether the 3-D rotations will be represented as a four parameter quaternion or as three Euler angles.  Regardless of the setting, the initial conditions are specified with Euler angles.

Is that representation only internal? Can quaternions be probed?

To familarize myself with quaternions in MapleSim I would be greatfull for any examples using them. Are there any?

In which situations shall I use quaternions in MapelSim?

And what by way the stands q0slack in the above screen shot for?

I was debugging another Maple problem and found this.

According to help, it says

Computations performed using assuming do not affect computations performed before or after calling assuming.

But this example below shows this is not the case at all.

I used hasassumptions(y(x)); before calling a command that uses assuming, and it gave false as expected since there are no assumption put on y(x).

After the command is complete, now I find that  hasassumptions(y(x)); returns true  which is wrong. 

This only happens when adding Physics:-Setup('assumingusesAssume'=true); and also when the command that uses assuming timesout.

But from help, this should not cause this. Here is the help on this

assumingusesAssume
  true or false.

The default for this option is true, so that, when Physics is loaded, the Maple assuming command uses Physics:-Assume to place temporary assumptions. This makes the assuming command fully compatible with the Physics, DifferentialGeometry, DifferentialAlgebra and VectorCalculus packages. It is recommended to not change this setting. If assumingusesAssume is set to false, temporary assumptions placed by assuming are placed using the assume command, which redefines the variables receiving assumptions, so that, depending on the computation, the commands of these packages mentioned will fail in recognizing them within expressions (for example: when placing assumptions on the coordinates and computing with the spacetime metric).

Could someone please explain in very simple terms (as I find all this very confusing), why that after calling a command which uses assuming, I find my variables have assumption still attached to them? 

Because of this, commands that uses these variables after this will and could fail depending on what command is used.

This explains many of the problems I am seeing when using assuming command.  

My question is simple: Should any variable which did not have assumptions on it, still not have assumptions on it after using assuming regadless if the command that uses assuming timedout or not?

Notice that I am not even using the Physics package explicitly anywhere in the following. I am just called odetest with timeout.

Here is worksheet to illustrate this.

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 23 and is the same as the version installed in this computer, created June 2, 2025, 12:08 hours Eastern Time.`

restart

 

#this shows no assumptions on y(x);
ode:=y(x)*sqrt(1 + diff(y(x), x)^2) - a*y(x)*diff(y(x), x) - a*x = 0:
sol:=-_C4^2 + (-y(x)*sqrt(_C4^2/y(x)^2) + a*x)^2/a^2 + y(x)^2 = 0;
hasassumptions(y(x));
getassumptions(y(x));

-_C4^2+(-y(x)*(_C4^2/y(x)^2)^(1/2)+a*x)^2/a^2+y(x)^2 = 0

false

{}

#now use a command that uses assuming
Physics:-Setup('assumingusesAssume'=true):
timelimit(10,(odetest(sol,ode,y(x)) assuming integer)):

Error, (in simplify/sqrt/local) time expired

 

#this shows that y(x) has assumptions still stuck on it.

hasassumptions(y(x));
getassumptions(y(x));

true

{a::integer, x::integer, (-(-csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0, ((csgn(1/y(x))*a*x-(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0}

 

 

Download why_variable_have_assumption_june_3_2025.mw

My quess is this: Because the command that uses assuming timedout, Maple failed to remove/clear any temporary assumptions it added to the variables involved.   But this only happens when using Physics:-Setup('assumingusesAssume'=true):

If the command did not timeout, this does not happen. At least on some examples I tried this on.

Dear All,

I am facing some problems. This kind of error has been shown: "Error, attempting to assign to `D` which is protected.  Try declaring `local D`; see ? protect for details."

RSM_model.mw

restart;
with(geometry);

triangle(ABC, [point(A, a, b), point(B, c, d), point(C, e, f)]);
AreCollinear: hint: could not determine if a*d-a*f-b*c+b*e+c*f-d*e is zero
Error, (in geometry:-triangle) not enough information: the three points might be AreCollinear

assume(a*d - a*f - b*c + b*e + c*f - d*e <> 0);

triangle(ABC, [point(A, a, b), point(B, c, d), point(C, e, f)]);
                              ABC

area(ABC);
                   

What does the ~ after the point variables supposed to mean?

Hello, 

I'm working on a Maple package that manages external processes via TCP connections. I'm using ModuleUnload for cleanup, but I need to better understand how it behaves during Maple termination.

The issue:
- I have a module that manages external processes (via TCP connections)
- I implemented ModuleUnload to kill these processes when the module is unloaded
- ModuleUnload works perfectly when using 'restart' 
- However, when closing the Maple window, the external processes remain active

Investigation:
Using 'lsof', I observed that:
   - When Maple closes, it properly closes its TCP connection (goes to CLOSE_WAIT state)
   - But the external processes remain active

Questions:
1. Is this the expected behavior of ModuleUnload during session termination?
2. Are there alternative approaches to ensure cleanup when Maple is closed?

Any insights or suggestions would be greatly appreciated!
Thanks!

After updating to V 22 of supportTools, I found a new error.

This works sheet using V 22 gives this

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 22 and is the same as the version installed in this computer, created May 28, 2025, 23:36 hours Eastern Time.`

restart;

IC:=y(2) = 2;
ode:=diff(y(x),x) = (x-y(x))^(1/2);
sol:=y(x) = -(LambertW(-exp(-1/2*x))+1)^2+x;

y(2) = 2

diff(y(x), x) = (x-y(x))^(1/2)

y(x) = -(LambertW(-exp(-(1/2)*x))+1)^2+x

odetest(sol,ode) assuming positive;

Error, (in property/AndProp/+) too many levels of recursion

odetest(sol,[ode,IC]) assuming positive;

Error, (in AndProp:-UseCache) too many levels of recursion

 

 

Download bug_in_odetest_with_lambertW_june_2_2025.mw

But same code works OK in V 21

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 22. The version installed in this computer is 21 created May 28, 2025, 23:36 hours Eastern Time, found in the directory /home/me/maple/toolbox/2025/Maple Customer Support Updates/lib/Maple`

IC:=y(2) = 2;
ode:=diff(y(x),x) = (x-y(x))^(1/2);
sol:=y(x) = -(LambertW(-exp(-1/2*x))+1)^2+x;

y(2) = 2

diff(y(x), x) = (x-y(x))^(1/2)

y(x) = -(LambertW(-exp(-(1/2)*x))+1)^2+x

odetest(sol,ode) assuming positive;

-csgn(LambertW(-exp(-(1/2)*x))+1)*LambertW(-exp(-(1/2)*x))-csgn(LambertW(-exp(-(1/2)*x))+1)+LambertW(-exp(-(1/2)*x))+1

odetest(sol,[ode,IC]) assuming positive;

[-csgn(LambertW(-exp(-(1/2)*x))+1)*LambertW(-exp(-(1/2)*x))-csgn(LambertW(-exp(-(1/2)*x))+1)+LambertW(-exp(-(1/2)*x))+1, 0]

 

 

Download no_bug_in_odetest_with_lambertW_june_2_2025.mw

Given two optimality conditions defined as inequalities — a lower bound condition and an upper bound condition — under the assumptions that all parameters are positive and satisfy the relationships w>Pu>Ce>U[0]>0, and w>Pu>Ce,   and upsilon,varphi, tau0, eta are between (0,1), where 1>=varphi>=tau0>=0. and upsilon>eta

Under what conditions on the parameters does the lower bound condition become violated while the upper bound condition is also violated?

Detailed question in sheet attached: Q_Condition.mw

[ see also Q_Const.mw ]

This is not a big deal, but I was wondering why it changed. Before, after doing SupportTools:-Version(latest); to get latest version, the message used to say to just do restart; to use the new version of SupportTools (i,e. no need to close all of Maple). (I remember this, but I have no screen shot now to show this old message). I always used to just do restart; and it always worked.

Now, with version 22, the message changed, it now says to close and restart all of Maple

Why this change happened?  

Maple 2025 on Linux

I have a symbolic block matrix equation that I am trying to solve. Maple doesn't respect non-commutativity when solving.

I've tried to use 'Matrix' assumptions. I've also tried using the Physics package's Setup(noncommutativeprefix).

Both of these do not respect the order of multiplications (even using the dot operator for multiplication).

I've posted a minimal example below.

with(Physics)

Setup(noncommutativeprefix = {v, y})

[noncommutativeprefix = {v, y}]

(1)

NULL``

expr := y__xx.v__x = y__xu.y__uu.v__u

y__xx*v__x = y__xu*y__uu*v__u

(2)

soln := solve(expr, [v__u])

[[v__u = y__xx*v__x/(y__uu*y__xu)]]

(3)

op(rhs(soln[][]))

y__xx, v__x, 1/y__uu, 1/y__xu

(4)

NULL

Download noncommutative_example.mw

Does anyone know of a way to make this come out in a sensible fashion?
Thanks for the help!

Hello,

I would like to determine the level of nested lists within a list.

For example, given:

L := [[1, 2, 3], [], [[1, 2], [3, 4], [5, 6]], [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]];

I would like to compute:

nL := [1, 1, 2, 3];

That is, for each element in L, return the depth of nesting.

Additionally, I would like to write a procedure that takes L and returns a flattened version at the first non-empty list level:

L1 := [[1, 2, 3], [], [1, 2], [3, 4], [5, 6], [1, 2], [3, 4], [5, 6], [7, 8]];

Thank you in advance for your help!

Ed

hello:

Problem Background
   I am using Maple to perform a symbolic derivation for analyzing a coupled stripline directional coupler (as illustrated in the figure) The objective is to start from the known 4-port admittance matrix Y4 of a single coupled-line section(figure (a)) and derive the resulting 4-port admittance matrix Y_T for the composite structure shown in figure (b).

Diagram Explanation (Refer to Attached Figure)

  • Figure (a) represents a standard 4-port coupled-line segment, with admittance matrix Y4. The port ordering is labeled in green as (1,2,3,4).

  • Figure (b) shows a composite network constructed by combining two identical Y4 structures, where:

    • The right block are renumbered as red labels (5–8), which differ from the default Y4 port ordering.

      • The middle section includes two shorted node pairs that merge the internal connections:

        • Ports 2 and 6 are connected to form internal node A. so we get equtions:I2=-I6,V2=V6

        • Ports 4 and 8 are connected to form internal node B.so we get equtions:I4=-I8,V4=V8

Using a matrix-based linear algebra approach, I aim to compute the effective 4-port admittance matrix Y_T for the final structure shown in Figure (b), with the active ports being 1, 3, 5, and 7.

The even-mode and odd-mode responses are expressed symbolically. From these, the basic admittance elements are defined:

  • Y0, Ym1, Ym2, Ym3 using Yoe, Yoo, and θ.

Construct the 4×4 admittance matrix Y4 for the left-side coupled-line segment, using port ordering (1,2,3,4) as shown in Figure (a).

The Secondary (right-side) coupled-line block uses a different port order (Ports 5–6–7–8 correspond to the original 2–1–4–3).
Therefore, a permutation matrix P is introduced to reorder the ports as:

(1,2,3,4) → (2,1,4,3)
The reordered admittance matrix Y4_R is obtained via:

Y4_R := P . Y4 . Transpose(P)

Using BlockDiagonalMatrix or equivalent logic, we assemble the composite 8×8 admittance matrix Y8, representing:

[1 2 3 4 | 5 6 7 8]
The left half corresponds to Y4, and the right half to Y4_R.

According to the physical configuration:

  • Ports 2 and 6 are shorted to form Node A

  • Ports 4 and 8 are shorted to form Node B

We define a node-merging matrix S (6×8) to map the 8-port structure into a reduced 6-port structure using:

[1, 3, 7, 5, A(=2+6), B(=4+8)]
Apply the transformation:

Y6 := S . Y8 . Transpose(S)

From the reduced matrix Y6, extract:

  • External port indices: E = [1, 2, 3, 4] → Ports 1, 3, 7, 5

  • Internal node indices: I = [5, 6] → Nodes A, B

Perform Kron reduction to eliminate internal nodes and obtain the final reduced matrix:

Y_T := Y_EE - Y_EI . Inverse(Y_II) . Y_IE

When I try to execute:

Y8 := BlockDiagonalMatrix([Y4, Y4_R])
Maple does not return a usable or well-formed 8×8 matrix

 

  1. How to correctly construct the block-diagonal matrix Y8 := BlockDiagonalMatrix([Y4, Y4_R]) so that it's recognized as an 8×8 matrix in Maple?

  2. Validate whether the full logic flow from Y4 → port mapping → block matrix → merging → Kron reduction is mathematically sound and correctly implemented, and get the final 4 port Y parameter matrix.

  3. If possible, please suggest any more stable or simplified alternative matrix operations for symbolic Kron reduction involving port reordering and node merging.

here is the maple file:

Download CoupleLine_WH2.mw

thank in advance for your help.

Hello everyone,
When I try to calculate the derivative of (cx)/(1+x) in Maple, I get -cx/(1 + x)^2 as the result:

diff(cx/(1 + x), x)
When I do the calculation manually (see attached image), I get c/(1+x)^2 as the result.

Did I use the wrong command in Maple, or how can I explain the different result?

Thanks for your support,
Jan


How i can fix this issue ?
 

Download pdetest.mw

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