MaplePrimes Questions

It happens from time to time that context menus do not appear. Normally, they appear at mouse-over (i.e. when the cursor is moved over an menu item).

Example: Right-click on input line

A Maple restart is required to get the normal behaviour back.

Recently I noticed that repeatedly clicking at different location on the menu item make the contex menus appear again.

This can be workarround if a restart is not acceptable.

It seems that the new Java IDE, which was introduced with Maple 2021, is more susceptible to this phenomen. 

All on Windows 10.

Since this behaviour is rare I could not identify a clear pattern which system state or event could be responsible for the appearance of this phenomen.

I would be interested if someone else has observed it and found another solution how to get the menus back without restarting Maple.

Any idea why calling solve(eqs,unknowns) gives Error, (in is/internal) type does not exist when the unknowns are in a set, but the error goes away when the unknowns are in a list? Is this expected or is this a bug?


 

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 1779 and is the same as the version installed in this computer, created 2024, July 25, 8:56 hours Pacific Time.`

restart;

eqs:={0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)};
unknown:={a, b};

{0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)}

{a, b}

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

restart;

eqs:=[0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)];
unknown:={a, b};

[0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)]

{a, b}

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

restart;

eqs:=[0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)];
unknown:=[a, b];

[0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)]

[a, b]

solve(eqs,unknown)

[]

 


 

Download is_internal_error_from_solve_maple_2024_1.mw

Update

Reported to Maplesoft support.

 

Any idea why limit(e,x=0) fail to evaluate but  eval(e,x=0) does in this example? 

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 1779 and is the same as the version installed in this computer, created 2024, July 25, 8:56 hours Pacific Time.`

restart;

e:=-tanh(sqrt(2)*(a*x+b))

-tanh(2^(1/2)*(a*x+b))

limit(e,x=0)

limit(-tanh(2^(1/2)*(a*x+b)), x = 0)

eval(e,x=0)

-tanh(b*2^(1/2))

 

 

Download limit_problem_maple_2024_1.mw

I tried the above using some other software, and there both evaluate to same result as expected:

In Maple, I found that by removing the sqrt(2) from inside the tanh, then limit now works

e:=-tanh((a*x+b));
limit(e,x=0)

Is this a bug?

Dear all, I have the following issue:

Goal is to calculate saddle, turning point, etc.

As you can see in the code above only in case of a second restart x2 is calculated correctly.

Thanks for help.

I have created a document on my computer that runs normally in Maple 2024.1. However, when I upload this document to MaplePrimes, it shows an error or behaves unexpectedly. The document contains a system of differential equations, which I solved numerically and plotted, but the plots and equilibrium points do not display correctly after uploading.

 

When I run this code on my local machine, it works perfectly. However, after uploading the document to MaplePrimes, it does not run as expected. What could be causing this issue? Is there a known problem with Maple 2024.1 when uploading documents, or could there be a compatibility issue with MaplePrimes?

Any help or suggestions would be greatly appreciated. Thank you!

This project discusses the predator-prey system, particularly the Lotka-Volterra equations, which model the interaction between two species: prey and predators. Let's solve the Lotka-Volterra equations numerically and visualize the results.

NULL

NULL

alpha := 1.0; beta := .1; g := 1.5; delta := 0.75e-1; ode1 := diff(x(t), t) = alpha*x(t)-beta*x(t)*y(t); ode2 := diff(y(t), t) = delta*x(t)*y(t)-g*y(t); eq1 := -beta*x*y+alpha*x = 0; eq2 := delta*x*y-g*y = 0; equilibria := solve({eq1, eq2}, {x, y}); print("Equilibrium Points: ", equilibria); initial_conditions := x(0) = 40, y(0) = 9; sol := dsolve({ode1, ode2, initial_conditions}, {x(t), y(t)}, numeric); eq_points := [seq([rhs(eq[1]), rhs(eq[2])], `in`(eq, equilibria))]

[[0., 0.], [20., 10.]]

(1)

plots[odeplot](sol, [[t, x(t)], [t, y(t)]], t = 0 .. 100, legend = ["Rabbits", "Wolves"], title = "Prey-Predator Dynamics", labels = ["Time", "Population"])

 

``

NULL

NULL

