Maybe you are mischaracterizing what you are doing, but in my view you
don't determine the domain and range of
a function by looking at its defining expression. That is something that
is part of the definition of the function.
What is the domain of sin()? Well, it could be the reals, it could be
complex numbers, or maybe for your
particular problem it might be 0 to 2*pi.
If you are interested in* locating singularities of a function, *then you
might need to distinguish
removable singularities from non-removable ones. Sometimes the simplifier
will simplify away
the removable singularities. (There are also regular and irregular
singularities in the context
of differential equations, if you are looking at them.)
As for how to find singularities of E(x), maybe solve 1/E(x)=0. That
will find some of them
but not all. What methods did you have in mind?
RJF
On Thursday, June 23, 2016 at 3:27:33 AM UTC-7, Kshitij Saraogi 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
> <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/73ff6c59-2257-4feb-bee1-58cf21aaa4c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.