You can do a little manual simplification like this: >>> integrate(1/(1-z),(z,0,z)) -log(z - 1) + I*pi >>> exp(_) -1/(z - 1) >>> 1/(-1/_/-1) # the badger-face inversion :-) 1/(-z + 1) >>> log(_) log(1/(-z + 1))
But that can't simplify to -log(1-z) because that is not valid unless 1-z is positive. >>> expand_log(log(1/Dummy(positive=True))) -log(_Dummy_85) >>> expand_log(log(1/Dummy(nonnegative=True))) log(1/_Dummy_86) >>> expand_log(log(1/Dummy(negative=True))) log(1/_Dummy_107) On Friday, February 13, 2015 at 6:37:56 PM UTC-6, Ian Bell wrote: > > There was an embedded image, but clearly that didn't work. > > >> integrate(1/(1-z),(z,0,z)) > > was the command. I used a picture to show that you get an imaginary term > as part of the return value > > On Friday, February 13, 2015 at 4:11:54 PM UTC-7, Aaron Meurer wrote: >> >> >> >> On Fri, Feb 13, 2015 at 3:42 PM, Ian Bell <ian.h...@gmail.com> wrote: >> >>> I am trying to do an integration like this: >>> >> >> Was there supposed to be something here? It's just showing up as empty >> space for me. >> >> Aaron Meurer >> >> >>> >>> >>> >>> Ultimately the result I should be able to get is -log(1-z) >>> >>> Manual integration shows that you can integrate(1/(1-z),z) -> -log(z-1), >>> evaluation at the limits yields -log(z-1) - (-log(-1)) which you can >>> simplify to -log(1-z). How can I tell sympy to delay evaluation until >>> after it has done the simplification? I guess that it first does log(-1), >>> which it isn't happy about... >>> >>> Ian >>> >>> -- >>> 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/fdbada4e-6ba0-4de5-835f-5121aaa022ce%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/sympy/fdbada4e-6ba0-4de5-835f-5121aaa022ce%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@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/95372b64-3f66-484b-b8c2-1efff0d3a87f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.