Re: Troubles with Integrate
- To: mathgroup at smc.vnet.net
- Subject: [mg70253] Re: Troubles with Integrate
- From: ab_def at prontomail.com
- Date: Tue, 10 Oct 2006 06:12:00 -0400 (EDT)
- References: <eg84hk$nir$1@smc.vnet.net>
Roman V. Kiseliov wrote: > 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. Integrate term by term and simplify the integrands: In[2]:= # /. s : a_*(k_.*t + t0_)^p_ :> Integrate[s /. t :> t - t0/k, {t, -Infinity, Infinity}]& /@ Expand[psi] Out[2]= -1/2 In[3]:= (ad = # /. s : a_*(k_.*t + t0_)^p_ :> Integrate[s /. t :> t - t0/k, t]& /@ Expand[psi^2]) // FreeQ[#, Integrate]& Out[3]= True In[4]:= Limit[ad, t -> Infinity] - Limit[ad, t -> -Infinity] // Expand Out[4]= 4/3 - 8*Sqrt[2]/(9*Pi) Another way is to use the Fourier transform: In[5]:= Psi = FourierTransform[Expand[psi], t, p] (Without Expand we get some unwelcome Sign'[...] terms in the result.) In[6]:= Sqrt[2*Pi]*Psi /. p -> 0 Out[6]= -1/2 By the Parseval's identity, the integral of Abs[psi]^2 is the same as the integral of Abs[Psi]^2 (because the scalar product is conserved): In[7]:= Integrate[Abs[Psi]^2, {p, -Infinity, Infinity}] // Expand Out[7]= 4/3 - 8*Sqrt[2]/(9*Pi) Integrating the image is easier because Psi has a finite support. Maxim Rytin m.r at inbox.ru