Comment #1 on issue 1579 by asmeurer: Have solve() return RootOf when it  
can't solve equations
http://code.google.com/p/sympy/issues/detail?id=1579

So I think that another thing that needs to be done is for RootOf to be  
moved out of polys completely.  This
means that it doesn't even have a Poly in its args, as it does now.  The  
reason is that Poly is not meant for user
interaction, and its nonstandard args (Python ints, tuples, and strings)  
can screw with core algorithms that expect
Basic objects in all args.  Some of these algorithms go through args  
recursively, so even if the user doesn't use
Poly directly, if he uses RootOf, and RootOf has a Poly in its args, it  
will cause problems.

For example, this fails because of the Poly in RootOf:
_m = Symbol('_m')
C1 = Symbol('C1')
C2 = Symbol('C2')
C3 = Symbol('C3')
C4 = Symbol('C4')
C5 = Symbol('C5')
print Eq(f(x), C1*exp(x*RootOf(Poly(_m**5 + 11*_m - 2, _m), index=0)) + \
         C2*exp(x*RootOf(Poly(_m**5 + 11*_m - 2, _m), index=1)) + \
         C3*exp(x*RootOf(Poly(_m**5 + 11*_m - 2, _m), index=2)) + \
         C4*exp(x*RootOf(Poly(_m**5 + 11*_m - 2, _m), index=3)) + \
         C5*exp(x*RootOf(Poly(_m**5 + 11*_m - 2, _m), index=4)))

I think the RootOf args should be the same as what is printed:
In [3]: RootOf(Poly(x**5 - 11*x + 2, x), index=1)
Out[3]: RootOf(x**5 - 11*x + 2, x, index=1)

In [4]: RootOf(x**5 - 11*x + 2, x, index=1) # This is how it should be  
constructed
TypeError: __new__() got multiple values for keyword argument 'index'

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to