Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi all guys, first I would express my gratitude to @mmcdara . He helped me construct the matrix polynomial properly. Then on basis of it, I explore more but meet with issues. Notation : v1 and v2 is eigenvalues which consists of complicated expression containg component v and z, now I wanna implicitplot the region: abs(v1)<=1 & abs(v2)<=1 (satisfy at the same time). But I don't know how to command the code. So I define eq1:=( abs(v1)-1)* (abs(v2)<=1) and implicit it. (I know it is false but I just wanna try first). But I command the implicitplot code, the evaluating time is so long(25mins no end still). So I recall the smartplot, I once I have triggered this command, it seems that I put the mouse on the expression result (the end of the blue font), and implicit3d appears in the work bar on the right (of course this is in another file). In the file I uploaded, I tried this but failed. So I want to understand how to ensure that smartplot is triggered 100%? (Because I feel that smartplot runs very fast) and how to draw the desired region (abs(v1)<=1 & abs(v2)<=1)?

restart;
v=lambda*h;
z=mu*h;
k=lambda/mu;

v = lambda*h

 

z = mu*h

 

k = lambda/mu

(1)

with(LinearAlgebra):

A := Matrix([[0, 0, 0], [-(cos(alpha*v)-1)/v^2, 0, 0], [0, -(cos(beta*v)-1)/(cos(alpha*v)*v^2), 0]]);

Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = -(cos(alpha*v)-1)/v^2, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = -(cos(beta*v)-1)/(cos(alpha*v)*v^2), (3, 3) = 0})

(2)

C := Matrix([0, alpha, -beta])

Vector[row](3, {(1) = 0, (2) = alpha, (3) = -beta})

(3)

e := Vector(3, 1)

Vector(3, {(1) = 1, (2) = 1, (3) = 1})

(4)

E := IdentityMatrix(3)

Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

(5)

G := Matrix([[0], [sin(alpha*v)/(alpha*v)], [((sin(beta*v)*cos(alpha*v)+sin(alpha*v)*cos(beta*v)-sin(alpha*v)))/(v*cos(alpha*v)*(beta))]])

Vector(3, {(1) = 0, (2) = sin(alpha*v)/(alpha*v), (3) = (sin(beta*v)*cos(alpha*v)+sin(alpha*v)*cos(beta*v)-sin(alpha*v))/(v*cos(alpha*v)*beta)})

(6)

b := Vector(3, [1/24, (-sin(beta*v)*v^3+12*cos(beta*v)*v^2+24*cos(beta*v)*cos(v)-24*sin(beta*v)*sin(v)+24*sin(beta*v)*v-24*cos(beta*v))/(24*v^3*(cos(beta*v)*sin(alpha*v)+sin(beta*v)*cos(alpha*v))), -(sin(alpha*v)*v^3+12*cos(alpha*v)*v^2+24*cos(v)*cos(alpha*v)+24*sin(v)*sin(alpha*v)-24*v*sin(alpha*v)-24*cos(alpha*v))/(24*v^3*(cos(beta*v)*sin(alpha*v)+sin(beta*v)*cos(alpha*v)))])

Vector(3, {(1) = 1/24, (2) = (1/24)*(-sin(beta*v)*v^3+12*cos(beta*v)*v^2+24*cos(beta*v)*cos(v)-24*sin(beta*v)*sin(v)+24*sin(beta*v)*v-24*cos(beta*v))/(v^3*(sin(beta*v)*cos(alpha*v)+sin(alpha*v)*cos(beta*v))), (3) = -(1/24)*(sin(alpha*v)*v^3+12*cos(alpha*v)*v^2+24*cos(v)*cos(alpha*v)+24*sin(v)*sin(alpha*v)-24*v*sin(alpha*v)-24*cos(alpha*v))/(v^3*(sin(beta*v)*cos(alpha*v)+sin(alpha*v)*cos(beta*v)))})

(7)

bp := Vector(3, [1/12, -(sin(beta*v)*v^2+12*cos(beta*v)*sin(v)-12*cos(beta*v)*v+12*cos(v)*sin(beta*v)-12*sin(beta*v))/(12*v^2*(cos(beta*v)*sin(alpha*v)+sin(beta*v)*cos(alpha*v))), -(sin(alpha*v)*v^2+12*cos(v)*sin(alpha*v)-12*cos(alpha*v)*sin(v)+12*cos(alpha*v)*v-12*sin(alpha*v))/(12*v^2*(cos(beta*v)*sin(alpha*v)+sin(beta*v)*cos(alpha*v)))])

Vector(3, {(1) = 1/12, (2) = -(1/12)*(sin(beta*v)*v^2+12*cos(beta*v)*sin(v)-12*cos(beta*v)*v+12*cos(v)*sin(beta*v)-12*sin(beta*v))/(v^2*(sin(alpha*v)*cos(beta*v)+sin(beta*v)*cos(alpha*v))), (3) = -(1/12)*(sin(alpha*v)*v^2+12*cos(v)*sin(alpha*v)-12*cos(alpha*v)*sin(v)+12*cos(alpha*v)*v-12*sin(alpha*v))/(v^2*(sin(alpha*v)*cos(beta*v)+sin(beta*v)*cos(alpha*v)))})

(8)

L0 := E + z^2 *~ A

Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = -z^2*(cos(alpha*v)-1)/v^2, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = -z^2*(cos(beta*v)-1)/(cos(alpha*v)*v^2), (3, 3) = 1})

(9)

