nm

12148 Reputation

20 Badges

13 years, 237 days

MaplePrimes Activity


These are questions asked by nm

sol:=ln( (y-1)^(1/3)* (y^2+y+1)^(1/3) ) - ln(y) = 2/5* ln(t^2+1)+_C1;
solve( sol,y);

in real domain is fine also. But all my attempts failed. I waited 3-4 minutes each time and stopped it.

Any one can find a trick? Below worksheet showing my attempts and also solution by Mathematica which took 0.3 seconds

Make sure to save all your work first. This problem is known to crash Maple !

restart;

sol:=ln( (y-1)^(1/3)* (y^2+y+1)^(1/3) ) - ln(y) = 2/5* ln(t^2+1)+_C1;
solve( sol,y) assuming real;

ln((y-1)^(1/3)*(y^2+y+1)^(1/3))-ln(y) = (2/5)*ln(t^2+1)+_C1

Warning,  computation interrupted

restart;

sol:=ln( (y-1)^(1/3)* (y^2+y+1)^(1/3) ) - ln(y) = 2/5* ln(t^2+1)+_C1;
RealDomain:-solve( sol,y);

ln((y-1)^(1/3)*(y^2+y+1)^(1/3))-ln(y) = (2/5)*ln(t^2+1)+_C1

Warning,  computation interrupted

restart;
sol:=ln( (y-1)^(1/3)* (y^2+y+1)^(1/3) ) - ln(y) = 2/5* ln(t^2+1)+_C1;
solve( sol,y,real);

ln((y-1)^(1/3)*(y^2+y+1)^(1/3))-ln(y) = (2/5)*ln(t^2+1)+_C1

Warning,  computation interrupted

 


 

Download solve_problem_march_7_2026.mw

 

I never used Maplets before.

Been learning Explore, which is OK, but the UI does not look good. Too much white spaces between sliders.  So been looking at Maplets to use instead.

Should one just use Maplets to make interactive demos with sliders, buttons, popup menus and so on or use Explore? Which is better?

I do not waste more time learning Explore more if Maplets is a better choice.

If someone here knows Maplet, here is something I just wrote in Explore.  Could this be coded in Maplet to see how it will look like. It took me 30 minutes to make it using Explore and I am no expert in Explore, so hopefully it should not take someone who knows Maplets much time to produce same thing as Maplet. I wanted to see if the UI will look better or same issues with too wasted spaces between sliders.  I assume with Maplets, there is same concept as Explore, with range of variables, and initial values and so on...

I understand one can run Maplet using Maple viewer without needing to have Maple installed on the PC, so this is an advantage.

restart;

ode_1 := diff(x(t),t) = r*x(t) *(1-(x(t)+beta*y(t))/k1):
ode_2 := diff(y(t),t) = k*y(t) *(1-(y(t)+alpha*x(t))/k2):

Explore(DEtools:-DEplot(
     [ ode_1, ode_2],[x(t),y(t)],t=0..max_time,[[x(0)=x0,y(0)=y0]],
     x=0..max_x, y=0..max_y,'labels'=["Elk","Deer"],'dirfield'=[ngrid,ngrid],
     'arrows'='SLIM', #'smalltwo',
     'axes'='boxed', 'color' = blue,'linecolor'='red',#color of solution
     'obsrange'=false,
     'title'="Lotka -Volterra Model of Competition"
     ),
    parameters=[
     [r=0..5,'controller' = 'slider','minorticks'=.1,'snaptoticks'=true, 'label' = "Elk growth rate r",'showlabels'=false,placement='right'],
     [alpha=0..2,'controller' = 'slider','minorticks'=.1,'snaptoticks'=true, 'label' = "Elk competition alpha",'showlabels'=false,placement='right'],
     [k1=100..1000,'controller' = 'slider','minorticks'=10,'snaptoticks'=true, 'label' = "Elk carrying capacity",'showlabels'=false,placement='right'],
     [k=0..5,'controller' = 'slider','minorticks'=.1,'snaptoticks'=true, 'label' = "Deer growth rate k",'showlabels'=false,placement='right'],
     [beta=0..2,'controller' = 'slider','minorticks'=.1,'snaptoticks'=true, 'label' = "Deer competition beta",'showlabels'=false,placement='right'],
     [k2=100..1000,'controller' = 'slider','minorticks'=10,'snaptoticks'=true, 'label' = "Deer carrying capacity",'showlabels'=false,placement='right'],
     [max_time=1..200,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "max time",'showlabels'=false,placement='left'],
     [max_x=1..1000,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "max x",'showlabels'=false,placement='left'],
     [max_y=1..1000,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "max y",'showlabels'=false,placement='left'],
     [x0=1..200,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "Deer initial population",'showlabels'=false,placement='left'],
     [y0=1..200,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "Elk initial population",'showlabels'=false,placement='left'],
     [ngrid=10..30,'controller' = 'slider','minorticks'=1,'snaptoticks'=true, 'label' = "arrows",'showlabels'=false,placement='left']     
    ],
    initialvalues=[r=0.12,k1=600,alpha=1.5,k2=600,k=0.18,beta=1.2,x0=75,y0=100,ngrid=24,max_x=700,max_y=700,max_time=100],
    'adaptview'=true
);

 

 

