root(-1, 3).simplify()
(-1)**(1/3)//Output
This is not what I want, any way to simplify this to -1?
Try
real_root(-1, 3)
It's referred to in the doc string of the root function too.
The reason is simple: sympy, like many symbolic algebra systems, takes the complex plane into account when calculating "the root". There are 3 complex numbers that, when raised to the power of 3, result in -1. If you're just interested in the real-valued root, be as explicit as you can.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With