L1 := simplify(L0^(-1))

Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = z^2*(cos(alpha*v)-1)/v^2, (2, 2) = 1, (2, 3) = 0, (3, 1) = z^4*(cos(beta*v)-1)*(1-sec(alpha*v))/v^4, (3, 2) = z^2*(cos(beta*v)-1)*sec(alpha*v)/v^2, (3, 3) = 1})

(10)

AUX := simplify(L1 . G . C . e, size)

Vector(3, {(1) = 0, (2) = sin(alpha*v)*(alpha-beta)/(alpha*v), (3) = -((z^2*beta*sec(alpha*v)*(cos(beta*v)-1)*sin(alpha*v)+v^2*alpha*sin(beta*v))*cos(alpha*v)+sin(alpha*v)*alpha*v^2*(cos(beta*v)-1))*(-alpha+beta)/(v^3*alpha*cos(alpha*v)*beta)})

(11)

N1 := simplify((1 - z^2/2) + z^4 * (b^+ . AUX), size)

(1/24)*(z^4*(cos(beta*v)-1)*(v^3-24*v+24*sin(v))*(-alpha+beta)*(sec(alpha*v)*z^2*beta*cos(alpha*v)+v^2*alpha)*sin(alpha*v)^2-12*(-sec(alpha*v)*z^6*beta*(cos(beta*v)-1)*(v^2+2*cos(v)-2)*(-alpha+beta)*cos(alpha*v)+((2*z^4*(-alpha+beta)^2*cos(v)+(-alpha+beta)^2*(v^2-2)*z^4+v^4*z^2*beta*alpha-2*v^4*beta*alpha)*cos(beta*v)-(1/12)*(-alpha+beta)*z^4*((v^3-24*v+24*sin(v))*(beta+alpha)*sin(beta*v)-12*alpha*(v^2+2*cos(v)-2)))*v^2)*cos(alpha*v)*sin(alpha*v)-12*sin(beta*v)*(-2*(-alpha+beta)*z^4*cos(v)-(v^2-2)*(-alpha+beta)*z^4+v^4*z^2*beta-2*v^4*beta)*v^2*alpha*cos(alpha*v)^2)/(v^6*(sin(alpha*v)*cos(beta*v)+sin(beta*v)*cos(alpha*v))*alpha*cos(alpha*v)*beta)

(12)

N2 := simplify(1 - z^2 * (b^+ . L1 . e), size)

(1/24)*((12*z^4*(v-z)*(v+z)*(v^2+2*cos(v)-2)*(sec(alpha*v)-1)*cos(beta*v)-12*z^4*(v-z)*(v+z)*(v^2+2*cos(v)-2)*sec(alpha*v)-(-24*z^4*sin(v)+(-v^3+24*v)*z^4+v^5*z^2-24*v^5)*v^2*sin(beta*v)+12*z^2*(v-z)*(v+z)*(v^2+z^2)*(v^2+2*cos(v)-2))*cos(alpha*v)+(sin(alpha*v)*z^4*(v-z)*(v+z)*(v^3-24*v+24*sin(v))*sec(alpha*v)+(24*z^6*sin(v)+(v^3-24*v)*z^6-v^7*z^2+24*v^7)*sin(alpha*v)-12*v^2*z^2*(v-z)*(v+z)*(v^2+2*cos(v)-2))*cos(beta*v)+(v^3-24*v+24*sin(v))*(-sin(alpha*v)*z^2*sec(alpha*v)+(v^2+z^2)*sin(alpha*v)+sin(beta*v)*v^2)*z^2*(v+z)*(v-z))/(v^7*(sin(alpha*v)*cos(beta*v)+sin(beta*v)*cos(alpha*v)))

(13)

N3 := simplify(-z^2 + z^4 * (bp^+ . AUX), size)

-(-(1/12)*z^2*(cos(beta*v)-1)*(v^2+12*cos(v)-12)*(-alpha+beta)*(sec(alpha*v)*z^2*beta*cos(alpha*v)+v^2*alpha)*sin(alpha*v)^2+(-sec(alpha*v)*z^4*beta*(cos(beta*v)-1)*(-alpha+beta)*(v-sin(v))*cos(alpha*v)+((-z^2*(-alpha+beta)^2*sin(v)+(z^2*(-alpha+beta)^2+v^2*beta*alpha)*v)*cos(beta*v)-(1/12)*(-alpha+beta)*z^2*((v^2+12*cos(v)-12)*(beta+alpha)*sin(beta*v)-12*alpha*(v-sin(v))))*v^2)*cos(alpha*v)*sin(alpha*v)+sin(beta*v)*((-alpha+beta)*z^2*sin(v)+v*((alpha-beta)*z^2+v^2*beta))*v^2*alpha*cos(alpha*v)^2)*z^2/(v^5*(sin(alpha*v)*cos(beta*v)+sin(beta*v)*cos(alpha*v))*alpha*cos(alpha*v)*beta)

(14)

NULL

N4 := simplify(1 - z^2 * (bp^+ . L1 . e), size):
alpha:= 1/2 + 1/10*sqrt(5);
beta:= -1/2 + 1/10*sqrt(5);
det := simplify(N1*N4 - N2*N3, size):
tr := simplify(N1 + N4, size):
#eq1:=algsubs(v=lambda*h,det):
#eq2:=algsubs(z=mu*h,eq1):
#eq3:=algsubs(lambda=mu*k,eq2):
#eq4:=algsubs(v=lambda*h,eq3):
#csgn(sqrt(mu^10*k^10/v^10)*h^5):=1:
#simplify(series(sqrt(eq4),h,10));
#series(simplify(algsubs(v=,simplify(series(1-sqrt(det),z,8)))),z,8);
#eq1:=(sec(sqrt(5)*z/10)*(-cos(z/2)*z + 12*sin(z/2)) - 5*z)/(24*z*k);
#simplify(eq1);

