Question: bug report. convert(..,y_x) converts non equation to equation, sometimes and sometimes not.

I found that convert(ode,y_x) converts the input ode, when it is NOT an equation, to an equation.  

sometimes and sometimes not.

For example,  convert(diff(y(t),t)+y(t)-t,y_x)  gives diff(t(y), y) = 1/(t(y) - y) 

Notice the input is not an equation. Maple adds = and makes an equation in the output. 

This can cause no problem if it works like this in all cases. But if the input has piecewise, then Maple no longer does the same and keep the output as not an equation.

I found this by accident, as my code was doing lhs() on the result of convert, and that always worked, except when I used an ode with piecewise.

This behaviour is not consistent. Maple should either always convert output to equation for all input or not convert. It should not do it for some input and not the other.

Actually, the best behaviour is for the software to reject the input in first place if it is not an equation.

Worksheet below.

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 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

libname;

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

#this works even when there is no equation in input, but the result is equation
ode:=diff(y(t),t)+y(t)-t;
convert(ode,y_x,y(t))

diff(y(t), t)+y(t)-t

diff(t(y), y) = 1/(t(y)-y)

ode:=diff(y(t),t)+y(t)-t=0; #this gives same result as above.
convert(ode,y_x,y(t))

diff(y(t), t)+y(t)-t = 0

diff(t(y), y) = 1/(t(y)-y)

#but now if the input is not equation, the output is not equation. Why
#did it not do the same as above??
ode:=diff(y(t),t)+y(t)-piecewise(0<=t and t<=1,2,t>1,0);
convert(ode,y_x,y(t))

ode := diff(y(t), t)+y(t)-piecewise(0 <= t and t <= 1, 2, 1 < t, 0)

1/(diff(t(y), y))+y-piecewise(0 <= t(y) and t(y) <= 1, 2, 1 < t(y), 0)

 

 

Download strange_behaviour_of_convert_yx_jan_5_20225.mw

Please Wait...