Combining exponents is such a common operation that not doing so would
be a huge burden on the whole system. I think you'll just have to put
a note in the continuous_domain docstring that this sort of thing
happens.

Aaron Meurer

On Thu, Jun 23, 2016 at 6:27 AM, Kshitij Saraogi
<[email protected]> wrote:
> While developing the methods for determining the domain and range of the
> given function,
> I stumbled across the following particular case:
>
> In []: x = symbols('x')
>
> In []: x/x
> Out[]: 1
>
> In []: (x-1)**2/(x-1)
> Out[]: x - 1
>
> In []: (x**2 - 2*x + 1)/(x-1)
> Out[]: (x**2 - 2*x + 1)/(x - 1)
>
> Having read this wiki, I know that automatic simplification is a known
> issue.
>
> In the case of determining domains, this leads to incorrect results.
> For example,
>
> In []: continuous_domain(x/x, x,S.Reals)
> Out[]: (-oo, 0) U (0, oo)
>
> However, with the automatic simplification, this is not quite the case.
> The function `x/x` gets automatically simplified to `1` which does not take
> into account the singularity at x = 0.
>
> The same situation arises with the case of `(x - 1)^2/ (x - 1)` which
> simplifies to `x - 1`.
>
> I would like some inputs on handling these issues.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/65fc3b03-cdb9-450b-b2f9-2e4cd402d846%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KQ__BmXUzrx2JBnSopUFV%3DfJ7_Uo%2Bb%2BqBd48B%3DJPNipQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to