1/2+(1/10)*5^(1/2)

 

-1/2+(1/10)*5^(1/2)

(15)

lambda1 := (tr-sqrt(tr^2-4*det))*(1/2); lambda2 := (tr+sqrt(tr^2-4*det))*(1/2)

with(plots); with(plots, implicitplot)

eq11 := lambda1*lambda2-abs(lambda1)-abs(lambda2)+1 <= 0

Download 2d_implicit_plot_[v_z].mw

How to get remainder of this two polynomials?

with(Algebraic);
Remainder(a*x^3 + b*x^2 + c*x + d, 3*a*x^2 + 2*b*x + c, x);

I am trying to improve the positioning of the gammas in the diagram (at bottom) as they are too close to the points and lines. gamma1 and gamma2 have been assigned values. This best I could come up with is shown below.

restart;

with(plots):with(plottools):

with(Typesetting):

`gamma2`:=<3|5|2>

Vector[row](3, {(1) = 3, (2) = 5, (3) = 2})

(1)

Pgamma2:=[3/2,5/2]

[3/2, 5/2]

(2)

display(point(Pbeta2,symbol=solidcircle,symbolsize=14),textplot([Pgamma2[],Typeset((`gamma2` )),align={above}]))

 

 

 

Download 2024-07-10_Typeset_gamma.mw

Hello

I am trying to solve some PDEs using Maple.  In one of them, Maple returns

SolL:= HL(x, y, z) = f__1(1/2*(2*sigma*z - x^2)/sigma, rho^2 - 2*rho*z + y^2 + z^2)

How to retrieve only the arguments of f__1?  

Many thanks

I think the question speaks for itself. I tried the search engine and he bring me one link on that subject. But when I click on it, he sent me inside many answers on everyting but that. Not even the right month. So that is why I am asking here again. Of course, I would like to keep the thickmarks and the labels on both axes. Thank you in advance for your help.

The change from _C1 to c__1 is causing me so many problems as I still do not fully understand it.

I have nothing in my Maple ini file. 

I was solving from a solution to an ode for the constant of integration, which I know is c__1 inside a proc.

But this was failing to solve for it. When I copy same code to global (worksheet), it works. So it is clearly issue of name space related to c__1 vs. _C1. 

So even though the solution now has the subscripted version and not the traditional one (since that is the default now), it does not solve for it when inside a proc.

If instead I solve for _C1, then it works. Even though the solution has c__1. This is bizzar to me. 

I also tried adding   global c__1; inside the proc, but this did not help. (did not show this version in the worksheet).

Why is solving for c__1 fail inside a proc but works outside? Clearly the c__1 in the solution of the ode is not the same c__1 I typed in to solve for, even though on the screen they look the same. 

So c__1 is not really the same as _C1 in all aspects. Right?

Here is worksheet. Example 1 below shows how it fails inside proc

