axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] One more integral to add to the tests, if not alre


From: Martin Rubey
Subject: Re: [Axiom-developer] One more integral to add to the tests, if not already there
Date: 18 Oct 2006 08:15:27 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"William Sit" <address@hidden> writes:

> On Tue, 17 Oct 2006 17:18:37 -0700 (PDT)
>   C Y <address@hidden> wrote:
> >integrate(%e^cos(x)*cos(x-sin(x)),x = 0..2*%pi)
> >
> > Apparently this can be solved by Mathematica in it's upcoming version. We
> > currently get "failed."
> >
> >Cheers,
> >CY
> 
> Apparently, Mathematica got this wrong in Version 5.2:
> In[1]:=
> Integrate[Exp[Cos[x]] Cos[x-Sin[x]], {x,0,2 Pi}]
> 
> Out[1]=
> 0
> 
> But a look at the graph of the integrand shows this is clearly wrong. Indeed,
> In[3]:=
> NIntegrate[Exp[Cos[x]] Cos[x-Sin[x]], {x,0,2 Pi}]
> 
> Out[3]=
> 6.28319
> 
> which looks like the exact answer is 2 Pi.

Yes, both Maple and Mathematica currently need help (namely you have to say
Expand[Cos[x - Sin[x]]]), but the upcoming version of Mathematica fixes this. 

See:

http://groups.google.com/group/sci.math.symbolic/browse_frm/thread/2987d75001d88189/408eefdbb9b6266b?lnk=raot&hl=en#408eefdbb9b6266b

It would really be good to have an integration expert around.

Martin

By the way, the indefinite integral is according the MMA

In[2]:= Integrate[E^Cos[x] * TrigExpand[ Cos[ x - Sin[x] ] ], x]

             I x           -I x
        I   E    - I x    E     + I x                  -I x
Out[2]= - (E           - E            + ExpIntegralEi[E    ] -
        2

                      I x
>      ExpIntegralEi[E   ])

so I suspect that we might be able to tweak the pattern matcher to do it.

TrigExpand gives

In[3]:= TrigExpand[ Cos[ x - Sin[x] ] ]

                    Cos[x]   I              Cos[x]   I
Out[3]= Cos[x] Cosh[------ - - Sin[x]] Cosh[------ + - Sin[x]] +
                      2      2                2      2

            Cos[x]   I                     Cos[x]   I
>    I Cosh[------ + - Sin[x]] Sin[x] Sinh[------ - - Sin[x]] -
              2      2                       2      2

            Cos[x]   I                     Cos[x]   I
>    I Cosh[------ - - Sin[x]] Sin[x] Sinh[------ + - Sin[x]] -
              2      2                       2      2

                 Cos[x]   I              Cos[x]   I
>    Cos[x] Sinh[------ - - Sin[x]] Sinh[------ + - Sin[x]]
                   2      2                2      2

Maybe you could look into this, Cliff?

You will have to consider the proposed fix to issue #191

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]