Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14779 > unrolled thread

Calculating a simple integral

Started bydsmirnov90@gmail.com
First post2013-06-09 08:26 +0000
Last post2013-06-10 08:01 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Calculating a simple integral dsmirnov90@gmail.com - 2013-06-09 08:26 +0000
    Re: Calculating a simple integral Roland Franzius <roland.franzius@uos.de> - 2013-06-10 08:04 +0000
    Re: Calculating a simple integral "Nasser M. Abbasi" <nma@12000.org> - 2013-06-10 08:01 +0000

#14779 — Calculating a simple integral

Fromdsmirnov90@gmail.com
Date2013-06-09 08:26 +0000
SubjectCalculating a simple integral
Message-ID<kp1e82$80h$1@smc.vnet.net>
If there is a way to calculate with Mathematica the following integral:

in = -((-1 + Cos[kz])/(kz^2 (kr^2 + kz^2)^2 (kz^2 - 4 \[Pi]^2)^2))
Integrate[in, {kz, -Infinity, Infinity}, Assumptions -> kr > 0]

Another system calculates the same integral instantly. :)

Thanks for any suggestions.

[toc] | [next] | [standalone]


#14791

FromRoland Franzius <roland.franzius@uos.de>
Date2013-06-10 08:04 +0000
Message-ID<kp41ar$fe5$1@smc.vnet.net>
In reply to#14779
Am 09.06.2013 10:26, schrieb dsmirnov90@gmail.com:
> If there is a way to calculate with Mathematica the following integral:
>
> in = -((-1 + Cos[kz])/(kz^2 (kr^2 + kz^2)^2 (kz^2 - 4 \[Pi]^2)^2))
> Integrate[in, {kz, -Infinity, Infinity}, Assumptions -> kr > 0]
>
> Another system calculates the same integral instantly. :)
>

Did you check the numerics?

The expression is a square of

f[x_,a_] = Sin[x/2]((x (x - 2 Pi)(x + 2 Pi)) /(x^2+a^2)

This function looks like a multiple Sinc function with a canceling of 
zeroes of the numerator function sin(x/2) at x = 0 and +- 2pi by the 
denominator polynomial.

Mathematica sticks in Nirwana with the definite integral but 
accomplishes to find the indefinite integral

F[x_,a_] = Integrate[f[x,a]^2,x]

But, of course, with doubious imaginary parts and a definitely wrong
Limit[ F[x,a]-F[-x,a],x->oo]

despite the fact, that the derivative of F wrt to x is correct.

Another hint here, that the new developments in finding definite 
integrals are probably full of errors implemented.

When setting
$Assumptions=x \in Reals && a>0
I got an errormessage by NIntegrate, that x > 1/4096  :-(


But the FourierTransform package is working

FL[a_]= Limit[ Sqrt[2 Pi] FourierTansform[f[x,a]^2,x,k ], k->0]

Compare numerically eg

FL[0.05`20]

and

NIntegrate[ f[x,0.05`20]^2,{x,-oo,oo},WorkingPrecision->20]

Hope ist helps.

-- 

Roland Franzius

[toc] | [prev] | [next] | [standalone]


#14795

From"Nasser M. Abbasi" <nma@12000.org>
Date2013-06-10 08:01 +0000
Message-ID<kp4155$fcn$1@smc.vnet.net>
In reply to#14779
On 6/9/2013 3:26 AM, dsmirnov90@gmail.com wrote:
> If there is a way to calculate with Mathematica the following integral:
>
> in = -((-1 + Cos[kz])/(kz^2 (kr^2 + kz^2)^2 (kz^2 - 4 \[Pi]^2)^2))
> Integrate[in, {kz, -Infinity, Infinity}, Assumptions -> kr > 0]
>
> Another system calculates the same integral instantly. :)
>
> Thanks for any suggestions.
>

You did not say which version you used.

I do get result from 9.01, but it took about 2 minutes

--------------------------
ClearAll["`*"];
in = -((-1 + Cos[kz])/(kz^2 (kr^2 + kz^2)^2 (kz^2 - 4 \[Pi]^2)^2));
Assuming[kr > 0, Integrate[in, {kz, -Infinity, Infinity}]]

-(1/(32 kr^5 \[Pi]^3 (kr^2+4 \[Pi]^2)^3))(-3 kr^7-
28 kr^5 \[Pi]^2+112 kr^2 \[Pi]^4+192 \[Pi]^6+4 kr \[Pi]^(5/2)
  (5 kr^2+4 \[Pi]^2) MeijerG[{{1/2,1},{}},{{-(1/2),1/2,1},{0}},
-((I kr)/2),1/2]+4 kr \[Pi]^(5/2) (5 kr^2+4 \[Pi]^2)
MeijerG[{{1/2,1},{}},{{-(1/2),1/2,1},{0}},(I kr)/2,1/2]+
8 kr^3 \[Pi]^(5/2) MeijerG[{{1/2,1},{}},{{-(1/2),1,3/2},{0}},
-((I kr)/2),1/2]+32 kr \[Pi]^(9/2) MeijerG[{{1/2,1},{}},
{{-(1/2),1,3/2},{0}},-((I kr)/2),1/2]+8 kr^3 \[Pi]^(5/2)
  MeijerG[{{1/2,1},{}},{{-(1/2),1,3/2},{0}},(I kr)/2,1/2]+
32 kr \[Pi]^(9/2) MeijerG[{{1/2,1},{}},{{-(1/2),1,3/2},{0}},(I kr)/2,1/2])
--------------------------------------

But something does not seem to be right. Can't evaluate any of
the MeijerG functions in the result for any kr value. For
example

N[MeijerG[{{1/2, 1}, {}}, {{-(1/2), 1/2, 1}, {0}}, -((I kr)/2), 1/
    2] /. kr -> 0]

gives error

MeijerG::hdiv: MeijerG[{{0.5,1.},{}},{{-0.5,0.5,1.},{0.}},0.,0.5]
does not exist. Arguments are not consistent. >>


--Nasser




[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web