#8728: doctest fixed integral from Maxima
-------------------------------------------------+-------------------------
       Reporter:  kcrisman                       |        Owner:  burcin
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.4
      Component:  calculus                       |   Resolution:
       Keywords:                                 |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Fixed upstream, in a later     |  Work issues:
  stable release.                                |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Old description:

> From #sage-devel:
>
> {{{
> Boulemans left the chat room. (Read error: Connection reset by peer)
> [11:58am] Boule joined the chat room.
> [11:58am] Boule: (laptop shutdown due to power supply)
> [11:59am] Boule: e, T, w = var("e T w"); assume(1 = e^2)>0;
> integrate(cos(w+T)/(1+e*cos(T))^2,T,0,2*pi) should give -2*pi e cos
> w/(1-e^2)^3/2 instead of 0
> [11:59am] Boule: can someone help?
> [12:00pm] wjp: yeah, sage seems to have some trouble with this integral.
> You could try http://groups.google.com/group/sage-support since the right
> people don't seem to be here currently
> [12:00pm] Boule: ok, thanx
> [12:08pm] kcrisman: By the way, I just tried this and get a hang in
> Maxima.  Can you type the exact commands which lead to an answer of 0?
> [12:08pm] kcrisman: If I plug something (.5, .75) in for e in Maxima in
> Sage, I do get zero as an output.
> [12:12pm] Boule: don't know maxima, but with numerical values for e and w
> at wolfram-alfa, it gives something different than 0
> [12:13pm] wjp: *nod* maple gives non-zeros too
> [12:13pm] kcrisman: Can you give the *exact* sequence of commands which
> yield zero in Sage itself?
> [12:14pm] Boule: e = var('e')
> [12:14pm] Boule: T = var('T')
> [12:14pm] Boule: w = var('w')
> [12:14pm] baali1 joined the chat room.
> [12:14pm] baali left the chat room. (Quit: Leaving.)
> [12:15pm] Boule: assume(1-e^2>0)
> [12:15pm] Boule:  integrate(cos(w+T)/(1+e*cos(T))^2,T,0,2*pi)
> [12:15pm] kcrisman: Okay, that's what I thought.
> [12:16pm] kcrisman: Okay, it takes a while but I do get 0.
> }}}

New description:

 This is fixed now and needs a doctest:

 From #sage-devel:

 {{{
 Boulemans left the chat room. (Read error: Connection reset by peer)
 [11:58am] Boule joined the chat room.
 [11:58am] Boule: (laptop shutdown due to power supply)
 [11:59am] Boule: e, T, w = var("e T w"); assume(1 = e^2)>0;
 integrate(cos(w+T)/(1+e*cos(T))^2,T,0,2*pi) should give -2*pi e cos
 w/(1-e^2)^3/2 instead of 0
 [11:59am] Boule: can someone help?
 [12:00pm] wjp: yeah, sage seems to have some trouble with this integral.
 You could try http://groups.google.com/group/sage-support since the right
 people don't seem to be here currently
 [12:00pm] Boule: ok, thanx
 [12:08pm] kcrisman: By the way, I just tried this and get a hang in
 Maxima.  Can you type the exact commands which lead to an answer of 0?
 [12:08pm] kcrisman: If I plug something (.5, .75) in for e in Maxima in
 Sage, I do get zero as an output.
 [12:12pm] Boule: don't know maxima, but with numerical values for e and w
 at wolfram-alfa, it gives something different than 0
 [12:13pm] wjp: *nod* maple gives non-zeros too
 [12:13pm] kcrisman: Can you give the *exact* sequence of commands which
 yield zero in Sage itself?
 [12:14pm] Boule: e = var('e')
 [12:14pm] Boule: T = var('T')
 [12:14pm] Boule: w = var('w')
 [12:14pm] baali1 joined the chat room.
 [12:14pm] baali left the chat room. (Quit: Leaving.)
 [12:15pm] Boule: assume(1-e^2>0)
 [12:15pm] Boule:  integrate(cos(w+T)/(1+e*cos(T))^2,T,0,2*pi)
 [12:15pm] kcrisman: Okay, that's what I thought.
 [12:16pm] kcrisman: Okay, it takes a while but I do get 0.
 }}}

--

Comment (by rws):

 Here's the doctest:
 {{{
 sage: assume(1-e^2>0)
 sage: assume(abs(e)-sqrt(1-e^2)-1>0)
 sage: assume(abs(sqrt(1-e^2)-1)-abs(e)>0)
 sage: integrate(cos(w+T)/(1+e*cos(T))^2,T,0,2*pi)
 2*pi*sqrt(-e^2 + 1)*e*cos(w)/(e^4 - 2*e^2 + 1)
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/8728#comment:19>
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/d/optout.

Reply via email to