Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

[moderator: The Physics update Library fixes this bug with the same error generated and reported by the same Mapleprimes member on another ODESteps example.]

I have removed Physics update from libname path. 

Now I find I get error calling latex command. When Physics update is on libname, no error.

The error is 

         Error, (in Typesetting:-Parse) too many levels of recursion

I am using worksheet with typesetting extended. But also when I change it to typesetting standard, same error. 

Does this mean one must keep Physics update on libname path for Maple to work OK?

Is this error expected if Physics update is not on libname?

Worksheet below that shows this problem

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

CASE 1. With Physics update in libname path, no error

 

restart;

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

ode:=[diff(x__1(t),t)=2*x__1(t)+x__2(t),diff(x__2(t),t)=2*x__1(t)+3*x__2(t)];

[diff(x__1(t), t) = 2*x__1(t)+x__2(t), diff(x__2(t), t) = 2*x__1(t)+3*x__2(t)]

the_output:=Student:-ODEs:-ODESteps(ode,output=typeset):

latex(the_output,'output'=string):

 

CASE 2.  Removing Physics from libname path, gives internal error

 

restart;

libname:=libname[2];

"C:\Program Files\Maple 2024\lib"

ode:=[diff(x__1(t),t)=2*x__1(t)+x__2(t),diff(x__2(t),t)=2*x__1(t)+3*x__2(t)];

[diff(x__1(t), t) = 2*x__1(t)+x__2(t), diff(x__2(t), t) = 2*x__1(t)+3*x__2(t)]

the_output:=Student:-ODEs:-ODESteps(ode,output=typeset):

latex(the_output,'output'=string):

Error, (in Typesetting:-Parse) too many levels of recursion

 

 

 

Download internal_error_from_latex_when_libname_changed_nov_2_2024.mw

I find an error when calculating ExponentialFit(X, Y, x, summarize = embed) function. It's have an error in R-squared and Adjusted R-squared.

I’m working on deriving the equation of motion (16) from equation (9) (see attached image), but I’ve encountered a couple of issues in Maple. i) The variational derivative of Lagrangian, and ii) the commutator is zero, which isn’t expected.

How do we fix these issues? Are there any specific packages regarding the construction of Lagrangian?

VariationDerivative.mw

I think I just found one of the most serious problems in Maple I've seen (other than timelimit hanging).

This is using Maple 2024.2 on windows 10.

I'll explain in words the problem, then give worksheet below to reproduce this. I can reproduce this all the time.

I have implicit solution in y(x) to an ode.

If I first solve for y(x) from the solution, so solution is now explicit, then call odetest to check if this explicit solution is correct, and if I use assumptions on the odetest call, and then after that call odetest on the original implicit solution, then odetest fails to verify the implicit solution.

But, if I change the order, and first call odetest to verify the implicit solution first, it verifies it OK !  

So the problem ONLY happens if I change the order of calling odetest and if I use assumptions on the odetest call that was used before on the explicit solution.

This tells me that Maple remembers something from earlier call. Does it remember the assumptions used? If so, this is very risky. As some part of program might call odetest with some assumptions, and another part of the program can use no assumptions.  I thought assuming is only applied to the call it is used at only and will not affect future calls.

Is there a way then to clear all assumptions used on earlier call to Maple command before using the command again? Or to tell Maple not to remember assumptions used on a call?

This is a big problem. It took me 14 hrs of debuging to find it. Order of calls to odetest should not make it behave different.

I hope someone could find solution to this, since now I have no idea what to do as I need to use odetest on explicit and implicit solutions and I do not want the order of calling Maple command to make difference in results.

