[SciPy-user] how to resolve a cubic equation in scipy?

Pauli Virtanen pav@iki...
Fri May 16 08:57:01 CDT 2008


Fri, 16 May 2008 21:03:22 +0800, zhang chi wrote:

> hi
>    I want to resolve a cubic equation 1.2r^3  + r - 20 = 0.
> 
> Could scipy can complete this work?

>>> scipy.roots([1.2, 0, 1, -20])
array([-1.22284347+2.30637633j, -1.22284347-2.30637633j,  
       2.44568694+0.j        ])



More information about the SciPy-user mailing list