[sage-support] Re: Simplifying log expressions
Unfortunately, full_simplify has its own problems, notably with branch cuts. sage: f = (1/2)*log(2*t) + (1/2)*log(-t) sage: f.full_simplify() 1/2*log(2) Unfortunately, when t=-1, we have the sum of the logarithms of two negative numbers, and therefore the imaginary part is 2i pi, not 0 On Jan 12, 10:24 pm, Michael Orlitzky mich...@orlitzky.com wrote: On 01/12/12 17:16, Tom Judson wrote: I would like to simplify the difference of two log expressions to show that I get a constant, but simplify((1/2)*log(2*t) - (1/2)*log(t)) just returns the expression. Does anyone know of an easy fix for this? Preferably, I would like something that Calculus II students could easily use. There's no global function for it, but what you want is to call full_simplify() on the expression. sage: f = (1/2)*log(2*t) - (1/2)*log(t) sage: f.full_simplify() 1/2*log(2) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Simplifying log expressions
On 01/13/2012 07:38 PM, JamesHDavenport wrote: Unfortunately, full_simplify has its own problems, notably with branch cuts. sage: f = (1/2)*log(2*t) + (1/2)*log(-t) sage: f.full_simplify() 1/2*log(2) In my session, I had the difference of two logarithms. In yours above, you've got the sum. Is that an actual sage session? I get something different on 4.8.alpha6: sage: f = (1/2)*log(2*t) + (1/2)*log(-t) sage: f.full_simplify() 1/2*I*pi + 1/2*log(2) + log(t) In the example below, with t=-1, both logs should have imaginary part pi and real parts log(2) and zero respectively? There's no global function for it, but what you want is to call full_simplify() on the expression. sage: f = (1/2)*log(2*t) - (1/2)*log(t) sage: f.full_simplify() 1/2*log(2) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org