sol_plot := plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 100, color = "blue"); equilibrium_plot := plots:-pointplot(eq_points, color = "red", symbol = solidcircle, symbolsize = 15); plots:-display([sol_plot, equilibrium_plot], title = "Phase Portrait with Equilibrium Points", labels = ["Rabbits", "Wolves"])

 

Now, we need to handle a modified version of the Lotka-Volterra equations. These modified equations incorporate logistic growth fot the prey population.

 

 

restart

alpha := 1.0; beta := .1; g := 1.5; delta := 0.75e-1; k := 100; ode1 := diff(x(t), t) = alpha*x(t)*(1-x(t)/k)-beta*x(t)*y(t); ode2 := diff(y(t), t) = delta*x(t)*y(t)-g*y(t); eq1 := alpha*x*(1-x/k)-beta*x*y = 0; eq2 := delta*x*y-g*y = 0; equilibria := solve({eq1, eq2}, {x, y}); print("Equilibrium Points: ", equilibria); initial_conditions := x(0) = 40, y(0) = 9; sol := dsolve({ode1, ode2, initial_conditions}, {x(t), y(t)}, numeric); eq_points := [seq([rhs(eq[1]), rhs(eq[2])], `in`(eq, equilibria))]

[[0., 0.], [100., 0.], [20., 8.]]

(2)

plots[odeplot](sol, [[t, x(t)], [t, y(t)]], t = 0 .. 100, legend = ["Rabbits", "Wolves"], title = "Prey-Predator Dynamics", labels = ["Time", "Population"])

 

``

 

 

plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 50, color = "blue"); equilibrium_plot := plots:-pointplot(eq_points, color = "red", symbol = solidcircle, symbolsize = 15); plots:-display([plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 50, color = "blue"), equilibrium_plot], title = "Phase Portrait with Equilibrium Points", labels = ["Rabbits", "Wolves"])

 

NULL


 

Download predator_prey.mw

I can't combine standard font and Greek symbols in a plot legend. I want to type:

"Limit of X_{i}^{\rho=0} (\alpha\mapsto+\infty)>0"

where I used LaTeX notation to emphasise that I want (1) superscript and subscript of X displayed as aligned exactly on top of each other, (2) rho, alpha, mapsto-style arrow, and infinity typed in their respective symbolic forms.

thanks!

I do not have earlier Maple version to check now. But Maple 2024.1 gives division by zero on this second order ode with missing x. This looks like new problem in Maple. Would someone who have access to earlier version of Maple be able to check if this problem shows there also? I solved this and get y=x+3 as solution which Maple verifies.

interface(version);

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

restart;

ode:=diff(y(x),x$2)=(diff(y(x),x))^3-(diff(y(x),x))^2;
IC:=y(0)=3,D(y)(0)=1;

diff(diff(y(x), x), x) = (diff(y(x), x))^3-(diff(y(x), x))^2

y(0) = 3, (D(y))(0) = 1

dsolve([ode,IC])

Error, (in dsolve) numeric exception: division by zero

sol:=y(x)=3+x;
odetest(sol,[ode,IC])

y(x) = 3+x

[0, 0, 0]

DEtools:-odeadvisor(ode);

[[_2nd_order, _missing_x], [_2nd_order, _reducible, _mu_y_y1]]

infolevel[dsolve]:=5;

5

dsolve([ode,IC])

Methods for second order ODEs:

--- Trying classification methods ---

trying 2nd order Liouville

trying 2nd order WeierstrassP

trying 2nd order JacobiSN

differential order: 2; trying a linearization to 3rd order

--- trying a change of variables {x -> y(x), y(x) -> x}

differential order: 2; trying a linearization to 3rd order

trying 2nd order ODE linearizable_by_differentiation

trying 2nd order, 2 integrating factors of the form mu(x,y)

trying differential order: 2; missing variables

-> Computing canonical coordinates for the symmetry [0, 1]

-> Rewriting ODE in canonical coordinates by means of differential invariants

Try computing 1 more symmetries for ODE written in canonical coordinates

 -> Computing symmetries using: way = 3

 Found another symmetry:

[1, 0]

 Found another symmetry:

[-x+y, 0]

Computing a convenient ordering to use the 3 symmetries available

