       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:=
p=Integrate[Cos[x]^n,x]
Out=
\!\(\(-\(\(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:=
p//.n->0//PowerExpand
Out=
-ArcSin[Cos[x]]
_____________

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:=
FullSimplify[Pi/2-ArcSin[Cos[x]]]
Out=
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:=
p//.n->1//Simplify//PowerExpand
Out=
-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]?
__________________