Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Re: strange behavior of Integrate


On 24 Apr 2007, at 16:28, dimitris wrote:

>>
>
> Using a code by Chris Chiasson I see that Integrate does use
> FullSimplify
> in this integral
>
> Developer`ClearCache[]
> Block[{$Output = {OpenWrite["C:\\msgStream.m"]}},
>    TracePrint[(1/Pi)*Integrate[Log[x/(x^2 + 1)]*(1/(x^2 + 1)^m), {x,
> 0, Infinity}, Assumptions -> m >= 1],
>      TraceInternal -> True]; Close /@ $Output];
> Thread[Union[Cases[ReadList["C:\\msgStream.m",
> HoldComplete[Expression]],
>     symb_Symbol /; AtomQ[Unevaluated[symb]] &&
> Context[Unevaluated[symb]] === "System`" :> HoldComplete[symb], =
{0,
> Infinity},
>     Heads -> True]], HoldComplete]
>
> (*outout is ommited*)
>
> MemberQ[FullSimplify, -1]
> True
>


The above looks unecessarily complicated to me. Maybe it has some 
virtues I can't think of but it seems to me Trace provids enough 
options to do what you wish to do without needing such convoluted 
coding:

l = Trace[(1/Pi)*Integrate[Log[x/(
       x^2 + 1)]*(1/(x^2 +
         1)^m), {x, 0, Infinity}, Assumptions ->
               m =B3 1], HoldPattern[FullSimplify[___]], TraceInternal -=

 > True,
         TraceOriginal -> True];

In[2]:=
Cases[l,FullSimplify,Infinity,Heads->True]

Out[2]=
{FullSimplify,FullSimplify,FullSimplify}

This shows that FullSimplify is indeed used in evaluating the 
integral. In fact it is quite easy to get full information on how it 
is used:


Cases[l, HoldPattern[FullSimplify[x__]] :> HoldComplete[FullSimplify
[x]], Infinity, Heads -> True]


{HoldComplete[FullSimplify[Integrate`ImproperDump`temp$24, 
Integrate`ImproperDump`removeElementAssumptions[
      Integrate`ImproperDump`$IntegrateAssumptions]]],
   HoldComplete[FullSimplify[-(((2*m - 3)*Sqrt[Pi]*Gamma[m - 3/2]*
(PolyGamma[0, 1 - m] - PolyGamma[0, 3/2 - m]) +
        Gamma[m - 1/2]*(4^(m + 1)*m*Gamma[-2*m]*Gamma[m]*Gamma[m + 
1/2] + Sqrt[Pi]*(PolyGamma[0, m - 1/2] + Log[4] + EulerGamma)))/
       (4*Gamma[m])), True]], HoldComplete[FullSimplify[-(((2*m - 3)
*Sqrt[Pi]*Gamma[m - 3/2]*(PolyGamma[0, 1 - m] - PolyGamma[0, 3/2 - m]) +
        Gamma[m - 1/2]*(4^(m + 1)*m*Gamma[-2*m]*Gamma[m]*Gamma[m + 
1/2] + Sqrt[Pi]*(PolyGamma[0, m - 1/2] + Log[4] + EulerGamma)))/
       (4*Gamma[m])), TimeConstraint -> 1/2, Assumptions -> m >= 1]]}

Andrzej Kozlowski=


  • Prev by Date: "hard" simplification
  • Next by Date: Re: FourierTransform and removable singularities
  • Previous by thread: Re: Re: Re: strange behavior of Integrate
  • Next by thread: Re: strange behavior of Integrate