Re: a suprising result from Integrate (Null appeared in the

*To*: mathgroup at smc.vnet.net*Subject*: [mg74526] Re: a suprising result from Integrate (Null appeared in the*From*: Peter Pein <petsie at dordos.net>*Date*: Sat, 24 Mar 2007 05:19:01 -0500 (EST)*References*: <eu1r2o$jd6$1@smc.vnet.net>

Bhuvanesh schrieb: > Yes, this was reported and fixed quite a while back, and should be fine in the next version. Another example of the bad behavior was Integrate[Sqrt[Sin[x] + Cos[x]], x]. For your indefinite integrals I currently get, in the development build: > until then, a simple linear shift of variables helps: f[x_] = (1 - Sin[x])^(1/4); approx = NIntegrate[f[x], {x, 0, Pi/2, 2*Pi}, WorkingPrecision -> 32] inexact = Integrate[f[x], {x, 0, Pi/2, 2*Pi}] 5.699347567674386465367 0 exact = FullSimplify[Integrate[FullSimplify[f[x + Pi/2]], {x, -Pi/2, 0, 3*(Pi/2)}]] 8*2^(1/4)*EllipticE[Pi/4, 2] Chop[N[exact] - approx] 0 as an alternative to FullSimplify, use TrigToExp: F[z_] = Simplify[Integrate[TrigToExp[f[x + Pi/2]], {x, -Pi/2, z - Pi/2}]] z*((1/z)*(4*I - 4*(1 + I)^(3/2)*Hypergeometric2F1[-(1/4), 1/2, 3/4, -I]) + (2*2^(3/4)*((I*(-I + E^(I*z))^2)/E^(I*z))^(1/4)*(-1 - I*E^(I*z) + 2*Sqrt[1 + I*E^(I*z)]*Hypergeometric2F1[-(1/4), 1/2, 3/4, (-I)*E^(I*z)]))/ ((-I + E^(I*z))*z)) Plot[Chop[F[z]], {z, 0, 2*Pi}] [omitted] alternateexact = FullSimplify[ Subtract @@ (Limit[F[z], z -> Pi/2, Direction -> #1] & ) /@ {1, -1}] (8*2^(1/4)*Sqrt[Pi]*Gamma[3/4])/Gamma[1/4] Chop[N[alternateexact] - approx] 0 Peter