MaplePrimes Questions

Search Questions:

The following page of the documentation cites an article from the newsletter which I would be very interested in reading: 

- https://www.maplesoft.com/support/help/view.aspx?path=assume

The full citation for the article I'm interested in is as follows:
 

  

Corless, Robert, and Monagan, Michael. "Simplification and the Assume Facility." Maple Technical Newsletter, Vol. 1 No. 1. Birkhauser, 1994.

Hello,

I have updated to maple 2024 on both my desktop and my laptop, and now I am missing the feature "Convert Output Units:" in the context tab on my windows 11 laptop. It's still available on my windows 10 desktop.

I have tried reinstalling maple and installing java, but it unfortunately did not help. Due to limited school licences, I am unable to test with maple 2023.

Is this an issue you have heard of?

Thank you in advance,

Daniel

 

And here is the context menu on windows 11. Also nothing happens when I click "Format -> Convert Output Units" in the top menu. 

 

Hello, i have been drawing some cool 3d plots for my assignment, but when i use the export button and export it as pdf the plots turn out very low quality. 

See the image below is using the export function

Then i tried something different i tried using the print button and printing to a pdf.

That resulted in a different looking plot

This plot using the print to pdf feature looks much nicer, but the 3d text plot has become impossible to read.

 

Is there a way to fix that? Or to make the export to pdf feature export at higher quality? 

Best Regards

