MathGroup Archive 2003

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

Search the Archive

Re: Integrate 5.0


Selwyn,

> Perhaps this a better example:
>
>       Integrate[Sqrt[Cos[t]^2 + 1], {t, 0, x}]
>
> For any real x, this is Sqrt[2] EllipticE[x,1/2], but here's the output
> you get:

[monstrosity snipped]

> To coax Sqrt[2] EllipticE[x,1/2] out of this mess, it's not enough to
> simplify with x\[Element]Reals,
>
>       Simplify[Integrate[Sqrt[Cos[t]^2 + 1], {t, 0, x}],x\[Element]Reals]
>
>       << similar output >>
>
> one has to simplify either with x\[Element]Reals&&x>0 or
> x\[Element]Reals&&x<0
>
> Simplify[Integrate[Sqrt[Cos[t]^2 + 1], {t, 0, x}],
> x\[Element]Reals&&x>0]
>
>      Sqrt[2] EllipticE[x,1/2]

Thinking that perhaps it's better to let Mathematica know your intentions
during the integration, rather than afterward, I tried

Integrate[Sqrt[Cos[t]^2 + 1], {t, 0, x}, Assumptions -> x \[Element] Reals]

The result

If[x != 0, Sqrt[2]*EllipticE[x, 1/2],
Integrate[Sqrt[1 + Cos[t]^2], {t, 0, x},
Assumptions -> x \[Element] Reals && x == 0]]

while not unwieldy, is certainly strange. It's clearly equivalent to
Sqrt[2] EllipticE[x,1/2]. (So why doesn't Mathematica see that, and
simplify accordingly?)

> I'm just saying there's got to be a better way. Having a small number
> of functions that do very general things is a good philosophy, in
> general. However, in the case of Integrate, there sorely needs to be
> some simple, elegant way to integrate on the real line. But then again,
> I could be wrong.

I agree that there needs to be a way to do that.

BTW, one can throw caution to the wind and just use

Integrate[Sqrt[Cos[t]^2 + 1], {t, 0, x}, GenerateConditions -> False]

which gives the desired result immediately.

Regards,
David


  • Prev by Date: Re: Integrate 5.0
  • Next by Date: Re: Integrate 5.0
  • Previous by thread: Re: Integrate 5.0
  • Next by thread: Re: Integrate 5.0