Maple 2024.1. Does this happen for others on Linux or the Mac?
 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1767 and is the same as the version installed in this computer, created 2024, June 28, 12:19 hours Pacific Time.`

Example (1) solving for constant of integration fails inside proc but works outside

 

restart;

foo:=proc(ode::`=`)
local sol,the_constant;
   sol:=dsolve(ode);
   print("sol is ",sol);
   the_constant:=solve(sol,c__1);
   print("the constant is ",the_constant);
end proc;

proc (ode::`=`) local sol, the_constant; sol := dsolve(ode); print("sol is ", sol); the_constant := solve(sol, c__1); print("the constant is ", the_constant) end proc

#this does not work
ode:=diff(y(x),x) = 3/4*y(x)/x;
foo(ode)

diff(y(x), x) = (3/4)*y(x)/x

"sol is ", y(x) = c__1*x^(3/4)

"the constant is "

restart;

#this works
ode:=diff(y(x),x) = 3/4*y(x)/x;
sol:=dsolve(ode);
print("sol is ",sol);
the_constant:=solve(sol,c__1);

diff(y(x), x) = (3/4)*y(x)/x

y(x) = c__1*x^(3/4)

"sol is ", y(x) = c__1*x^(3/4)

y(x)/x^(3/4)

 

Example (2). Solving for _C1 works, even though the ode has c__1  , why??

 

restart;

foo:=proc(ode::`=`)
local sol,the_constant;
   sol:=dsolve(ode);
   print("sol is ",sol);
   the_constant:=solve(sol,_C1);  #notice solving for _C1 now
   print("the constant is ",the_constant);
end proc;

proc (ode::`=`) local sol, the_constant; sol := dsolve(ode); print("sol is ", sol); the_constant := solve(sol, _C1); print("the constant is ", the_constant) end proc

ode:=diff(y(x),x) = 3/4*y(x)/x;
foo(ode)

diff(y(x), x) = (3/4)*y(x)/x

"sol is ", y(x) = c__1*x^(3/4)

"the constant is ", y(x)/x^(3/4)

restart;

ode:=diff(y(x),x) = 3/4*y(x)/x;
sol:=dsolve(ode);
print("sol is ",sol);
the_constant:=solve(sol,c__1); #these both work OK in global
the_constant:=solve(sol,_C1);  #these both work OK in global

diff(y(x), x) = (3/4)*y(x)/x

y(x) = c__1*x^(3/4)

"sol is ", y(x) = c__1*x^(3/4)

y(x)/x^(3/4)

y(x)/x^(3/4)

 

 

Example (3). Forcing arbitraryconstants = subscripted it still does not work inside proc. Why??

 

restart;

foo:=proc(ode::`=`)
local sol,the_constant;
   sol:=dsolve(ode,arbitraryconstants = subscripted);   
   print("sol is ",sol);
   the_constant:=solve(sol,c__1);
   print("the constant is ",the_constant);
end proc;

proc (ode::`=`) local sol, the_constant; sol := dsolve(ode, arbitraryconstants = subscripted); print("sol is ", sol); the_constant := solve(sol, c__1); print("the constant is ", the_constant) end proc

ode:=diff(y(x),x) = 3/4*y(x)/x;
foo(ode)

diff(y(x), x) = (3/4)*y(x)/x

"sol is ", y(x) = c__1*x^(3/4)

"the constant is "

 


 

Download constant_of_integration_solving_july_9_2024_maple_2024.mw

 

I would like to apply my self-defined gauge covariant derivative (7) to the scalar field (9) in the form Dagger(D_mu Phi) (D^mu Phi) (13). But when I do this, my result does not look right. It seems that Maple does not treat my covariant derivative as a differential operator (or I did not tell Maple how to interpret it correctly). Also, my result (16) should not contain any matrices, after all I am calculating the scalar product of two vectors.

Can someone help me to determine the scalar product (D_mu Phi) (D^mu Phi) correctly? 

Could my error perhaps be due to the dimensions of my Pauli matrices? They are 2x2 and not 4x4.

Phi_Field.mw

Hi all guys, when i am doing error analysis but I meet with an problem. I get the trace and determinant of one matrix which consists a lot trigonometric functions. I wanna get the approximation error order of trace and determinant (Like tr=2+O(v^6),det=1+O(v^6)). But I use Taylor expansion and series, it displays can't compute the series. How to know the other ways to get the error order of it? Thanks all !phase_error_try.mw

restart

c[2] := 1/2+(1/10)*sqrt(5); c[3] := 1/2-(1/10)*sqrt(5)

1/2+(1/10)*5^(1/2)

 

1/2-(1/10)*5^(1/2)

(1)

with(LinearAlgebra)

``

A := Matrix([[0, 0, 0], [-(cos((1/10)*(5+sqrt(5))*v)-1)/v^2, 0, 0], [0, -(cos((1/10)*(-5+sqrt(5))*v)-1)/(cos((1/10)*(5+sqrt(5))*v)*v^2), 0]])

C := Matrix([0, 1/2+(1/10)*sqrt(5), 1/2-(1/10)*sqrt(5)])

Matrix(%id = 36893490461606184468)

(2)

e := Matrix([[1], [1], [1]])

Matrix(%id = 36893490461606180252)

(3)

E := Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

Matrix(%id = 36893490461606177116)

(4)

G := Matrix([[0], [10*sin((1/10)*(5+sqrt(5))*v)/((5+sqrt(5))*v)], [(10*(sin((1/10)*(-5+sqrt(5))*v)*cos((1/10)*(5+sqrt(5))*v)+sin((1/10)*(5+sqrt(5))*v)*cos((1/10)*(-5+sqrt(5))*v)-sin((1/10)*(5+sqrt(5))*v)))/(v*cos((1/10)*(5+sqrt(5))*v)*(-5+sqrt(5)))]])

b := Matrix([1/24, (-sin((1/10)*v*(-5+sqrt(5)))*v^3+12*cos((1/10)*v*(-5+sqrt(5)))*v^2+24*cos((1/10)*v*(-5+sqrt(5)))*cos(v)-24*sin((1/10)*v*(-5+sqrt(5)))*sin(v)+24*sin((1/10)*v*(-5+sqrt(5)))*v-24*cos((1/10)*v*(-5+sqrt(5))))/(24*v^3*(cos((1/10)*v*(-5+sqrt(5)))*sin((1/10)*v*(5+sqrt(5)))+sin((1/10)*v*(-5+sqrt(5)))*cos((1/10)*v*(5+sqrt(5))))), -(sin((1/10)*v*(5+sqrt(5)))*v^3+12*cos((1/10)*v*(5+sqrt(5)))*v^2+24*cos(v)*cos((1/10)*v*(5+sqrt(5)))+24*sin(v)*sin((1/10)*v*(5+sqrt(5)))-24*v*sin((1/10)*v*(5+sqrt(5)))-24*cos((1/10)*v*(5+sqrt(5))))/(24*v^3*(cos((1/10)*v*(-5+sqrt(5)))*sin((1/10)*v*(5+sqrt(5)))+sin((1/10)*v*(-5+sqrt(5)))*cos((1/10)*v*(5+sqrt(5)))))])

bp := Matrix([1/12, -(sin((1/10)*v*(-5+sqrt(5)))*v^2+12*cos((1/10)*v*(-5+sqrt(5)))*sin(v)-12*cos((1/10)*v*(-5+sqrt(5)))*v+12*cos(v)*sin((1/10)*v*(-5+sqrt(5)))-12*sin((1/10)*v*(-5+sqrt(5))))/(12*v^2*(cos((1/10)*v*(-5+sqrt(5)))*sin((1/10)*v*(5+sqrt(5)))+sin((1/10)*v*(-5+sqrt(5)))*cos((1/10)*v*(5+sqrt(5))))), -(sin((1/10)*v*(5+sqrt(5)))*v^2+12*cos(v)*sin((1/10)*v*(5+sqrt(5)))-12*cos((1/10)*v*(5+sqrt(5)))*sin(v)+12*cos((1/10)*v*(5+sqrt(5)))*v-12*sin((1/10)*v*(5+sqrt(5))))/(12*v^2*(cos((1/10)*v*(-5+sqrt(5)))*sin((1/10)*v*(5+sqrt(5)))+sin((1/10)*v*(-5+sqrt(5)))*cos((1/10)*v*(5+sqrt(5)))))])

L1 := 1/simplify(E+v^2.A); N1 := simplify(1-(1/2)*v^2+v^4*(b.L1.G.C.e)); N11 := (Typesetting[delayDotProduct](sin((1/10)*v*(5+sqrt(5)))*((v^3-24*v+24*sin(v))*sin((1/10)*v*(5+sqrt(5)))+12*cos((1/10)*v*(5+sqrt(5)))*(v^2+2*cos(v)-2))*(-5+sqrt(5)), v^2.((cos((1/10)*v*(-5+sqrt(5)))-1)*sec((1/10)*v*(5+sqrt(5)))/v^2), true)+((cos((1/10)*v*(-5+sqrt(5)))-1)*(v^3-24*v+24*sin(v))*(5+sqrt(5))*tan((1/10)*v*(5+sqrt(5)))+(96*v^2+240*cos(v)-192)*cos((1/10)*v*(-5+sqrt(5)))+2*sqrt(5)*(v^3-24*v+24*sin(v))*sin((1/10)*v*(-5+sqrt(5)))-(12*(v^2+2*cos(v)-2))*(5+sqrt(5)))*sin((1/10)*v*(5+sqrt(5)))+12*cos((1/10)*v*(5+sqrt(5)))*sin((1/10)*v*(-5+sqrt(5)))*(-6+(v^2+2*cos(v)-2)*sqrt(5)+3*v^2+10*cos(v)))/(48*sin((1/10)*v*(-5+sqrt(5)))*cos((1/10)*v*(5+sqrt(5)))+48*sin((1/10)*v*(5+sqrt(5)))*cos((1/10)*v*(-5+sqrt(5))))

Matrix(%id = 36893490461639877084)

(5)

N2 := simplify(1-v^2*b.L1.e); N22 := (Typesetting[delayDotProduct](((12*v^2+24*cos(v)-24)*cos((1/10)*(5+sqrt(5))*v)+(v^3-24*v+24*sin(v))*sin((1/10)*(5+sqrt(5))*v))*(v^2.((cos((1/10)*(5+sqrt(5))*v)-1)/v^2)+1), v^2.((cos((1/10)*(-5+sqrt(5))*v)-1)*sec((1/10)*(5+sqrt(5))*v)/v^2), true)+Typesetting[delayDotProduct]((-12*v^2-24*cos(v)+24)*cos((1/10)*(-5+sqrt(5))*v)+sin((1/10)*(-5+sqrt(5))*v)*(v^3-24*v+24*sin(v)), v^2.((cos((1/10)*(5+sqrt(5))*v)-1)/v^2), true)+((-v^3+24*v)*sin((1/10)*(-5+sqrt(5))*v)+12*v^2+24*cos(v)-24)*cos((1/10)*(5+sqrt(5))*v)+((-v^3+24*v)*cos((1/10)*(-5+sqrt(5))*v)+v^3-24*v+24*sin(v))*sin((1/10)*(5+sqrt(5))*v)+(-12*v^2-24*cos(v)+24)*cos((1/10)*(-5+sqrt(5))*v)+sin((1/10)*(-5+sqrt(5))*v)*(v^3-24*v+24*sin(v)))/(24*v*(sin((1/10)*(-5+sqrt(5))*v)*cos((1/10)*(5+sqrt(5))*v)+sin((1/10)*(5+sqrt(5))*v)*cos((1/10)*(-5+sqrt(5))*v)))

Matrix(%id = 36893490461606200972)

(6)

N3 := simplify(-v^2+v^4*bp.L1.G.C.e); N33 := v*(Typesetting[delayDotProduct](((v^2+12*cos(v)-12)*sin((1/10)*(5+sqrt(5))*v)+12*cos((1/10)*(5+sqrt(5))*v)*(v-sin(v)))*sin((1/10)*(5+sqrt(5))*v)*(-5+sqrt(5)), v^2.((cos((1/10)*(-5+sqrt(5))*v)-1)*sec((1/10)*(5+sqrt(5))*v)/v^2), true)+((cos((1/10)*(-5+sqrt(5))*v)-1)*(v^2+12*cos(v)-12)*(5+sqrt(5))*tan((1/10)*(5+sqrt(5))*v)+(96*v-120*sin(v))*cos((1/10)*(-5+sqrt(5))*v)+2*sqrt(5)*(v^2+12*cos(v)-12)*sin((1/10)*(-5+sqrt(5))*v)-(12*(5+sqrt(5)))*(v-sin(v)))*sin((1/10)*(5+sqrt(5))*v)+12*cos((1/10)*(5+sqrt(5))*v)*sin((1/10)*(-5+sqrt(5))*v)*((v-sin(v))*sqrt(5)+3*v-5*sin(v)))/(24*cos((1/10)*(5+sqrt(5))*v)*sin((1/10)*(-5+sqrt(5))*v)+24*sin((1/10)*(5+sqrt(5))*v)*cos((1/10)*(-5+sqrt(5))*v))

Matrix(%id = 36893490461733603676)

(7)

N4 := simplify(1-v^2*bp.L1.e); N44 := (Typesetting[delayDotProduct](((v^2+12*cos(v)-12)*sin((1/10)*(5+sqrt(5))*v)+12*cos((1/10)*(5+sqrt(5))*v)*(v-sin(v)))*(v^2.((cos((1/10)*(5+sqrt(5))*v)-1)/v^2)+1), v^2.((cos((1/10)*(-5+sqrt(5))*v)-1)*sec((1/10)*(5+sqrt(5))*v)/v^2), true)+Typesetting[delayDotProduct]((v^2+12*cos(v)-12)*sin((1/10)*(-5+sqrt(5))*v)-12*cos((1/10)*(-5+sqrt(5))*v)*(v-sin(v)), v^2.((cos((1/10)*(5+sqrt(5))*v)-1)/v^2), true)+(-cos((1/10)*(-5+sqrt(5))*v)*v^2+v^2+12*cos(v)+12*cos((1/10)*(-5+sqrt(5))*v)-12)*sin((1/10)*(5+sqrt(5))*v)+(-sin((1/10)*(-5+sqrt(5))*v)*v^2+12*v-12*sin(v)+12*sin((1/10)*(-5+sqrt(5))*v))*cos((1/10)*(5+sqrt(5))*v)+(v^2+12*cos(v)-12)*sin((1/10)*(-5+sqrt(5))*v)-12*cos((1/10)*(-5+sqrt(5))*v)*(v-sin(v)))/(12*sin((1/10)*(-5+sqrt(5))*v)*cos((1/10)*(5+sqrt(5))*v)+12*sin((1/10)*(5+sqrt(5))*v)*cos((1/10)*(-5+sqrt(5))*v))

Matrix(%id = 36893490461606185188)

(8)

tr := N11+N44

det := N11*N44-N22*N33

expand(det, v, 10)

Warning,  computation interrupted

 

` `

(9)

NULL

NULL


 

Download phase_error_try.mw

pansion)

I have a command called Dual in a SubPackage. RationalTrigonometry:-UHG:-Dual(..). I cannot get the hyperlink from the overview page to work.i.e RationalTrigonometry,UHG,Dual If I use Dual on its own it finds another Maple command to do with boolean logic. What syntax should I use here? I have used RationalTrigonometry,Spread without a problem to avoid another Maple command.

 

Good afternoon, please how to factor the following polynomial so that it gives me the following result:

x^10/36 - 4/25*y^24*z^8 = (x^5/6 - 2/5*y^12*z^4)*(x^5/6 + 2/5*y^12*z^4)

This worksheet below has a very large test expression I use with Maple. It is just for testing.

Maple 2024.1 on windows 10. 128 GB RAM. Fast PC.

Someone in another question asked me to post this test worksheet for them to try also.

My question is: Why Maple expand hangs on it, even though I have timelimit?

I am not printing this at all. This is actually is run in .mpl file, but I am posting worksheet version here.

I am not asking about the printing of the expression. But about the timelimit hanging. This is the big problem for me. If timelimit hangs, my program hangs and no workaround.

Here is the worksheet below. The expression is 373,000 leave size, which is huge. Still, Maple should not hang and more important, timelimit should not hang as it was supposed to have been fixed in the year 2021.

Make sure to save all your work before running this.

Since expression is very large, I will only post link and not display the content here as well.

 

why_timelimit_hang.mw

 

At the bottom of the worksheet, there is one command that does print(e); which will hang Maple. so make sure to save your work if you want to run this command.

There is also second command after that, which is my question is about., It does

try
   timelimit(20,expand(e)):
catch:
   print("Timed out OK");
end try:

And this hangs.

My question is why and is there a workaround? I know it is large expression, but there is a timeout there. Maple should have timedout. Right?

 

I added radnormal(sol) to my solution to workaround bug in solve hanging

But now new problem showed up. sometimes radnormal gives internal error when there are _Z's in solution.

radnormal(sol);
Error, (in RootOf) _Z occurs but is not the dependent variable
 

Attached worksheet. Sorry that the solution is very large and has lots of _Zs and RootOf, but this is the first one I can see so far in the log file of my program running, so I left it as is:

Should I check in my code that solution does not contain _Z before calling radnormal on it?  Is this a bug or known limitation?
 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1767 and is the same as the version installed in this computer, created 2024, June 28, 12:19 hours Pacific Time.`

