- What is a good example of an equation that has a solution, but which

> cannot be represented symbolically (as an example of when solve()
> might return no solutions for this reason)?
>
>
>>> solve(cos(x)+x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sympy/solvers/solvers.py", line 834, in solve
    solution = _solve(f[0], *symbols, **flags)
  File "sympy/solvers/solvers.py", line 1339, in _solve
    result = _tsolve(f_num, symbol, **flags)
  File "sympy/solvers/solvers.py", line 2166, in _tsolve
    return _solve(rewrite - rhs, sym)
  File "sympy/solvers/solvers.py", line 1345, in _solve
    "\nNo algorithms are implemented to solve equation %s" % f)
NotImplementedError: multiple generators [x, exp(I*x)]
No algorithms are implemented to solve equation exp(I*x)
>>> nsolve(cos(x)+x,x,0)
mpf('-0.73908513321516064')



> - I thought we decided to remove NotImplementedError from solve(). Or
> was that just None?
>
>
I don't recall


> - The lack of a consistant return type is killing me. It seems the
> type depends not just on whether you are solving one or two equations,
> but also on the *type* of the equations!
>
>
Yes, it's all detailed in the docstring.


> In [5]: solve([x - 1, y - 1], [x, y])
> Out[5]: {x: 1, y: 1}
>
> In [6]: solve([x**2 - 1, y - 1], [x, y])
> Out[6]: [(-1, 1), (1, 1)]
>
> Is there a reason that we don't set `dict=True` by default, at least
> for systems of equations?
>
>
I think this will mean only that errors arising because of the unexpected
type will need to be fixed.

I'm tempted to not even discuss solving systems of equations at all,
> because the lack of a consistant return type would just make the
> discussion too confusing for new users (and embarrassing for us).
>

It's a matter of reaching consensus or of you making a decision. See issues
3667 and 3560.

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


Reply via email to