Hi,
You could use epath(), e.g.:
In [1]: expr = 1/(1-x) + 1/(1+x)
In [2]: e2 = Integral(expr, x)
In [3]: epath("/[0]", e2, lambda e: e.together().expand())
Out[3]:
⌠
⎮ 2
⎮ ──────── dx
⎮ 2
⎮ - x + 1
⌡
If you know XPath, then this approach should be familiar. See the
docstring for details. If unsure what expressions will be selected,
then skip the lambda part and epath() will return matching
expressions.
Mateusz
> --
> 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+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/b59b0e08-884b-4d09-9065-d604f3509d5c%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.