Question: which method to use to remove RootOf ?

I know of 3 ways to remove RootOf, but sometimes they give different result. How does one decide which to use? This is done in code. So method to decide can't depend on looking at the screen and see which result one "likes" more than the other.

Is allvalues() the one to use all the time? Could one of these 3 methods fail, and then one has to try the next one?

 

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1859 and is the same as the version installed in this computer, created 2025, April 6, 14:34 hours Pacific Time.`

restart

e:=y*4^(1/3)*((4*x^2*RootOf(_Z^2*y - 4*_Z*x + y) - y^2*RootOf(_Z^2*y - 4*_Z*x + y) - x*y)/y^2)^(1/3) - _C2;

y*4^(1/3)*((4*x^2*RootOf(_Z^2*y-4*_Z*x+y)-y^2*RootOf(_Z^2*y-4*_Z*x+y)-x*y)/y^2)^(1/3)-_C2

convert(e,radical)

y*4^(1/3)*((4*x^2*(2*x+(4*x^2-y^2)^(1/2))/y-y*(2*x+(4*x^2-y^2)^(1/2))-x*y)/y^2)^(1/3)-_C2

DEtools:-remove_RootOf(e)

(1/16)*(c__2^3+4*x*y^2)^2/(y*(4*x^2-y^2)^2)-(c__2^3+4*x*y^2)*x/(y*(4*x^2-y^2))+y = 0

allvalues( e)

y*4^(1/3)*((4*x^2*(2*x+(4*x^2-y^2)^(1/2))/y-y*(2*x+(4*x^2-y^2)^(1/2))-x*y)/y^2)^(1/3)-c__2, y*4^(1/3)*((-4*x^2*(-2*x+(4*x^2-y^2)^(1/2))/y+y*(-2*x+(4*x^2-y^2)^(1/2))-x*y)/y^2)^(1/3)-c__2


 

Download removing_rootof_april_7_2025.mw

Please Wait...