I think it's reasonable to keep it as it is now.  The reason is that
we can then say that expr.subs(x, sol) will give 0.  This wouldn't
hold for solutions based on continuous extension.

I was going to say that you could use cancel() to get rid of these,
but that only holds for rational functions. For example, sin(x)/x - 1
has a "zero" at x = 0, but the only way to get this from solve is to
give check=False. So I think we should keep it like this, but document
that if you want the others, you should pass check=False to solve().

In [31]: solve(sin(x)/x, x)
Out[31]: []

In [32]: solve(sin(x)/x, x, check=False)
Out[32]: [0]

This is kind of analogous the force option to many of the simplify()
options.  By default, we are rigorous, and only do the transformation
if it is valid.  But we allow force=True to give the algebraic
solution. Rigorously, x/(x**2 + x) is not equal to 1/(x + 1), but many
fields consider them to be equivalent for the sake of simplification
of the theory.

Aaron Meurer

On Wed, Jan 11, 2012 at 6:28 AM, Chris Smith <[email protected]> wrote:
>> No, no, it is continuous  because the limit when x-->0 exists (equals
>> 0), and the same as a value of function at this point, 0**2/0 (which by
>> definition is equal 0).
>>
> In earlier discussions we decided not to allow solutions of equations
> that set any denominator to zero even though the limit at that point
> might exist. I wonder if that should be changed so that if the limit
> exists and is the same from both directions the solution is returned;
>
>>>> e=(x**2*(1/x - z**2/x))
>>>> e.expand()
> -x*z**2 + x
>>>> solve(_,x)
> [0]
>>>> solve(e,x)
> []
>>>> e.subs(x,0)
> 0
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" 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?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to