I have a list of values in the range from 1 to 6 inclusive:

    [> y := [ seq(rand(1..6)(), i = 1..10) ] : # step 1

I would like to replace all elements <= 3 with -1 and all elements > 3 with 1

    [> y := subs(1=-1, 2=-1, 3=-1, 4=1, 5=1, 6=1, y) : # step 2

Then calculate the cumulative sum

    [> y := [ seq(add(y[ .. i]), i = 1..n) ] : # step 3

And plot the results

    [> plot([ seq(i, i = 1..n) ], y) # step 4
 

This all works, but step 2 is downright ugly. Is there a more elegant expression available?

And step 4 requires I generate an extra data set for the x-axis. Is there a way to specify just the the y-values and have Maple assume the x-values are in the range  1..nops(y)? (Something akin to just  plot(y), which produces output I don't understand.)

By way of example, I am trying to replicate this MATLAB expression:

    > y = cumsum(2*(randi(6, 10, 1) <= 3) - 1); plot(y)

 

 

restart;
Fig:=proc(t)
local a,b,c,A,B,C,Oo,P,NorA,NorB,NorC,lieu,Lieu,dr,tx:
uses plots, geometry;
a := 11:b := 7:
c := sqrt(a^2 - b^2):

point(A, a*cos(t), b*sin(t)):
point(B, a*cos(t + 2/3*Pi), b*sin(t + 2/3*Pi)):
point(C, a*cos(t + 4/3*Pi), b*sin(t + 4/3*Pi)):
point(Oo,0,0):
lieu:=a^2*x^2+b^2*y^2-c^4/4=0:
Lieu := implicitplot(lieu, x = -a .. a, y = -b .. b, color = green):

line(NorA, y-coordinates(A)[2] =((a^2*coordinates(A)[2])/(b^2*coordinates(A)[1]))*(x-coordinates(A)[1]),[x, y]):
line(NorB, y-coordinates(B)[2] =((a^2*coordinates(B)[2])/(b^2*coordinates(B)[1]))*(x-coordinates(B)[1]), [x, y]):
line(NorC, y-coordinates(C)[2] =((a^2*coordinates(C)[2])/(b^2*coordinates(C)[1]))*(x-coordinates(C)[1]),[x, y]):
intersection(P,NorA,NorB):

ellipse(p, x^2/a^2 + y^2/b^2 - 1, [x, y]);

tx := textplot([[coordinates(A1)[], "A"],[coordinates(A2)[], "B"], [coordinates(C)[], "C"], [coordinates(Oo)[], "O"],#[coordinates(P)[], "P"]], font = [times, bold, 16], align = [above, left]):
dr := draw([p(color = blue),NorA(color=red,NorB(color=red),NorC(color=red),p(color=blue),
Oo(color = black, symbol = solidcircle, symbolsize = 8), P(color = black, symbol = solidcircle, symbolsize = 8)]):
display(dr,tx,Lieu,scaling=constrained, axes=none,title = "Les triangles inscrits dans une ellipse ont leur centre de gravité en son centre . Lieu du point de concours des perpendicalaires issues des sommets", titlefont = [HELVETICA, 14]);
end:

Error, `:=` unexpected
plots:-animate(Fig, [t], t=0.1..2*Pi, frames=150);
 

Let X1, ...XN  names of RandomVariable type and R a random variable defined as a function of  X1, ...XN.
(In Maple type(R, RandomVariable) returns false as R doesn't inherit the RandomVariable type.)

Given an expression of R I would like to determine if R is :

  • either a linear combination of X1, ...XN ,
    example R = a*X+ X+ 1
    (I know how to handle this situation)
     
  • or a linear combination of products of the X1, ...XN ,
    example R = a*X1*X+ b*X3
    (I feel I know how to handle this situation too)
     
  • or a linear combination of functions, or products of functions, of  X1, ...XN .
    example R = a*f(X1, X2) + b*X3*g(X4) + c*X1 + d*X1*X2
    (here I've no idea at all)

In the command hastype(R, some_type), how can I construct type some_type in order it returns an answer which matches the reqierements above?

RV_Type.mw

Thanks in advance for any suggestion

page 37 of book Symmetry Methods for Differential Equations by Hydon gives this example

When I wanted to verify it using Maple., symgen did not find these symmetries. Only when I give it using HINT the exact form it find them.  


 

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 1843 and is the same as the version installed in this computer, created 2025, January 25, 22:5 hours Pacific Time.`

libname;

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

restart;

ode:=diff(y(x),x) = (y(x)^3+y(x)-3*x^2*y(x))/(3*x*y(x)^2+x-x^3)

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

the_syms:=DEtools:-symgen(ode)

the_syms:=DEtools:-symgen(ode,'way'='all')

the_syms:=DEtools:-symgen(ode,'way'='formal')

#only when I give it the exact general form, it finds them !
the_syms:=DEtools:-symgen(ode,'HINT'=[a*y^3+b*y-c*x^2*y,d*x^3-e*x-f*x*y^2])

[_xi = -3*x^2*y+y^3+y, _eta = x*(x^2-3*y^2-1)]

 


 

Download why_no_syms_feb_10_2025.mw

Is this expected? Should it not have found them on its own?

Is it possible Maple internally does not automatically try Ansatz  of polynomials higher than quadratic to keep computation time low?   If so, I wonder if there is a way to tell it to try cubic or higher orders (like tryhard) option but for symgen?  I will search help more to see if there is a way to do this...

In trying to evaluate the accuracy of an asymptotic approximation, I asked evalf to return the numerical value of the difference of two expressions.  It evaluated each expression but would not take their difference (see line 6).  Any idea what's going on?

restart

g := exp(-r*cosh(x))*x^(2*n); G := Int(g, x = 0 .. infinity)

Int(exp(-r*cosh(x))*x^(2*n), x = 0 .. infinity)

(1)

f0 := arccosh(1+y); df0 := diff(f0, y)

1/(y^(1/2)*(2+y)^(1/2))

(2)

f := f0^(2*n)*df0

arccosh(1+y)^(2*n)/(y^(1/2)*(2+y)^(1/2))

(3)

n := 2; series(f, y)

2*2^(1/2)*y^(3/2)-(7/6)*2^(1/2)*y^(5/2)+(47/80)*2^(1/2)*y^(7/2)-(17281/60480)*2^(1/2)*y^(9/2)+O(y^(11/2))

(4)

r := 6; evalf(G)

0.8560816424e-4

(5)

Ghat := exp(-r)*(2*sqrt(2)*GAMMA(5/2)*`-`*(7*sqrt(2)*(1/6))/r^(5/2)*(GAMMA(7/2)/r^(7/2))); Ghat1 := evalf(Ghat)

0.1056905544e-3-0.2568867641e-4*``

(6)

evalf(Ghat1)

0.1056905544e-3-0.2568867641e-4*``

(7)

 

Download asyapprox.mw

I am working with an expression in Maple that involves complex terms and an integral. After applying the simplify command, some terms remain unsimplified, even though they seem reducible (see (7)). Additionally, an integral in my expression remains unevaluated (see (9)).
 

restart;

kernelopts(version);

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

with(plots)

interface(showassumed=0):

assume(x::real);assume(t::real);assume(lambda1::complex);assume(b::real);

alias(psi1 = psi1(x,t), psi2 = psi2(x,t), phi1 = phi1(x,t), phi2 = phi2(x,t), beta = beta(t), alpha =alpha(t));

psi1, psi2, phi1, phi2, beta, alpha

(2)

rel := {psi1 = exp((-I*lambda1)*x - (1/(4*I*lambda1))*int((alpha + b*beta),t)), psi2 = exp((I*lambda1)*x + (1/(4*I*lambda1))*int((alpha + b*beta),t)), phi1= exp((-I*conjugate(lambda1))*x - (1/(4*I*conjugate(lambda1)))*int((alpha + b*beta),t)), phi2 = exp((I*conjugate(lambda1))*x + (1/(4*I*conjugate(lambda1)))*int((alpha + b*beta),t))}

{phi1 = exp(-I*conjugate(lambda1)*x+((1/4)*I)*(int(b*beta+alpha, t))/conjugate(lambda1)), phi2 = exp(I*conjugate(lambda1)*x-((1/4)*I)*(int(b*beta+alpha, t))/conjugate(lambda1)), psi1 = exp(-I*lambda1*x+((1/4)*I)*(int(b*beta+alpha, t))/lambda1), psi2 = exp(I*lambda1*x-((1/4)*I)*(int(b*beta+alpha, t))/lambda1)}

(3)

Bnum := psi2*phi1*conjugate(lambda1) + psi1*lambda1*phi2;

psi2*phi1*conjugate(lambda1)+psi1*lambda1*phi2

(4)

Bnumexp := subs(rel,Bnum):

Den := -phi1*psi2 - phi2*psi1;

-phi1*psi2-phi2*psi1

(5)

expDen := subs(rel, Den)

-exp(-I*conjugate(lambda1)*x+((1/4)*I)*(int(b*beta+alpha, t))/conjugate(lambda1))*exp(I*lambda1*x-((1/4)*I)*(int(b*beta+alpha, t))/lambda1)-exp(I*conjugate(lambda1)*x-((1/4)*I)*(int(b*beta+alpha, t))/conjugate(lambda1))*exp(-I*lambda1*x+((1/4)*I)*(int(b*beta+alpha, t))/lambda1)

(6)

sr := Bnumexp/expDen: ratiosr := simplify(diff(sr,t), complex):

B := b - (4*I/beta(t))*ratiosr

b+2*(b*beta+alpha)*exp(((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*beta+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*beta+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*lambda1^2*x-(int(b*beta+alpha, t)))/lambda1)*(-conjugate(lambda1)+lambda1)^2*exp(((1/4)*I)*(4*lambda1^2*x-(int(b*beta+alpha, t)))/lambda1)/(beta(t)*(exp(((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*beta+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*lambda1^2*x-(int(b*beta+alpha, t)))/lambda1)+exp(-((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*beta+alpha, t)))/conjugate(lambda1))*exp(((1/4)*I)*(4*lambda1^2*x-(int(b*beta+alpha, t)))/lambda1))^2*lambda1*conjugate(lambda1))

(7)

p := {alpha(t) = t^2, beta = exp(-t)}

{beta = exp(-t), alpha(t) = t^2}

(8)

B1 := eval(subs(p, B))

b+2*(b*exp(-t)+alpha)*exp(((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*exp(-t)+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*exp(-t)+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*lambda1^2*x-(int(b*exp(-t)+alpha, t)))/lambda1)*(-conjugate(lambda1)+lambda1)^2*exp(((1/4)*I)*(4*lambda1^2*x-(int(b*exp(-t)+alpha, t)))/lambda1)/((exp(-t))(t)*(exp(((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*exp(-t)+alpha, t)))/conjugate(lambda1))*exp(-((1/4)*I)*(4*lambda1^2*x-(int(b*exp(-t)+alpha, t)))/lambda1)+exp(-((1/4)*I)*(4*conjugate(lambda1)^2*x-(int(b*exp(-t)+alpha, t)))/conjugate(lambda1))*exp(((1/4)*I)*(4*lambda1^2*x-(int(b*exp(-t)+alpha, t)))/lambda1))^2*lambda1*conjugate(lambda1))

(9)

NULL


 

Download simplify.mw

is(cos(x)=sqrt(1-sin(x)^2) or cos(x)=-sqrt(1-sin(x)^2)) assuming real;

                                          false  

In a simpler situation the result is correct

is(x=0 or x<>0) assuming real;

                                           true         

SymPy can handle the following query to its assumption system:

>>> from sympy import Q, ask
>>> from sympy.abc import x, y, z
>>> ask(Q.zero(x*y*z), Q.zero(x*z) & Q.real(y))
True
>>> ask(Q.zero(x*y*z), (Q.zero(x) | Q.zero(z)) & Q.real(y))
True
>>> ask(Q.zero(x*y) | Q.zero(y*z), Q.zero(x*z) & Q.real(y))
True

Mathematica can handle an equivalent query:

In[21]:= Assuming[{x*z == 0}, Refine[x*y*z == 0]]
Out[21]= True

However, it can't handle a similar type of query:

In[25]:= Assuming[{x == 0 || z == 0}, Simplify[x*y*z == 0]]
Out[25]= x y z == 0

In[28]:= Assuming[{x*y == 0}, Refine[x*z == 0 || z*y == 0]]
Out[28]= x z == 0 || y z == 0  

It seems that Maple can't handle this type of query at all:

> with(RealDomain);
> is(x*y*z = 0) assuming (x*z = 0, y::real);
FAIL   

However, Maple can handle simpler assumptions like x = 0:

> is(x*y*z = 0) assuming (x = 0, y::real, z::real);
true

Is there some way to use Maple's assumption system to reason about assumptions like x*y=0? I believe that's not possible. If Maple can infer either x=0 or y=0 from x*z=0, its assumption system doesn't seem to be capable of dealing with this sort of assumption.

Based on a paper by Weibel and Gonnet (1993), it doesn't seem like Maple can reason about assumptions that are disjunctions of properties for more than one variable, such as "property p holds for x OR property p holds for y."

SymPy can handle these sorts of queries because it uses a SAT solver as part of its assumption system. However, there is no mention of a SAT solver—or any method of checking multiple possibilities—in the referenced paper or related papers on Maple's assumption system.

Am I correct that Maple's assumption system is not capable of handling this sort of query?

Weibel, T., Gonnet, G.H. (1993). An assume facility for CAS, with a sample implementation for Maple. In: Fitch, J. (ed) Design and Implementation of Symbolic Computation Systems. DISCO 1992. Lecture Notes in Computer Science, vol 721. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57272-4_27

By the way, is there some way to use markdown for these questions? I made the above post by asking chatgpt to convert markdown into html. 

How do i plot / graph a limt? The plot must have a hole at 2 because it is undefined.

limit((x^2-1)/(x-1), x = 1) = 2NULL

``

Download graph-a-limit.mw

i want to get zero of this function i did all part true but i don't know why my pde not getting zero after substitute each parameter and part 

restart

with(PDEtools)

NULL

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

p := 2*k; n := 1; xi := -p*t+x

2*k

 

1

 

-2*k*t+x

(2)

"U(xi):=(B[1] (RootOf(3 _Z^2-3 _Z-1)+coth(xi)))^(-1/n);u(x,t):=(B[1] (RootOf(3 _Z^2-3 _Z-1)+coth(-p t+x)))^(-1/n) (e)^(&ImaginaryI; (k x-t w))"

proc (xi) options operator, arrow, function_assign; (B[1]*(RootOf(3*_Z^2-3*_Z-1)+coth(xi)))^(-1/n) end proc

 

proc (x, t) options operator, arrow, function_assign; (B[1]*(RootOf(3*_Z^2-3*_Z-1)+coth(-p*t+x)))^(-1/n)*exp(I*(k*x-t*w)) end proc

(3)

pde := I*(diff(u(x, t), t))+diff(u(x, t), `$`(x, 2))+eta*u(x, t)+beta*U(xi)^n*u(x, t)+gamma*U(xi)^(2*n)*u(x, t)+delta*U(xi)^(3*n)*u(x, t)+lambda*U(xi)^(4*n)*u(x, t) = 0

I*(2*exp(I*(k*x-t*w))*k*(1-coth(2*k*t-x)^2)/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^2)-I*w*exp(I*(k*x-t*w))/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))))+2*exp(I*(k*x-t*w))*(1-coth(2*k*t-x)^2)^2/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^3)-(2*I)*k*exp(I*(k*x-t*w))*(1-coth(2*k*t-x)^2)/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^2)+2*exp(I*(k*x-t*w))*coth(2*k*t-x)*(-1+coth(2*k*t-x)^2)/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^2)-k^2*exp(I*(k*x-t*w))/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x)))+eta*exp(I*(k*x-t*w))/(B[1]*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x)))+beta*exp(I*(k*x-t*w))/(B[1]^2*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^2)+gamma*exp(I*(k*x-t*w))/(B[1]^3*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^3)+delta*exp(I*(k*x-t*w))/(B[1]^4*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^4)+lambda*exp(I*(k*x-t*w))/(B[1]^5*(RootOf(3*_Z^2-3*_Z-1)-coth(2*k*t-x))^5) = 0

(4)

case1 := [beta = 2*RootOf(3*_Z^2-3*_Z-1)*(n+2)/(B[1]*n^2), delta = 2*B[1]*(RootOf(3*_Z^2-3*_Z-1)+1)*(3*n+2)/(3*n^2), eta = (k^2*n^2*B[1]^2-n^2*w*B[1]^2-1)/(n^2*B[1]^2), gamma = -6*RootOf(3*_Z^2-3*_Z-1)*(n+1)/n^2, lambda = B[1]^2*(3*RootOf(3*_Z^2-3*_Z-1)-7)*(2*n+1)/(9*n^2), A[0] = RootOf(3*_Z^2-3*_Z-1)*B[1], A[1] = 0, B[1] = B[1]]

[beta = 6*RootOf(3*_Z^2-3*_Z-1)/B[1], delta = (10/3)*B[1]*(RootOf(3*_Z^2-3*_Z-1)+1), eta = (k^2*B[1]^2-w*B[1]^2-1)/B[1]^2, gamma = -12*RootOf(3*_Z^2-3*_Z-1), lambda = (1/3)*B[1]^2*(3*RootOf(3*_Z^2-3*_Z-1)-7), A[0] = RootOf(3*_Z^2-3*_Z-1)*B[1], A[1] = 0, B[1] = B[1]]

(5)

pde3 := eval(pde, case1)

 

``

Download test.mw

Could you explain me why the three forms of patmatch behave identically (which seems natural) but the three forms of type do not.
Is there a way to define the type in type such that this latter returns the same thing for a*f(x)+b, f(x)*a+b, b+a*f(x), b+f(x)*a ?

Z := f(x)*a+b;
t1 = type(Z, `&+`(algebraic, `&*`(algebraic, function)));
t2 = type(Z, `&+`(`&*`(algebraic, function), algebraic));
t3 = type(Z, `&+`(`&*`(function, algebraic), algebraic));

f(x)*a+b

 

t1 = false

 

t2 = false

 

t3 = true

(1)

p1 = patmatch(Z, A::algebraic*f(X::algebraic) + B::algebraic, 'pat');
pat;
p2 = patmatch(Z, B::algebraic + A::algebraic*f(X::algebraic), 'pat');
pat;
p2 = patmatch(Z, B::algebraic + f(X::algebraic)*A::algebraic, 'pat');
pat;

p1 = true

 

[A = a, B = b, X = x]

 

p2 = true

 

[A = a, B = b, X = x]

 

p2 = true

 

[A = a, B = b, X = x]

(2)
 

 

Download type_vs_patmatch.mw

TIA

Recently, Maple has become almost unuseable. Whatever I do, it suddenly becomes non-reponsive, the cursor stops blipping and nothing happens for about a minute, although I can still move the cursor around and the page slider works, suggesting that the kernel has gone mad.

Then suddenly it comes back to life, executes where it left off, which in most cases happens while I am typing input. A minute later it's back to sleep. When I look at the CPU usage while it is non-responsive, I can see CPU usage is about 30% (there is nothing else significant running), disk usage is about 1% and there is plenty of memory (everything in total wants about 10GB and I have 32GB).

I have the -nocloud parameter set and finally disconnected the network connection, but that didn't help.

It all seems to have started with the most recent upgrade, although I'm not 100% sure of that.

Is anyone else seeing something like this, or better yet, does anyone have a suggestion to make this behaviour stop?

How does one downgrade to 2024.1?

Thank you.

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