MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Strange results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15429] RE: [mg15389] Strange results
  • From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
  • Date: Wed, 13 Jan 1999 20:57:40 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Ing. Alessandro Toscano  wrote:

The following in/out does not make sense to me:

In[2]:=
p=Integrate[Cos[x]^n,x]
Out[2]=
\!\(\(-\(\(Cos[x]\^\(1 + n\)\
          Hypergeometric2F1[\(1 + n\)\/2, 1\/2, \(3 + n\)\/2,
Cos[x]\^2]\
          Sin[x]\)\/\(\((1 + n)\)\ \ at Sin[x]\^2\)\)\)\) 

In[4]:=
p//.n->0//PowerExpand
Out[4]=
-ArcSin[Cos[x]]
_____________
REPLY:

If the answer from Integrate differs from the one you expect by an
arbitrary constant there isn't a problem.  Now if we add Pi/2 to the
answer above we get something very close to what you expected. (see
below) 

In[5]:=
FullSimplify[Pi/2-ArcSin[Cos[x]]]
Out[5]=
ArcCos[Cos[x]]

This of course simplifies to (x) for 0<=x<=Pi.  For other values of (x)
this is off by a multiple of 2*Pi. I doubt it's possible to express
Integrate[Cos[x]^n, x] in closed form without such pit falls.

_________________
In[7]:=
p//.n->1//Simplify//PowerExpand
Out[7]=
-1+Sin[x]

Isn't it true that (Integrate[Cos[x]^0,x] == x? Isn't it true that
(Integrate[Cos[x]^1,x] == Sin[x]?
__________________
REPLY:

This differs from what you expected by the constant (-1). This is
allowed for the same reason.  The indefinite integral isn't unique.

Cheers,
Ted Ersek


  • Prev by Date: Re: Strange results
  • Next by Date: getting the name of a symbol
  • Previous by thread: Re: Strange results
  • Next by thread: Re: Re: Strange results