Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Calculating a simple integral
Replies: 3   Last Post: Jun 10, 2013 4:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 890
Registered: 10/29/11
Re: Calculating a simple integral
Posted: Jun 10, 2013 4:04 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


This is far from instantly,

$Version


"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"


in = ((1 - Cos[kz])/
(kz^2 (kr^2 + kz^2)^2 (kz^2 - 4 Pi^2)^2));


in2 = (in*(1 + Cos[kz]) // Simplify)/
(1 + Cos[kz]) // Simplify


(2*Sin[kz/2]^2)/(kz^2*(kr^2 + kz^2)^2*(kz^2 - 4*Pi^2)^2)


in (and in2) is an even function of kz


in == (in /. kz -> -kz) ==
in2 == (in2 /. kz -> -kz) // Simplify


True


Clear[f]


Timing[f[kr_?Positive] =
2*Integrate[in2, {kz, 0, Infinity},
Assumptions -> kr > 0]]


{
285.13703099999997903069015592336654663086`8.47565353\

646281, (1/(32*kr^5*Pi^3*(kr^2 + 4*Pi^2)^3))*
(I*(-3*I*kr^7 - 28*I*kr^5*Pi^2 +
8*Pi^(5/2)*(5*kr^2 + 4*Pi^2)*
MeijerG[{{1, 1, 3/2}, {}}, {{1, 1, 3/2},
{0, 1/2}}, -((I*kr)/2), 1/2] -
8*Pi^(5/2)*(5*kr^2 + 4*Pi^2)*
MeijerG[{{1, 1, 3/2}, {}}, {{1, 1, 3/2},
{0, 1/2}}, (I*kr)/2, 1/2] + 16*kr^2*Pi^(5/2)*
MeijerG[{{1, 1, 3/2}, {}}, {{1, 3/2, 2},
{0, 1/2}}, -((I*kr)/2), 1/2] +
64*Pi^(9/2)*MeijerG[{{1, 1, 3/2}, {}},
{{1, 3/2, 2}, {0, 1/2}}, -((I*kr)/2), 1/2] -
16*kr^2*Pi^(5/2)*MeijerG[{{1, 1, 3/2}, {}},
{{1, 3/2, 2}, {0, 1/2}}, (I*kr)/2, 1/2] -
64*Pi^(9/2)*MeijerG[{{1, 1, 3/2}, {}},
{{1, 3/2, 2}, {0, 1/2}}, (I*kr)/2, 1/2]))}


LogPlot[f[kr] // Chop, {kr, .1, 3},
Frame -> True, Axes -> False,
PlotRange -> All]



Bob Hanlon


On Sun, Jun 9, 2013 at 4:32 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.
>
>





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.