MathGroup Archive 1999

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

Search the Archive

Re: Strange results

  • To: mathgroup at
  • Subject: [mg15421] Re: [mg15389] Strange results
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Wed, 13 Jan 1999 20:57:33 -0500
  • Sender: owner-wri-mathgroup at

The answer Mathematica gives you for n=1 (-1+Sin[x]) is completely
equivalent to what you expected (Sin[x]) since they differ by a
constant and thus have the same derivative: Cos[x]. The situation is
somewhat more complicated in the case of n=0. The function
-ArcSin[Cos[x]] =x-Pi/2 over certain ranges (e.g. 0=<x=<Pi), over
others it is Pi/2-x (e.g. -Pi=<x<=0). 

It is easy to see why you get this strange answer. Mathematica tries to
give you the most general answer it can find. It can't give you a
single aswer that works for all possible values of n, and x so it gives
you a "generic" one. The answer it gives is not valid for n=-1 for n=0
and certain ranges of x, but other than that it is fine. You may not be
able to see this at once, but you can always check it by taking
derivatives. For example, for n= -1/2 you get

v = p /. n -> -(-)
                                   1  1  5        2
  2 Sqrt[Cos[x]] Hypergeometric2F1[-, -, -, Cos[x] ] Sin[x]
                                   4  2  4
                        Sqrt[Sin[x] ]

While on the other hand:

w = p = Integrate[Cos[x]      , x]
2 EllipticF[-, 2]

These answers look different but

Simplify[D[v - w, x]]
On Tue, Jan 12, 1999, Ing. Alessandro Toscano Dr. <toscano at>

>The following in/out does not make sense to me:
>\!\(\(-\(\(Cos[x]\^\(1 + n\)\
>          Hypergeometric2F1[\(1 + n\)\/2, 1\/2, \(3 + n\)\/2,
>          Sin[x]\)\/\(\((1 + n)\)\ \ at Sin[x]\^2\)\)\)\) In[4]:=
>Isn't it true that (Integrate[Cos[x]^0,x] == x? Isn't it true that
>(Integrate[Cos[x]^1,x] == Sin[x]?
>Why do I get this strange result?
>I am using Mathematica 3.01 on Pcs.
>Thanks for any info.
>Ing. Alessandro Toscano Dr.
>Universite di Roma Tre
>Dip. Ingegneria Elettronica
>Via della Vasca Navale, 84
>00146, Roma, ITALIA
>Tel. +39-6-55177095
>Fax  +39-6-5579078
>mailto:toscano at

Andrzej Kozlowski
Toyama International University

  • Prev by Date: Questions on a wave equation.
  • Next by Date: RE: Strange results
  • Previous by thread: Strange results
  • Next by thread: RE: Strange results