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
<https://github.com/sympy/sympy/wiki/Automatic-Simplification>, 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.