Re: Re: strange behavior of Integrate
- To: mathgroup at smc.vnet.net
- Subject: [mg75333] Re: [mg75302] Re: strange behavior of Integrate
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Wed, 25 Apr 2007 05:40:57 -0400 (EDT)
- References: <200704220910.FAA20220@smc.vnet.net><f0hv8o$acb$1@smc.vnet.net> <200704240728.DAA27565@smc.vnet.net>
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=
- References:
- strange behavior of Integrate
- From: dimitris <dimmechan@yahoo.com>
- Re: strange behavior of Integrate
- From: dimitris <dimmechan@yahoo.com>
- strange behavior of Integrate