sol:=1/6*(-a^3 - 3*RootOf(4*_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2) + 54*_Z)^(2/3) - a*(8*_Z^3 + 6*_Z^2*a - 3*_Z*a^2 - a^3 + 3*sqrt(3)*sqrt(-4*_Z^4*a^2 - 4*_Z^3*a^3 - _Z^2*a^4 + 32*_Z^4 + 24*_Z^3*a - 12*_Z^2*a^2 - 4*_Z*a^3 + 108*_Z^2) + 54*_Z)^(1/3) + a^2):

radnormal(sol);

Error, (in RootOf) _Z occurs but is not the dependent variable

 


 

Download bug_Z.mw

I have had this a few times this week since updating to 2024.1 on Windows 10.

I get sudden freezes in a worksheet. The !!! button greys out. The ! button is ok, so the worksheet can be run by using ctrl A and click !

Has anyone else experienced this?

I was about to verify two solutions of dsolve from here but could not find an agreement for negative values. This makes me wonder if all values are computed.

There is also a different behaviour that I do not understand when allvalues is given a RootOf expression or an equation containing a RootOf expression.
 

dsolve without method

ode:=diff(y(x), x) = (3*x - y(x) + 1)/(3*y(x) - x + 5);
ic:=y(0)=0;
dsolve({ode,ic});
plot(rhs(%),x=-10..10,numpoints=10);
evalf(subs(x=3,%%));
evalf(subs(x=-3,%%%));

