nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I do not think I ever saw this warning messages from dsolve. This is _Clairaut first order ode. When adding the option singsol=all in the dsolve call, Maple replies with 

I do not have earlier version of Maple to try as my C: drive died and lost all my Maple's installed versions. I need to to try to install older version of Maple sometime and check.

Is this new warning and why does it show? Is this suppose to happen? 


 

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 1782 and is the same as the version installed in this computer, created 2024, August 8, 16:5 hours Pacific Time.`

restart;

ode:=a*(1 + diff(y(x), x)^3)^(1/3) + x*diff(y(x), x) - y(x) = 0;

a*(1+(diff(y(x), x))^3)^(1/3)+x*(diff(y(x), x))-y(x) = 0

dsolve(ode,y(x),singsol=all)

Warning, only 1 systems are considered

Warning, only 1 systems are considered

y(x) = a*(c__1^3+1)^(1/3)+x*c__1

 


 

Download strange_warning_message_from_dsolve.mw

I also noticed these warning messages show up only the first time dsolve is called on this ode.

Calling it again right after, using the same command, the warning messages no longer show up, which is  even more strange.

 

I am plotting phase plot of two first order ode's.

I noticed when added +t to one ode, the plot generated losses all the slope fields. Any one knows why and if this is just limitation of DEplot or if there is a way to workaround it. 

THis worksheet has first example showing expected output, then second example where +t was added first ode. Now same code generates plot will all the slope field gone.


 

interface(version);

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

sys:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t), 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
DEtools:-DEplot(sys,[x(t), y(t)],
        t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
        [[x(0)=1, y(0)=2]],
        labels = [x(t), y(t)],
        linecolor =red,arrowsize = 1.5,axes = boxed,
        color = 'magnitude[legacy]')

[diff(x(t), t)+diff(y(t), t) = x(t)+y(t), 2*(diff(x(t), t))+diff(y(t), t) = 2*x(t)+3*y(t)]

#added +t to the RHS of one ode. Everything else the same.
sys_2:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t)+t, 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
DEtools:-DEplot(sys_2,[x(t), y(t)],
        t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
        [[x(0)=1, y(0)=2]],
        labels = [x(t), y(t)],
        linecolor =red,arrowsize = 1.5,axes = boxed,
        color = 'magnitude[legacy]')

[diff(x(t), t)+diff(y(t), t) = x(t)+y(t)+t, 2*(diff(x(t), t))+diff(y(t), t) = 2*x(t)+3*y(t)]

dsolve([op(sys),x(0)=1, y(0)=2]);

{x(t) = 3*exp(t)-2*exp(-t), y(t) = 2*exp(-t)}

dsolve([op(sys_2),x(0)=1, y(0)=2]);

{x(t) = 4*exp(t)-4*exp(-t)+1-3*t, y(t) = 4*exp(-t)-2+2*t}

 


 

Download strange_DEplot.mw

update

if someone is interested, I found Maple has builtin function to check if system of ode's is autonomous or not. So changed my code to check first. Here is how to check:


 

interface(version);

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

restart;

sys:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t), 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
if DEtools:-autonomous(sys,[x(t),y(t)],t) then
    DEtools:-DEplot(sys,[x(t), y(t)],
        t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
        [[x(0)=1, y(0)=2]],
        labels = [x(t), y(t)],
        linecolor =red,arrowsize = 1.5,axes = boxed,
        color = 'magnitude[legacy]');
else
  print("WARNING, non-autonomous system. Will not do phase plot");
fi;

[diff(x(t), t)+diff(y(t), t) = x(t)+y(t), 2*(diff(x(t), t))+diff(y(t), t) = 2*x(t)+3*y(t)]

#added +t to the RHS of one ode. Everything else the same.
sys_2:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t)+t, 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
if DEtools:-autonomous(sys_2,[x(t),y(t)],t) then
   DEtools:-DEplot(sys_2,[x(t), y(t)],
        t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
        [[x(0)=1, y(0)=2]],
        labels = [x(t), y(t)],
        linecolor =red,arrowsize = 1.5,axes = boxed,
        color = 'magnitude[legacy]');
else
  print("WARNING, non-autonomous system. Will not do phase plot");
fi;

[diff(x(t), t)+diff(y(t), t) = x(t)+y(t)+t, 2*(diff(x(t), t))+diff(y(t), t) = 2*x(t)+3*y(t)]

"WARNING, non-autonomous system. Will not do phase plot"

 


 

Download strange_DEplot_V2.mw

 

 

 

I found that  DynamicSystems package uses global variable called s

THis makes zero design sense. Why would a package use a global variable that could have been used by a user? 

What is the correct way to prevent this warning message from showing up, as I have no control over what variable can be used in global space.  I also tried to declare as local to the function that is using the package, but that did not help. Only way was to remove variable from global space before.

Any suggestions?  And why DynamicSystems is even using global symbols in first place?


 

interface(version);

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

restart;

z

foo:=proc()
 local sv;

 DynamicSystems:-SystemOptions('statevariable'=sv);

end proc;
 

proc () local sv; DynamicSystems:-SystemOptions('statevariable' = sv) end proc

s:="test";
foo();

"test"

Warning, the global variable(s) {s} used by DynamicSystems are assigned values.  They must be unassigned to load DynamicSystems.  DynamicSystems:-SystemOptions may be used to reassign the options that use these variable(s):
  complexfreqvar = s

x

restart;

foo:=proc()
 local sv;
 local s;

 DynamicSystems:-SystemOptions('statevariable'=sv);

end proc;

proc () local sv, s; DynamicSystems:-SystemOptions('statevariable' = sv) end proc

s:="test";
foo();

"test"

Warning, the global variable(s) {s} used by DynamicSystems are assigned values.  They must be unassigned to load DynamicSystems.  DynamicSystems:-SystemOptions may be used to reassign the options that use these variable(s):
  complexfreqvar = s

x

restart;

#warnign goes away when there is no global used  s before the call is made
foo:=proc()
 local sv;
 local s;

 DynamicSystems:-SystemOptions('statevariable'=sv);

end proc;

proc () local sv, s; DynamicSystems:-SystemOptions('statevariable' = sv) end proc

foo();

x

 


 

Download dynamic_systems_uses_gloabl_s.mw

 

For display of plot axes labels, I prefer to use the Typesseting in place so that diff(y(x),x) display as y'(x) (takes less space and looks better also).

It does that in the worksheet. But when using diff(y(x),x) as the Y axis label, the plot still shows diff(y(x),x) and not y'(x).

Is there a way to make plot and DEtools:-DEplot  use the Typesetting in place?   What is the point of using Typesetting if plots generated do not use it?
 

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 1781 and is the same as the version installed in this computer, created 2024, August 4, 11:27 hours Pacific Time.`

