Status: Accepted
Owner: ----
Labels: Type-Defect Priority-High Solvers

New issue 1398 by ondrej.certik: solve(1/(5+x)**(S(1)/5)-9, x) fails
http://code.google.com/p/sympy/issues/detail?id=1398

In [9]: solve(1/(5+x)**(S(1)/5)-9, x)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/ondrej/repos/sympy/<ipython console> in <module>()

/home/ondrej/repos/sympy/sympy/solvers/solvers.pyc in solve(f, *symbols,
**flags)
     207                 f_ = f.subs(symbol, t**m)
     208                 if guess_solve_strategy(f_, t) != GS_POLY:
--> 209                     raise TypeError("Could not convert to a
polynomial equation: %s" % f_)
     210                 cv_sols = solve(f_, t)
     211                 result = list()

TypeError: Could not convert to a polynomial equation: -9 + (5 +  
_t**5)**(-1/5)




This was found out by doing:


In [1]: y = Function("y")

In [2]: soln = dsolve(Derivative(y(x),x)+sin(x)*y(x)**6,y(x))

In [3]: soln
Out[3]:
         1
─────────────────
5 ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
╲╱ C₁ - 5⋅cos(x)

In [4]: ypi = soln.subs(x, pi)

In [5]: ypi
Out[5]:
     1
──────────
5 ⎽⎽⎽⎽⎽⎽⎽⎽
╲╱ 5 + C₁

In [6]: C1=Symbol("C1")

In [7]: solve(ypi-9, C1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/ondrej/repos/sympy/<ipython console> in <module>()

/home/ondrej/repos/sympy/sympy/solvers/solvers.pyc in solve(f, *symbols,
**flags)
     207                 f_ = f.subs(symbol, t**m)
     208                 if guess_solve_strategy(f_, t) != GS_POLY:
--> 209                     raise TypeError("Could not convert to a
polynomial equation: %s" % f_)
     210                 cv_sols = solve(f_, t)
     211                 result = list()

TypeError: Could not convert to a polynomial equation: -9 + (5 +  
_t**5)**(-1/5)



--
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