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)
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?
Quick hint: If you click the Text button in the upper right of the
notebook, you'll get something that looks like a normal Sage session.
>
> On Jan 14, 1:47 am, Michael Orlitzky <mich...@orlitzky.com> wrote:
>> 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-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
I created a ticket for this here:
http://trac.sagemath.org/sage_trac/ticket/12322
Thanks for the example!
Sage calls Maxima to do such kinds of computations. If one uses Maxima
on these expressions directly, it does not come up any better than that.
(Or perhaps one needs to know more about Maxima than I do).
Best,
Dmitrii
>
> Sincerely,
> Greg Marks
>