Download lotka_volterra.mw

Screen shot of the UI

 

How would the above look using Maplet instead of Explore?

I use  

Typesetting:-Unsuppress('all'):
Typesetting:-Settings(prime=t,'typesetprime'=true):

to make the math easier to read. (also the latex looks better this way).

But it has no effect when on the plot title. Here is screen shot and code

In this below, I get same title if I use   plot(t,'title'=typeset(the_title));   or plot(t,'title'=the_title);  Instead of dy/dt,  I wanted it to show as y'(t) like it does in worksheet.

Is there a way to make the title of the plot show the math in the nicer format shown in the worksheet automatically? It looks like Typesetting:-Settings does not extend to plots, which is too bad.


code

the_title:=diff(y(t),t$2)+c*diff(y(t),t)+k*y(t)=0;
Typesetting:-Unsuppress('all'):
Typesetting:-Settings(prime=t,'typesetprime'=true): #this says to use y'(t) instead of dy/dt    

plot(t,'title'=typeset(the_title),size=[300,300]);

#or

plot(t,'title'=the_title,size=[300,300]);

Is this a Maple bug? I do not see what I am doing wrong:

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.2, Windows 10, November 11 2025 Build ID 1971053`

Explore( plots:-textplot([0,0," CRITICAL DAMPING"],'axes'=none),
   initialvalues=[c=1,k=.1],
   parameters=[[c=0..10],[k=0..10]]
   );

 

 

Moving any slider gives the internal error.  Why?

Download internal_error_explore_feb_28_2026.mw

Here is a small movie

To help debug things, and to make it easier to add more logic such as if then else and so on, I moved the main body of Explor to a separate proc where the plot is made after doing some checking.

So instead of writing

Explore(plot(.....), 
 parameters=[  
   [c=0..10,....],
   [k=0..10,...]]
)

It now became

foo:=proc(c,k}
.....#some debug print messages added here, and some checking...
   plot(....)
end proc;

Explor( foo(c,k), 
  parameters=[  
    [c=0..10,....],
    [k=0..10,...]]
)

Two problems. 

1) My print lines inside foo() do not print to worksheet. Only the initial time they do. When I mean initial time, it is when Explore starts and does initalization. I see the print lines only then.

But after that, as I change the slider, which should make a call to foo(), I see nothing printed on the screen in my worksheet any more.

It is as if Explor stopped calling my foo().  But at same time, I see do see in the the display of Explore itself that it is calling foo as expected, since the call it display is changes and the result of the call changes as slider is changed. So call is being made. 

This is what shows inside Explore...

foo(5,2)=10
foo(3,2)=6
and so on

Why then the print messages from foo() are not printed in the worksheet any more? Where are the print message going to then?

2) How to make Explor only show the _result_ of calling foo() and not show the call itself as it does now? 

ie. instead of showing foo(5,2)=10  I just wanted to see the result of foo, which is 10 in this example.

Doing rhs(foo(c,k)) did not work

Here is worksheet to see yourself.

restart;

foo:=proc(c,k)
   print("c=",c," k=",k);
   c*k;
end proc:

Explore(foo(c,k),
   initialvalues=[c=1,k=.1],
   parameters=[
     [c=0..10,'controller' = 'slider','minorticks'=1,
      'snaptoticks'=true, 'label' = "Damping c",'showlabels'=false],
     [k=0..10,'controller' = 'slider','minorticks'=1,
      'snaptoticks'=true, 'label' = "Stiffness k",'showlabels'=false]]
   );

"c=", 10, " k=", 10

"c=", 0, " k=", 0

"c=", 1, " k=", .1

 

 

Download explore_feb_28_2026.mw

Here is small movie

ps. I am thinking now Explore only works with "plot" as its first argument. But help says expr can be anything.

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