#12322: invalid simplification of complex logarithm
-------------------------------------------------+-------------------------
       Reporter:  mjo                            |        Owner:  burcin
           Type:  defect                         |       Status:
       Priority:  major                          |  needs_work
      Component:  symbolics                      |    Milestone:  sage-5.13
       Keywords:                                 |   Resolution:
        Authors:  Michael Orlitzky               |    Merged in:
Report Upstream:  Reported upstream. No          |    Reviewers:
  feedback yet.                                  |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:  #12737                         |     Stopgaps:
-------------------------------------------------+-------------------------
Description changed by jdemeyer:

Old description:

> As pointed out by J.H. Davenport in this sage-support thread,
>
> http://groups.google.com/group/sage-
> support/browse_thread/thread/f9d2209041775c3e
>
> the following (invalid) log simplification is made:
>
> {{{
> sage: t = var('t')
> sage: assume(t, 'complex')
> sage: assumptions()
> [t is complex]
> sage: f = (1/2)*log(2*t) + (1/2)*log(1/t)
> sage: f.full_simplify()
> 1/2*log(2)
> }}}
>
> When, for example, t=-1,
>
> {{{
> sage: f(t = -1)
> I*pi + 1/2*log(2)
> }}}
>
> The assumption that `t` is complex is not necessary here, but simplify
> should ''definitely'' not ignore the imaginary part when dealing with
> complex functions.

New description:

 As pointed out by J.H. Davenport in this sage-support thread,

 http://groups.google.com/group/sage-
 support/browse_thread/thread/f9d2209041775c3e

 the following (invalid) log simplification is made:

 {{{
 sage: t = var('t')
 sage: assume(t, 'complex')
 sage: assumptions()
 [t is complex]
 sage: f = (1/2)*log(2*t) + (1/2)*log(1/t)
 sage: f.full_simplify()
 1/2*log(2)
 }}}

 When, for example, t=-1,

 {{{
 sage: f(t = -1)
 I*pi + 1/2*log(2)
 }}}

 The assumption that `t` is complex is not necessary here, but simplify
 should ''definitely'' not ignore the imaginary part when dealing with
 complex functions.

 '''Apply''' [attachment:sage-trac_12322.patch]

--

--
Ticket URL: <http://trac.sagemath.org/ticket/12322#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to