diff(y(x), x) = (3*x-y(x)+1)/(3*y(x)-x+5)

 

y(0) = 0

 

y(x) = -(-(1/36)*(x+1)^2*((-324+12*(96*x^3+288*x^2+288*x+825)^(1/2))^(2/3)-24*x-24)^2/(-324+12*(96*x^3+288*x^2+288*x+825)^(1/2))^(2/3)-x^3-x^2+x+1)/(x+1)^2

 

 

y(3) = 2.135964164

 

y(-3) = -2.302775638+0.4883358175e-9*I

(1)

dsolve with a particular method

sol:=dsolve([ode,ic],[dAlembert]);
odetest(sol,[ode,ic]);

y(x) = RootOf(-6*((x+_Z+3)/(5+3*_Z-x))^(2/3)*(-4*(-x+_Z+1)/(5+3*_Z-x))^(1/3)*_Z+2*((x+_Z+3)/(5+3*_Z-x))^(2/3)*(-4*(-x+_Z+1)/(5+3*_Z-x))^(1/3)*x+2*(-4)^(1/3)*3^(2/3)-10*((x+_Z+3)/(5+3*_Z-x))^(2/3)*(-4*(-x+_Z+1)/(5+3*_Z-x))^(1/3))

 

[0, 0]

(2)