restart;

interface(typesetting = extended)

extended

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

#phase plot for second order ode. Y axis is y'(x) and X axis is y(x)
#uses DynamicsSystems for conversion.
ode := diff(y(x),x$2) = -y(x)-1/2*diff(y(x),x);   
DynamicSystems:-SystemOptions('statevariable'=sv):
DynamicSystems:-SystemOptions('discretefreqvar'=ssv):            
DynamicSystems:-SystemOptions('outputvariable'=sssv):
DynamicSystems:-SystemOptions('continuoustimevar'=ssssv):  

DynamicSystems:-SystemOptions('continuoustimevar'=x):            
sys:=DynamicSystems:-DiffEquation(ode,'outputvariable'=[y(x)]):

sys0:=DynamicSystems:-StateSpace(sys):
eq1:=diff(X1(x),x)=sys0:-a[1,..].Vector([X1(x),X2(x)]):
eq2:=diff(X2(x),x)=sys0:-a[2,..].Vector([X1(x),X2(x)]):

DEtools:-DEplot([eq1,eq2],[X1(x),X2(x)],x=0..100,
            X2=-4..4,X1=-4..4,
            axes=boxed,
            linecolor = red,        
            labels=[y(x),diff(y(x),x)]);
 

diff(diff(y(x), x), x) = -y(x)-(1/2)*(diff(y(x), x))

 


 

Download labels_for_plot_do_not_use_typesetting_maple_2024.mw

 

Notice the label on Y axis above. I'd like that to display as y'(x) as it is in the worksheet.

 

I noticed very serious problem in Maple 2024.1

This is new windows 10  22H2  installation. With Maple 2024.1. I've only seen this using Maple and no other windows applications. I have 2 monitors and NVIDIA GeForce RTX 3060 graphics card.

What happens is that sometimes (may be 2-3 times each day), Maple frontend gets all mangled up. I could not figure what causes it. it could be when I move the window from one terminal to the other. sometimes it happens when I open a debugger window.

Only way to fix this is to close all of Maple and start it again. 

Just wondering if anyone seen anything like this and what can cause it. Again, it is only Maple that shows this problem, no other windows application does this. Have 128 GB Ram and PC is only 2 years old.

This is the very first time I see this in Maple and used Maple for long time and on this same PC before and had two terminals also before all the time. I have no idea what causes it.

Could it be Java problem in Maple 2024.1 ?

First 21 22 23 24 25 26 27 Last Page 23 of 199