<- differential order: 2; canonical coordinates successful

<- differential order 2; missing variables successful

Error, (in dsolve) numeric exception: division by zero

dsolve(ode)

Methods for second order ODEs:

--- Trying classification methods ---

trying 2nd order Liouville

trying 2nd order WeierstrassP

trying 2nd order JacobiSN

differential order: 2; trying a linearization to 3rd order

--- trying a change of variables {x -> y(x), y(x) -> x}

differential order: 2; trying a linearization to 3rd order

trying 2nd order ODE linearizable_by_differentiation

trying 2nd order, 2 integrating factors of the form mu(x,y)

trying differential order: 2; missing variables

-> Computing canonical coordinates for the symmetry [0, 1]

-> Rewriting ODE in canonical coordinates by means of differential invariants

Try computing 1 more symmetries for ODE written in canonical coordinates

 -> Computing symmetries using: way = 3

 Found another symmetry:

[1, 0]

 Found another symmetry:

[-x+y, 0]

Computing a convenient ordering to use the 3 symmetries available

-> Calling odsolve with the ODE diff(_b(_a) _a) = _b(_a)^3-_b(_a)^2 _b(_a) HINT = [[1 0] [-_a+y -_b*(_b-1)]]

   *** Sublevel 2 ***

   symmetry methods on request

 1st order, trying reduction of order with given symmetries:

[1, 0], [-_a+y, -_b*(_b-1)]

   1st order, trying the canonical coordinates of the invariance group

   <- 1st order, canonical coordinates successful

<- differential order: 2; canonical coordinates successful

<- differential order 2; missing variables successful

y(x) = ln(LambertW(-c__1*exp(x-1)))+c__2

 

 

Download divide_by_zero_maple_2024_1_august_5_2024.mw

I set

Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx    
Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)

So that  y(x) and diff(y(x),x) display as   y and y'  and this works.

But I am not able to clear this effect without doing restart. If I do 

Typesetting:-Unsuppress('all'); #clear all

It still display derivative as  y'(x)  instead of diff(y(x),x) as expected. So the Unsuppress('all') had only partial effect. 

How to completely remove all typestting effects so that it returns to how it was and without doing restart?

Worksheet below. Looked at help page, but it is still not clear. All what help page says is to use Unsuppress(all) and that is what I did. I am using typesetting level extended if it makes any difference. 

interface(version);

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

restart;

ode:=diff(y(x),x$2)+diff(y(x),x)*y(x)+3*y(x)=sin(x);

diff(diff(y(x), x), x)+(diff(y(x), x))*y(x)+3*y(x) = sin(x)

Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx    
Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)

x, false

ode

diff(diff(y(x), x), x)+(diff(y(x), x))*y(x)+3*y(x) = sin(x)

Typesetting:-Unsuppress('all'); #clear all

ode

diff(diff(y(x), x), x)+(diff(y(x), x))*y(x)+3*y(x) = sin(x)

Typesetting:-Unsuppress(y(x));

Warning, no depencency for function y has been declared => ignored

ode

 

Download how_to_clear_all_typesetting.mw

I want to substitute a variable r' =sqrt(x^2 + y^2 + z^2).

But how do I change my output so that r' is displayed instead of sqrt(x^2+y^2+z^2)?

E.g. line (5) D(g)(r')x/r' and not D(g)(sqrt(x^2 + y^2 + z^2))*/sqrt(x^2 + y^2 + z^2). 

And one more question. How can I make sure that my output in (6) is only the result on the right side and the left side of the equal sign is not displayed? 


 

restart

with(Physics)

__________________________________________________________________

(1)

with(Vectors)``

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `- - - +`, coordinates = cartesian)

