On Thu, 4 Jan 2024 at 12:15, Emmanuel Charpentier
<emanuel.charpent...@gmail.com> wrote:
>
> But this does not explain whiy Sage is uneble o check (numericalmlmy or 
> otherwise) the solutions given by Sympy or Mathematica, which check in Sympy 
> (I didn’t yet try to check them in Mathematica, the limitations of the 
> current Mathematica interface make this bothersome…).

The problem is with Sage's subs method:

sage: e1 = (-40/3)**(2/3)
sage: e2 = (y**(2/3)).subs({y:-40/3})
sage: e1
4*(-5/3)^(2/3)
sage: e2
4*(5/3)^(2/3)
sage: e1.n()
-2.81144221767250 + 4.86956076355288*I
sage: e2.n()
5.62288443534499

When the number to be substituted has an exact cube factor subs loses
the sign under the radical:

sage: (y^(2/3)).subs({y:-12})
(-12)^(2/3)
sage: (y^(2/3)).subs({y:-24})
4*3^(2/3)

This is most likely due to confusing y^(n/m) as (y^n)^(1/m) when it
should be (y^(1/m))^n. These are not equivalent if y^(1/m) means the
principal mth root.

--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAHVvXxQg7XDM93_ZWf26kWfxWY3D1RorGewiG33T77TfGPS-Ng%40mail.gmail.com.

Reply via email to