MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74546] Re: a suprising result from Integrate (Null appeared in the
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sun, 25 Mar 2007 01:28:28 -0500 (EST)
  • References: <eu1r2o$jd6$1@smc.vnet.net><eu2u1f$puv$1@smc.vnet.net>

In[258]:=
$Version
Out[258]=
"5.2 for Microsoft Windows (June 20, 2005)"

(*wrong*)
In[265]:=
Integrate[(1 - Sin[x])^(1/4), {x, 0, 2*Pi}]
Out[265]=
0

(*wrong*)
In[267]:=
Integrate[(1 - Sin[x])^(1/4), x]
Out[267]=
-4*(1 - Sin[x])^(1/4) - (4*Null*Sqrt[1 - Sin[x]])/(Cos[x/2] - Sin[x/
2])


One other way for getting the definite integral Integrate[(1 -
Sin[x])^(1/4), {x, 0, 2*Pi}]
and the indefinite integral Integrate[(1 - Sin[x])^(1/4), x] with the
current version is

In[269]:=
Integrate[(1 - Sin[x])^a, {x, 0, 2*Pi}, Assumptions -> a > -1]
% /. a -> 1/4
(*check*)
{N[%], NIntegrate[(1 - Sin[x])^(1/4), {x, 0, Pi/2, 2*Pi}]}

Out[269]=
Pi*Hypergeometric2F1[1/2 - a/2, -(a/2), 1, 1] +
(2*HypergeometricPFQ[{1/2, 1/2, 1}, {1 + a/2, 3/2 + a/2}, 1])/(1 + a)
+ 2*a*HypergeometricPFQ[{1, 1/2 - a/2, 1 - a/2}, {3/2, 3/2}, 1]

Out[270]=
(Pi*Gamma[3/4])/(Gamma[5/8]*Gamma[9/8]) +
(1/2)*HypergeometricPFQ[{3/8, 7/8, 1}, {3/2, 3/2}, 1] +
  (8/5)*HypergeometricPFQ[{1/2, 1/2, 1}, {9/8, 13/8}, 1]

Out[271]=
{5.699347567674384, 5.699347567679635}

As regards the indefinite integral

In[292]:=
Integrate[(1 - Sin[x])^a, x]
% /. a -> 1/4
FullSimplify[%]
FunctionExpand[%]
(*check*)
FullSimplify[D[{%, %%}, x]]

Out[292]=
Cos[x]*Hypergeometric2F1[1/2, 1/2 - a, 3/2, Cos[(1/4)*(Pi -
2*x)]^2]*(Sin[(1/4)*(Pi - 2*x)]^2)^(-(1/2) - a)*(1 - Sin[x])^a
Out[293]=
(Cos[x]*Hypergeometric2F1[1/2, 1/4, 3/2, Cos[(1/4)*(Pi - 2*x)]^2]*(1 -
Sin[x])^(1/4))/(Sin[(1/4)*(Pi - 2*x)]^2)^(3/4)
Out[294]=
(2^(3/4)*Cos[x]*Hypergeometric2F1[1/2, 1/4, 3/2, Cos[(1/4)*(Pi -
2*x)]^2])/Sqrt[1 - Sin[x]]
Out[295]=
(Beta[Cos[(1/4)*(Pi - 2*x)]^2, 1/2, 3/4]*Cos[x])/
(2^(1/4)*Sqrt[Cos[(1/4)*(Pi - 2*x)]^2]*Sqrt[1 - Sin[x]])
Out[296]=
{(1 - Sin[x])^(1/4), (1 - Sin[x])^(1/4)}

Dimitris


=CF/=C7 Peter Pein =DD=E3=F1=E1=F8=E5:
> 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[Sqr=
t[Sin[x] + Cos[x]], x]. For your indefinite integrals I currently get, in t=
he 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



  • Prev by Date: Re: Re: Which Mathematica product should I get?
  • Next by Date: Re: Re: Which Mathematica product should I get?
  • Previous by thread: Re: a suprising result from Integrate (Null appeared in the
  • Next by thread: simplifications