Since allvalues fails on this expression for real valued x, rational and integer values are tried for punctual comaprision

subs(x=3,sol);
allvalues(%);
evalf(%)

y(3) = RootOf(-6*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)*_Z-4*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)+2*(-4)^(1/3)*3^(2/3))

 

y(3) = (6873/256)*(-(4/6873)*(20994724+82476*6873^(1/2))^(1/3)-(128/3)/(20994724+82476*6873^(1/2))^(1/3)+1/3-((1/2)*I)*3^(1/2)*((8/6873)*(20994724+82476*6873^(1/2))^(1/3)-(256/3)/(20994724+82476*6873^(1/2))^(1/3)))^2+(1/96)*(20994724+82476*6873^(1/2))^(1/3)+(2291/3)/(20994724+82476*6873^(1/2))^(1/3)-8947/768+((2291/256)*I)*3^(1/2)*((8/6873)*(20994724+82476*6873^(1/2))^(1/3)-(256/3)/(20994724+82476*6873^(1/2))^(1/3)), y(3) = (6873/256)*((8/6873)*(20994724+82476*6873^(1/2))^(1/3)+(256/3)/(20994724+82476*6873^(1/2))^(1/3)+1/3)^2-(1/48)*(20994724+82476*6873^(1/2))^(1/3)-(4582/3)/(20994724+82476*6873^(1/2))^(1/3)-8947/768, y(3) = (6873/256)*((8/6873)*(20994724+82476*6873^(1/2))^(1/3)+(256/3)/(20994724+82476*6873^(1/2))^(1/3)+1/3)^2-(1/48)*(20994724+82476*6873^(1/2))^(1/3)-(4582/3)/(20994724+82476*6873^(1/2))^(1/3)-8947/768

 

y(3) = -6.067982077+1.049560864*I, y(3) = 2.13596417, y(3) = 2.13596417

(3)

Two roots match the dsolve solution without method. However doing the same only on the right hand side produces different output. For some reason allvalues produces 3 RootOf expressions with a numerical root selector.

subs(x=3,rhs(sol));
allvalues(%);
evalf(%)

RootOf(-6*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)*_Z-4*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)+2*(-4)^(1/3)*3^(2/3))

 

RootOf((3*I)*3^(1/6)*2^(2/3)+2^(2/3)*3^(2/3)-6*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)*_Z-4*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3), -6.067982082+1.049560860*I), RootOf((3*I)*3^(1/6)*2^(2/3)+2^(2/3)*3^(2/3)-6*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)*_Z-4*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3), 2.135964164), RootOf((3*I)*3^(1/6)*2^(2/3)+2^(2/3)*3^(2/3)-6*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3)*_Z-4*((6+_Z)/(2+3*_Z))^(2/3)*(-4*(-2+_Z)/(2+3*_Z))^(1/3), 2.135964164-0.*I)

 

-6.067982082+1.049560860*I, 2.135964164, -6.067982082+1.049560860*I

(4)

Why this change?
Now the same with a negative value. Now the root does not match the solution of the dsolve call without method.

subs(x=-3,sol);
allvalues(%);
evalf(%)

y(-3) = RootOf(-6*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3)*_Z-16*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3)+2*(-4)^(1/3)*3^(2/3))

 

y(-3) = -1/2+(1/2)*13^(1/2)

 

y(-3) = 1.302775638

(5)

subs(x = -3, rhs(sol));
allvalues(%);
evalf(%);

RootOf(-6*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3)*_Z-16*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3)+2*(-4)^(1/3)*3^(2/3))

 

RootOf((3*I)*3^(1/6)*2^(2/3)-6*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3)*_Z+2^(2/3)*3^(2/3)-16*(_Z/(8+3*_Z))^(2/3)*(-4*(4+_Z)/(8+3*_Z))^(1/3), 1.302775638+0.*I)

 

1.302775638