This worksheet shows the problem. 3 cases are given. Notice that when using assumptions on earlier call to odetest, how it fails to verify the implicit solution in later call.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1824 and is the same as the version installed in this computer, created 2024, October 31, 14:22 hours Pacific Time.`

kernelopts('assertlevel'=2):

CASE 1. Calling odetest on explicit first with assumptions, make odetest hang when calling on implicit after

 

restart;

IMPLICIT_SOL:=ln(10*x^2 + (10*y(x) + 12)*x + 5*y(x)^2 + 8*y(x) + 4)/5 - (4*arctan((5*y(x) + 5*x + 4)/(5*x + 2)))/5 = (3*ln(2))/5 + (4*arctan(3))/5;
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0;
IC:=y(0) = -2;

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

#find explicit solution first
EXPLICIT_SOL:=solve(IMPLICIT_SOL,y(x)):

#NOw check the explicit solution. Using assumptions to see the problem
timelimit(30,  ( odetest(y(x)=EXPLICIT_SOL,[ode,IC]) assuming positive, y(x)::positive) );

Error, (in evalr) time expired

#Now odetest hangs on the implicit solution

timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

Error, (in is/internal/rename) time expired

 

 

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

y(x)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

CASE 2. Calling odetest on implicit solution first, then it DOES NOT hang !!

 

restart;

IMPLICIT_SOL:=ln(10*x^2 + (10*y(x) + 12)*x + 5*y(x)^2 + 8*y(x) + 4)/5 - (4*arctan((5*y(x) + 5*x + 4)/(5*x + 2)))/5 = (3*ln(2))/5 + (4*arctan(3))/5;
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0;
IC:=y(0) = -2;

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

#notice, no hang now, since called before
timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

[0, 0]

#NOw check the explicit solution. This will timeout which is OK
EXPLICIT_SOL:=solve(IMPLICIT_SOL,y(x)):
timelimit(30,  ( odetest(y(x)=EXPLICIT_SOL,[ode,IC]) assuming positive, y(x)::positive) );

Error, (in type/complex) time expired

#check again that odetest still verifies the implicit solution OK

timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

[0, 0]

 

CASE 3. Calling odetest with no assumptions on explicit solution, then it also does not hang

 

restart;

IMPLICIT_SOL:=ln(10*x^2 + (10*y(x) + 12)*x + 5*y(x)^2 + 8*y(x) + 4)/5 - (4*arctan((5*y(x) + 5*x + 4)/(5*x + 2)))/5 = (3*ln(2))/5 + (4*arctan(3))/5;
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0;
IC:=y(0) = -2;

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

#Now check the explicit solution. but DO NOT use assumptions
EXPLICIT_SOL:=solve(IMPLICIT_SOL,y(x)):
timelimit(30, odetest(y(x)=EXPLICIT_SOL,[ode,IC]));

Error, (in factor/remember) time expired

#check again that odetest still verifies the implicit solution OK

timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

[0, 0]

 


 

Download order_of_ode_test_makes_difference_oct_31_2024.mw

 

update NOV 2, 2024 6 AM

I found the cause.

Removing PHYSICS from libname, then the problem goes away !

So this is caused by PHYSICS package. For some reason, having Physics package in the libname causes odetest to hang/fail compared to when the physics package is not in the libname path. Worksheet below.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1824 and is the same as the version installed in this computer, created 2024, October 31, 14:22 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

CASE 1. without PHYSICS on libname, it works !!

 

restart;

kernelopts('assertlevel'=2):

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

libname:=libname[2]; #remove PHYSICS

"C:\Program Files\Maple 2024\lib"

libname;

"C:\Program Files\Maple 2024\lib"

IMPLICIT_SOL:=ln(10*x^2 + (10*y(x) + 12)*x + 5*y(x)^2 + 8*y(x) + 4)/5 - (4*arctan((5*y(x) + 5*x + 4)/(5*x + 2)))/5 = (3*ln(2))/5 + (4*arctan(3))/5;
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0;
IC:=y(0) = -2;

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

#find explicit solution first
EXPLICIT_SOL:=solve(IMPLICIT_SOL,y(x)):

#NOw check the explicit solution. Using assumptions to see the problem
timelimit(30,  ( odetest(y(x)=EXPLICIT_SOL,[ode,IC]) assuming positive, y(x)::positive) );

Error, (in evalr/ln) time expired

#Now try odetest  on the implicit solution

infolevel[odetest]:=5;

5

timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

odetest: Performing an implicit solution test

odetest: Performing an explicit (try soft) solution test

odetest: Performing an implicit solution (II) test

[0, 0]

 

 

CASE 2. With Physics on libname, it fails !

 

restart;

kernelopts('assertlevel'=2):

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

IMPLICIT_SOL:=ln(10*x^2 + (10*y(x) + 12)*x + 5*y(x)^2 + 8*y(x) + 4)/5 - (4*arctan((5*y(x) + 5*x + 4)/(5*x + 2)))/5 = (3*ln(2))/5 + (4*arctan(3))/5;
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0;
IC:=y(0) = -2;

(1/5)*ln(10*x^2+(10*y(x)+12)*x+5*y(x)^2+8*y(x)+4)-(4/5)*arctan((5*y(x)+5*x+4)/(5*x+2)) = (3/5)*ln(2)+(4/5)*arctan(3)

2*x+3*y(x)+2+(y(x)-x)*(diff(y(x), x)) = 0

y(0) = -2

#find explicit solution first
EXPLICIT_SOL:=solve(IMPLICIT_SOL,y(x)):

timelimit(30,  ( odetest(y(x)=EXPLICIT_SOL,[ode,IC]) assuming positive, y(x)::positive) );

Error, (in evalr/shake) time expired

#Now try odetest  on the implicit solution

infolevel[odetest]:=5;

5

timelimit(30,  odetest(IMPLICIT_SOL,[ode,IC]) );

odetest: Performing an implicit solution test

odetest: Performing an explicit (try soft) solution test

odetest: Performing an implicit solution (II) test

Error, (in is/internal/rename) time expired

 

 

Download order_of_ode_test_makes_difference_NOV_2_2024.mw

my question is: Is it safe to permanently remove Physics package from libname? Why is having physics package in libname (which is by default) causes this problem?

I do not use Physics package explicitly in my code. i.e. I do not do Physics:- calls. 

Any one knows what effect not having Physics on libname cause? Will Maple still work OK for everything if one is not calling Physics package explicitly?

When I export images as SVG the resulting file always has the image much larger than the viewbox resulting in only part of it showing. My normal workflow is to then load in Inkscape and correct the error, however, I would love to not have an extra step. Is there any other fix for this?

Low power user (occasional) here! I would like to extract the parameters from a curve fit and assign to another variable?

How can I use Maple to solve a system of nonlinear equations symbolically and display the steps in the solution?

Here are two systems over the reals:

sys__1:=And(r*(387*r+52)+2<r*(226*q+121*s)+9*q*(q*(2*q-5)-3*s+2)+6*s,4*q^3+r*(27*r+4)+s^2=q*(q+18*r),q>=0,r>=0):
sys__2:=And((392-1739*q)*r+4*(2-9*q)**2+2151*r**2<75*r*s,4*q**3+r*(27*r+4)+s**2=q*(q+18*r),q>=0,r>=0):

The following results indicate that both and are satisfiable 

QuantifierElimination:-QuantifierEliminate(exists([s,q,r],sys__1));
                              true
QuantifierElimination:-QuantifierEliminate(exists([s,q,r],sys__1));
                              true

but RealDomain:-solve simply returns an empty list (that is, no solution exists) in both cases

RealDomain:-solve(sys__1,[q,s,r]); # ⟹ sys1 cannot be satisfied
                               []
RealDomain:-solve(sys__2,[q,s,r]); # ⟹ sys2 cannot be satisfied
                               []

As discussed in the previous problem, in contrast to using QuantifierElimination:-QuantifierEliminate, the use of RealDomain:-solve is unsafe. Nevertheless, the above output suggests that even the much-more-sophisticated QuantifierElimination:-QuantifierEliminate is still not always reliable (since the correct returnedvalue appears to be in lieu of ). So, what is the right command to handle polynomial systems over real domains in Maple? 

I have learned that the SPECTRA.mla library can solve SDP problems. I have tried to download and use it, but I am still missing the FGb module

> with(SPECTRA);
> M := Matrix(6, 6, [[10, 1, 0, m[1], -m[3], m[2]], [1, -2*m[1]+27, m[3], -27/2, -m[4], -m[5]], [0, m[3], -2*m[2], m[4], m[5], 0], [m[1], -27/2, m[4], 10, 0, m[6]], [-m[3], -m[4], m[5], 0, -2*m[6], 0], [m[2], -m[5], 0, m[6], 0, 1]]);
> SolveLMI(M);
=> Error, (in SPECTRA:-SolveLMI) `FGb` does not evaluate to a module

 

How can I resolve this issue on a Windows environment, beause I don't see install file for Windows, only MacOS and Linux:

I have this problem:

(x'+x''+epsilon/x)(x'-(x')^3/3!)(x''-(x'')^3/3!)(epsilon/x -(epsilon/x)^3/3!)=1

x(0)=epsilon , x'(epsilon)=epsilon+epsilon^{-1}

0<epsilon<<1

Now I want to try the ansatz: x(epsilon,t)=x_{-1}(t)/epsilon+x_0(t)+x_1(t)epsilon.

Can you suggest me a way to implement this ansatz (i.e finding x_{-1}(t),x_0(t),x_1(t)).

Appreciate your time!

Hi Dear,

I hope everyone is fine here. In the attached file, I have generated a square matrix "Q" using two-dimensional polynomials. The dimension of the square matrix "Q" depends on M1 and M2 parameters. In my simulation, sometimes I need this matrix of 1000 by 1000 dimensions. Using the attached method, it took a lot of time to compute two-dimensional polynomials and then to compute the general square matrix "Q." I wanted to write this matrix using proc (procedures). Maybe by using this way, I don't need to compute the polynomials, and it took less time to compute the square matrix "Q." I know how to generate a matrix using proc when its dimension depends on one parameter. However, here, the dimension of matrix "Q" depends on two parameters, M1 and M2. So, I am a little bit confused about how to adjust them in proc. Please see the attached file and share your useful ideas. 

help.mw

Thanks in advance

As by title, is it possible to check intermediate results found by nodes when using Grid:Map, and stop the execution according to these?

every time i have a small problem 2  why not cancel number 2 in denominator , i don't want see a number with fraction like 1/3  3/4 how i fix this

restart

K := (1/2)*sqrt(2*sqrt(2)*sqrt(lambda*a[5]/a[4])+2*sqrt(-2*a[5]/a[4])*(B[1]*sqrt(-lambda)*sinh(sigma)+B[2]*sqrt(-lambda)*cosh(sigma))/(B[1]*cosh(sigma)+B[2]*sinh(sigma)+mu/lambda)+2*sqrt(-(2*(lambda^2*B[1]^2*a[5]-lambda^2*B[2]^2*a[5]-mu^2*a[5]))/(lambda*a[4]))/(B[1]*cosh(sigma)+B[2]*sinh(sigma)+mu/lambda))*e^(i*psi(x, t))

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

 

(1/2)*(2*2^(1/2)*(lambda*a[5]/a[4])^(1/2)+2*(-2*a[5]/a[4])^(1/2)*(B[1]*(-lambda)^(1/2)*sinh(sigma)+B[2]*(-lambda)^(1/2)*cosh(sigma))/(B[1]*cosh(sigma)+B[2]*sinh(sigma)+mu/lambda)+2*(-2*(lambda^2*B[1]^2*a[5]-lambda^2*B[2]^2*a[5]-mu^2*a[5])/(lambda*a[4]))^(1/2)/(B[1]*cosh(sigma)+B[2]*sinh(sigma)+mu/lambda))^(1/2)*e^(i*psi(x, t))

(1)

B[1] := 0; mu := 0

0

 

0

(2)

simplify(eval(K))

(1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t))

(3)

simplify((1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t)), 'trig')

(1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t))

(4)

simplify((1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t)))

(1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t))

(5)

simplify((1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t)), 'constant')

(1/2)*2^(3/4)*(((coth(sigma)*(-lambda)^(1/2)*(-a[5]/a[4])^(1/2)+(lambda*a[5]/a[4])^(1/2))*B[2]+csch(sigma)*(lambda*a[5]*B[2]^2/a[4])^(1/2))/B[2])^(1/2)*e^(i*psi(x, t))

(6)
 

 

 

NULL

Download cancelation.mw

Recently a new configuration of a computer, with a better cpu - AMD Ryzen 7 8700G w/ Radeon 780M Graphics, but maple computation is particularly slow, cpu call special less computation is particularly slow, is there any way to improve?

4 5 6 7 8 9 10 Last Page 6 of 352