MathGroup Archive 2000

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

Search the Archive

Re: Integral evaluation bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23914] Re: Integral evaluation bug?
  • From: "Kevin J. McCann" <Kevin.McCann at jhuapl.edu>
  • Date: Fri, 16 Jun 2000 00:56:54 -0400 (EDT)
  • Organization: Johns Hopkins University Applied Physics Lab, Laurel, MD, USA
  • References: <8i1t9m$jnl@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Interesting. Probably something to do with integration on the "wrong" branch
of the square root.

Try:

f[x_] = Integrate[Sqrt[1 + Cos[x]^2], x]

and you get

Sqrt[2]*EllipticE[x, 1/2]

Then f[Pi/2]=Sqrt[2]*EllipticE[Pi/2,1/2]=1.9101

and f[0]=0

Also NIntegrate[Sqrt[1 + Cos[x]^2], {x,0,Pi/2}] = 1.9101

It is likely not a "bug", but a feature ;)

Cheers,

Kevin
Sidney Cadot <sidney at janis.pds.tudelft.nl> wrote in message
news:8i1t9m$jnl at smc.vnet.net...
> Hi all,
>
> In Mathematica 4, when I do
>
>   Integrate[Sqrt[1 + Cos[x]^2], {x, 0, Pi/2}]
>
> I get
>
>   Sqrt[2]*EllipticE[1/2] - 2*Sqrt[2]*EllipticF[ArcSin[Sqrt[2]], 1/2]
>
> Which evaluates numerically to
>
>   -3.33402 + 5.24412i
>
> This would seem rather silly, considering the fact that
>
>   Plot[Sqrt[1 + Cos[x]^2], {x, 0, Pi/2}]
>
> reveals a plain-vanilla, well-defined, continuous, all-real function on
> [0,Pi/2].
>
> Furthermore, Mathematica 3 gave just
>
>   Sqrt[2]*EllipticE[1/2]
>
> for an answer, which is (seems to be) correct.
>
> Is this a genuine bug or am I doing something insanely stupid?
>
> Best regards, Sidney
>




  • Prev by Date: Re: Appending an element to a list
  • Next by Date: Re: Questions about RoxReduce
  • Previous by thread: Re: Integral evaluation bug?
  • Next by thread: Multidimensional Optimization