[coordinatesystems = {X}, signature = `- - - +`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(2)

diff(r(x), x) := sqrt(x^2+y^2+z^2)

(x^2+y^2+z^2)^(1/2)

(3)

``

g(diff(r(x), x))

g((x^2+y^2+z^2)^(1/2))

(4)

diff(g(diff(r(x), x)), x)

(D(g))((x^2+y^2+z^2)^(1/2))*x/(x^2+y^2+z^2)^(1/2)

(5)

NULL

NULL

H := (x*Psigma[1, matrix]+y*Psigma[2, matrix]+z*Psigma[3, matrix]).Vector(2, {1 = 0, 2 = U(diff(r(x), x))})

(x*Physics:-Psigma[1]+y*Physics:-Psigma[2]+z*Physics:-Psigma[3]).Vector[column](%id = 36893490180036880732) = Vector[column](%id = 36893490180036881092)

(6)

NULL


 

Download representation_of_code.mw

for 2D plot of 3D plot when parameter change there is an idea for making something like that, i need some help about this



2D_plot.mw

In the code below, I define an expression, then turn it into a function of omega_d.

Consider the results (5) and (6) below.

I take the derivative of the function relative to omega_d, set the derivative to zero and ask Maple to solve for the critical point (ie, the omega_d at which the derivative is zero).

I get the correct result in (5), ie three different critical points. But when I simplify this result, Maple returns only one of the critical points.

Why?

restart

expr := f/sqrt((`&omega;__0`^2-`&omega;__d`^2)^2+`&gamma;__b`^2*`&omega;__d`^2)

f/((omega__0^2-omega__d^2)^2+gamma__b^2*omega__d^2)^(1/2)

(1)

A := unapply(expr, `&omega;__d`)

proc (omega__d) options operator, arrow; f/((omega__0^2-omega__d^2)^2+gamma__b^2*omega__d^2)^(1/2) end proc

(2)

diff(A(`&omega;__d`), `&omega;__d`)

-(1/2)*f*(-4*(omega__0^2-omega__d^2)*omega__d+2*gamma__b^2*omega__d)/((omega__0^2-omega__d^2)^2+gamma__b^2*omega__d^2)^(3/2)

(3)

simplify(diff(A(`&omega;__d`), `&omega;__d`))

-f*omega__d*(gamma__b^2-2*omega__0^2+2*omega__d^2)/(omega__d^4+(gamma__b^2-2*omega__0^2)*omega__d^2+omega__0^4)^(3/2)

(4)

solve(diff(A(`&omega;__d`), `&omega;__d`) = 0, `&omega;__d`)

0, (1/2)*(-2*gamma__b^2+4*omega__0^2)^(1/2), -(1/2)*(-2*gamma__b^2+4*omega__0^2)^(1/2)

(5)

simplify(solve(diff(A(`&omega;__d`), `&omega;__d`) = 0, `&omega;__d`))

0

(6)

NULL


This was a problem for me just now because I used the command in (6) first and just could not figure out what the heck was going on. I did the calculations by hand to check, and then finally found out it was this simplify command.

Download simplifysolve.mw

Something seems to have changed.  I do not now have Maple 2024.0 to check or earlier Maple's as I have to reinstall windows since my C:\ drive died. 

I installed Maple 2024.1 new on windows 10 home edition.

I noticed now when evaluating the current cell, the cursor automatically jumps to next cell, which is what I want and how Maple always worked.

But now the cursor jumps to the end of the command in the next cell. Before, I could swear that not how it worked and it used to jump to the start of the next cell.

This makes it very confusing, as I keep looking for where the cursor is now.

Why was this changed in 2024.1? I looked at option and see nothing to change this. 

Here is worksheet and small movie. 

This is my display options

 


 

interface(version);

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

x:=1;

1

y:=3;

3

z:=4;

4

h:=4;

4

 


 

Download cursor_jump_to_end_of_line.mw

 

 

Update

I tried to change the cursor size and thickness in windows 10 itself (using settings->Ease of access->Text cursor) and made it much bigger and restarted Maple but this had no effect. Cursor inside Maple remained the same.

I was hoping if there is a way to make the cursor bigger then this will make it easier to see where it jumped to when hitting enter.

It is bad, since the Maple cursor jumps to random places in the next cell. sometimes it jumps to the middle of the code in the next cell when there are more than one line there.

Here is a movie. Notice how it jumped to the start of the second line now in next cell in one case and not to the end of the code.

I can't believe no one at Maplesoft have noticed this and is able to fix it. This is ridiculous behavior. I spend few seconds each time I hit enter looking for where the cursor has landed as I keep looking at start of the next cell and it is not there. I could have 10-20 lines of code in one cell and have too look to find where the cursor is hidden in these 20 lines.

It natural for one to look for where the cursor is when woking and this makes it annoying. Hopefully someone can find a way to tell Maple to bring the old behaviour back where cursor jumps always to the start of the next cell.

 

 

 

 

restart;

local gamma;

gamma

(1)

with(Plot)

 

params := {alpha = 2.5, k = 3, w = 2, beta[3] = 3, beta[4] = 1.7,theta=0,gamma=1};

{alpha = 2.5, gamma = 1, k = 3, theta = 0, w = 2, beta[3] = 3, beta[4] = 1.7}

(2)

xi := sqrt(-1/(72*alpha*beta[4]+72*gamma*beta[4]))*(2*alpha*k*t+x)

(-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x)

(3)

 

sol1 := [U(xi), -k*x -(9*alpha*k^2*beta[4] + 2*beta[3]^2)/(9*beta[4])*t + theta];

[U((-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x)), -k*x-(1/9)*(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/beta[4]+theta]

(4)

 

sol2 := eval(sol1, U(xi) = -beta[3]/(3*beta[4]) + beta[3]*sinh(xi)/(6*beta[4]*cosh(xi)) + beta[3]*cosh(xi)/(6*beta[4]*sinh(xi)));

[-(1/3)*beta[3]/beta[4]+(1/6)*beta[3]*sinh((-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x))/(beta[4]*cosh((-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x)))+(1/6)*beta[3]*cosh((-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x))/(beta[4]*sinh((-1/(72*alpha*beta[4]+72*gamma*beta[4]))^(1/2)*(2*alpha*k*t+x))), -k*x-(1/9)*(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/beta[4]+theta]

(5)

 

solnum :=eval(sol2, params);

[-.5882352940+(.2941176471*I)*sin(.7247137946*t+0.4831425297e-1*x)/cos(.7247137946*t+0.4831425297e-1*x)-(.2941176471*I)*cos(.7247137946*t+0.4831425297e-1*x)/sin(.7247137946*t+0.4831425297e-1*x), -3*x-23.67647059*t]

(6)

plots:-complexplot3d(solnum, x = -50.. 50, t = -50..50);

Warning, unable to evaluate the function to numeric values in the region; complex values were detected

 

 

NULL


if there is any other way for graph please share with me

Download complexplot3d.mw

Why doesn't evalf work on the data structures below?
 

M1 := Matrix([[m__1, m__2]])

Matrix(%id = 36893488151929448556)

(1)

M := [M1, M1]

[Matrix(%id = 36893488151929448556), Matrix(%id = 36893488151929448556)]

(2)

m__1 := 1; m__2 := 2

M

[Matrix(%id = 36893488151929448556), Matrix(%id = 36893488151929448556)]

(3)

evalf(M)

[Matrix(%id = 36893488151929440844), Matrix(%id = 36893488151929440964)]

(4)

evalf(M[1])

Matrix(%id = 36893488151929437108)

(5)

evalf(op(M))

Matrix(%id = 36893488151929432292), Matrix(%id = 36893488151929432412)

(6)

evalf(op(M[1]))

1., 2., {(1., 1.) = m__1, (1., 2.) = m__2}, datatype = anything, storage = rectangular, order = Fortran_order, shape = []

(7)

NULL


 

Download evalf.mw

i am trying to solve definite integral but i want result in A,B form i dont want to assign numerical values to them can i get that  in maple? i have tried evalf, eval and simplify command but it is not working kindly help me out

restart

NULL

integrand := p*exp(-A/sqrt(p)-B/p)

p*exp(-A/p^(1/2)-B/p)

(1)

integral := int(integrand, p = 0 .. infinity)

int(p*exp(-A/p^(1/2)-B/p), p = 0 .. infinity)

(2)

simplify(integral)

int(p*exp(-(A*p+B*p^(1/2))/p^(3/2)), p = 0 .. infinity)

(3)

evalf(integral)

int(p*exp(-1.*A/p^(1/2)-1.*B/p), p = 0. .. Float(infinity))

(4)

eval(integral)

int(p*exp(-A/p^(1/2)-B/p), p = 0 .. infinity)

(5)
 

NULL

Download integral.mwintegral.mw

First 11 12 13 14 15 16 17 Last Page 13 of 2354