Re: Troubles with Integrate
- To: mathgroup at smc.vnet.net
- Subject: [mg70279] Re: Troubles with Integrate
- From: Peter Pein <petsie at dordos.net>
- Date: Wed, 11 Oct 2006 01:53:43 -0400 (EDT)
- References: <eg84hk$nir$1@smc.vnet.net>
Roman V. Kiseliov schrieb: > If I try to do following calculation Mathematica 5.2.0.0 can't evaluate > integrals. > > psi:= (-Pi^(-1))*((Sin[Pi*((t - 5/4)/3)]/(t - 5/4))*Cos[Pi*(t - 5/4)] + > (Sin[Pi*(t + 1/4)]/(t + 1/4))*Cos[Pi*(t + 1/4)]) + > (1/Pi)*((Sin[2*Pi*((t - 7/8)/3)]/(t - 7/8))*Sin[2*Pi*(t - 7/8)] - > (Sin[2*Pi*((t - 1/8)/3)]/(t - 1/8))*Sin[2*Pi*(t - 1/8)]); > > Integrate[psi*psi, t] > Integrate[psi*psi, {t, -inf, +inf}] > > If I try to interrupt calculation, Mathematica sometimes says > 'Mathematica has detected a possible internal error. If possible, report > the error to > support at wolfram.com, quoting "Assertion 'interruptMenuType != 0' failed at > KernelPackets.c:726", and describe in as much detail as possible what > you were > doing when the error occurred.' > > Note also that Integrate[psi, {t, -inf, +inf}] in Mathematica 4.2.0.0 > evaluates as 0 > but Mathematica 5.2.0.0 give value -1/2 > > Roman V. Kiseliov > Kursk State University > Theor. Phys. Dept. > Hi Roman, is it correct to have a factor 1/3 resp. 2/3 in the first sine of the trig. products in term 1,3 and 4 but not in term2? I ask, because the outcome would be significantly simpler: In[10]:= \[Psi] := -(((Sin[(1/3)*Pi*(t - 5/4)]*Cos[Pi*(t - 5/4)])/(t - 5/4) + (Sin[(1/3)*Pi*(t + 1/4)]*Cos[Pi*(t + 1/4)])/(t + 1/4))/Pi) + ((Sin[(2/3)*Pi*(t - 7/8)]*Sin[2*Pi*(t - 7/8)])/(t - 7/8) - (Sin[(2/3)*Pi*(t - 1/8)]*Sin[2*Pi*(t - 1/8)])/(t - 1/8))/Pi In[11]:= Timing[(Integrate[#1 /. t -> Cases[Factor[Denominator[#1]], (c_.)*t + (a_) /; c =!= 0 :> x - a/c, Infinity, 1], {x, -Infinity, Infinity}] & ) /@ Expand[\[Psi]^2]] Out[11]= {28.061999999999998*Second, {1}} Greetings, Peter