Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 4003 by spoo...@abv.bg: Cannot return general quartic solution
http://code.google.com/p/sympy/issues/detail?id=4003

What I am trying to do is this:

In [1]: var('a b c d e x')
Out[1]: (a, b, c, d, e, x)

In [2]: solve( a*x**4 + b*x**3 + c*x**2 + d*x + e , x )

But there is this error:

---------------------------------------------------------------------------
PolynomialError                           Traceback (most recent call last)
<ipython-input-2-5df3c8dd7670> in <module>()
----> 1 solve( a*x**4 + b*x**3 + c*x**2 + d*x + e , x )

/usr/local/lib/python2.7/dist-packages/sympy/solvers/solvers.pyc in solve(f, *symbols, **flags) 885 ###########################################################################
    886     if bare_f:
--> 887         solution = _solve(f[0], *symbols, **flags)
    888     else:
    889         solution = _solve_system(f, symbols, **flags)

/usr/local/lib/python2.7/dist-packages/sympy/solvers/solvers.pyc in _solve(f, *symbols, **flags) 1356 poly = Poly(poly.as_expr(), poly.gen, composite=True) 1357 soln = list(roots(poly, cubics=True, quartics=True, -> 1358 quintics=True).keys())
   1359
   1360                         if len(soln) < deg:

/usr/local/lib/python2.7/dist-packages/sympy/polys/polyroots.pyc in roots(f, *gens, **flags)
    880                                 _update_dict(result, root, 1)
    881                 else:
--> 882                     for root in _try_decompose(f):
    883                         _update_dict(result, root, 1)
    884             else:

/usr/local/lib/python2.7/dist-packages/sympy/polys/polyroots.pyc in _try_decompose(f)
    783         factors, roots = f.decompose(), []
    784
--> 785         for root in _try_heuristics(factors[0]):
    786             roots.append(root)
    787

/usr/local/lib/python2.7/dist-packages/sympy/polys/polyroots.pyc in _try_heuristics(f)
    829             result += roots_cubic(f)
    830         elif n == 4 and quartics:
--> 831             result += roots_quartic(f)
    832         elif n == 5 and quintics:
    833             result += roots_quintic(f)

/usr/local/lib/python2.7/dist-packages/sympy/polys/polyroots.pyc in roots_quartic(f)
    291                 y = -5*e/6 + u - p/u/3
    292             else:
--> 293 raise PolynomialError('cannot return general quartic solution')
    294             w = sqrt(e + 2*y)
    295             arg1 = 3*e + 2*y

PolynomialError: cannot return general quartic solution
-------------------------------------------------------------------------------

I tried to solve the same equation in WolframAlpha and SAGE, there are solutions in both systems, only SymPy gives this error.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to