(6)

NULL

 

NULL


 

Download allvalues.mw

I gave up trying to figure out why Maple sometimes generates solutions from my code that look different, running the same exact code. I know Maple is not deterministic and this can happen sometimes for reasons I will never know.

The following two solutions are the same, it just sometimes Maple shuffles terms a little around. For example SQRT(6) comes out SQRT(2)*SQRT(3).  I have no idea why this happens. It could be how memory inside Maple happened to be at the time and what happened before.

But my question is the following. Here is one ode, and two solutions that are exactly the same. I called one good_sol and one bad_sol.

If I do simplify(bad_sol - good_sol) I get  0 = 0 but here is the problem. When calling odetest on the good_sol, Maple returns 0 instantly,  But on the bad_sol it just hangs.

Even though the two solution are exactly the same. i.e. Mathematically the same.  

I'd like to know why does this happen? And if there is a permanent fix I could always use.

The following worksheet shows this problem.

After much trial and error, I found that if I do radnormal(bad_sol) then now odetest returns zero right away and the hang is gone!

I am just trying to understand why. And why odetest then itself does not use radnormal if this makes it work better?

Do I need to call randormal on every solution before calling odetest then? Will calling randormal on the final solution have any bad side effects on other computation after that?  It should not I would think.

This is all done in code without looking at the screen and having to decide. So I would need a solution that will work for all cases. But for now, I will change my code and add randormal to all solutions and see what happens.

Using 2024.1 on windows.   May be Maple behaves different on macOS, I do not know.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1767 and is the same as the version installed in this computer, created 2024, June 28, 12:19 hours Pacific Time.`

restart;

ode:=4*x*diff(y(x),x)^2-3*y(x)*diff(y(x),x)+3 = 0;

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

bad_sol:=ln(x) - c__1 - 1/2*ln((y(x)^2 - 6*x)/x) - 3*ln((sqrt(3)*y(x) + sqrt((3*y(x)^2 - 16*x)/x)*sqrt(x))/sqrt(x)) + 1/2*arctanh(1/2*(-16*sqrt(x) + 3*y(x)*sqrt(2)*sqrt(3))*sqrt(2)/(sqrt((3*y(x)^2 - 16*x)/x)*sqrt(x))) + 1/2*arctanh(1/2*(16*sqrt(x) + 3*y(x)*sqrt(2)*sqrt(3))*sqrt(2)/(sqrt((3*y(x)^2 - 16*x)/x)*sqrt(x))) = 0;

ln(x)-c__1-(1/2)*ln((y(x)^2-6*x)/x)-3*ln((3^(1/2)*y(x)+((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2))/x^(1/2))+(1/2)*arctanh((1/2)*(-16*x^(1/2)+3*y(x)*2^(1/2)*3^(1/2))*2^(1/2)/(((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2)))+(1/2)*arctanh((1/2)*(16*x^(1/2)+3*y(x)*2^(1/2)*3^(1/2))*2^(1/2)/(((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2))) = 0

good_sol:=ln(x) - c__1 - 1/2*ln((y(x)^2 - 6*x)/x) - 3*ln((sqrt(3)*y(x) + sqrt(x)*sqrt((3*y(x)^2 - 16*x)/x))/sqrt(x)) + 1/12*sqrt(3)*sqrt(6)*sqrt(2)*arctanh(1/2*(-16*sqrt(x) + 3*y(x)*sqrt(6))*sqrt(2)/(sqrt(x)*sqrt((3*y(x)^2 - 16*x)/x))) + 1/12*sqrt(3)*arctanh(1/2*(16*sqrt(x) + 3*y(x)*sqrt(6))*sqrt(2)/(sqrt(x)*sqrt((3*y(x)^2 - 16*x)/x)))*sqrt(6)*sqrt(2) = 0;
 

ln(x)-c__1-(1/2)*ln((y(x)^2-6*x)/x)-3*ln((3^(1/2)*y(x)+((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2))/x^(1/2))+(1/12)*3^(1/2)*6^(1/2)*2^(1/2)*arctanh((1/2)*(-16*x^(1/2)+3*y(x)*6^(1/2))*2^(1/2)/(((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2)))+(1/12)*3^(1/2)*arctanh((1/2)*(16*x^(1/2)+3*y(x)*6^(1/2))*2^(1/2)/(((3*y(x)^2-16*x)/x)^(1/2)*x^(1/2)))*6^(1/2)*2^(1/2) = 0

simplify(bad_sol-good_sol)

0 = 0

odetest(good_sol,ode); #instant answer

0

odetest(bad_sol,ode); #hangs

Warning,  computation interrupted

 

radnormal(bad_sol)

ln(x)-c__1-(1/2)*ln((y(x)^2-6*x)/x)-3*ln((y(x)*x^(1/2)*3^(1/2)+x*(-(-3*y(x)^2+16*x)/x)^(1/2))/x)+(1/2)*arctanh((-(-3*y(x)^2+16*x)/x)^(1/2)*(3*y(x)*x^(1/2)*3^(1/2)-8*2^(1/2)*x)/(3*y(x)^2-16*x))+(1/2)*arctanh((-(-3*y(x)^2+16*x)/x)^(1/2)*(3*y(x)*x^(1/2)*3^(1/2)+8*2^(1/2)*x)/(3*y(x)^2-16*x)) = 0

odetest(%,ode); #instant answer

0

 


 

Download why_same_sol_hangs_july_7_2024.mw

 

1 2 3 4 5 6 7 Last Page 3 of 2126