Question: using arrows = curve gives error in DEplot. Any workaround?

After I switched to using arrows = curve in the call to DEtools:-DEplot I found errors in some calls. 

Is there a workaround other than not using this option? As phase plot looks like better with this option. For now, I will remove this option.

Here is an example

restart;

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0],arrows = 'curve')

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

But this works

restart;

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0])

I will report this to Maplesoft as it looks like a bug to me. 

May be someone can find a workaround so I can use arrows = curve?

Maple 2023.2 on windows 10

``

restart;

292176

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0],arrows = 'curve')

diff(y(x), x)-1/(-x^2+1)^(1/2) = 0

-.99 .. .99

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

restart;

292176

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0])

diff(y(x), x)-1/(-x^2+1)^(1/2) = 0

-.99 .. .99

 

Download detools_deplot_arrows_curve_problem_NOV_10_2023.mw

Update FEB 18, 2025

FYI, This is another example of DEplot failing. This time when using arrows=comet.

I hope Maplesoft can fix these problems in Maple 2025.


 

restart;

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.`

 

ode:=diff(y(x),x) = y(x)/x-2/x*sin(3*y(x)/x)^(1/2);

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

DEtools:-DEplot( ode, y(x), x=-5..5,y=-5..5);

 

DEtools:-DEplot( ode, y(x), x=-5..5,y=-5..5,'arrows'='comet');

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

DEtools:-DEplot( ode, y(x), x=-5..5,y=-5..5,'arrows'='comet',arrowsize =  magnitude);

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

 


 

Download comet_gives_error.mw

 

Please Wait...