Re: Calculating a simple integral

*To*: mathgroup at smc.vnet.net*Subject*: [mg131140] Re: Calculating a simple integral*From*: Andrzej Kozlowski <akozlowski at gmail.com>*Date*: Fri, 14 Jun 2013 04:59:15 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-outx@smc.vnet.net*Delivered-to*: mathgroup-newsendx@smc.vnet.net*References*: <7586978.94875.1370767085206.JavaMail.root@m06> <20130613063855.8617D6A70@smc.vnet.net>

Very nice. By the way, this method (differentiating with respect to a parameter) was often used by the physicist Richard Feynman. In fact, he once made a bet (see Needham's book "Visual Complex Analysis") that he could use this method so solve any integral that other people can do by contour integration. He lost his bet but this seems to be an example of a situation where contour integration does not work (or at least I can't see how to make it work). In fact, I myself thought about using Feynman's method to obtain an elementary expression for this integral, but I forgot to use partial fractions first, so never got anywhere. However, I doubt that this is how the "other program" does it. I would be interested in seeing what expression the "other program" gives for the indefinite integral. In my opinion, one of the weaknesses of Mathematica's integration is that it does not allow one to choose the method of indefinite integration. Mathematica has an implementation of the Risch algorithm (which always returns an indefinite integral in terms of elementary functions, if such an answer exists) but it often returns answers in terms of special functions. If properly implemented these can have advantages over "elementary" solutions, but the fact that Mathematica does not allow us to choose which method to use means that we can't tell if an elementary antiderivative exists or not. This is also the situation in this case. So, concerning how the "other program" gets the answer, there seem to be two most likely possibilities. One is that it also computes a primitive function (indefinite integral) in terms of special functions (MeierG?) but gets the limits right. The other possibility is that it uses the Risch algorithm to get an elementary anti-derivative. Andrzej Kozlowski On 13 Jun 2013, at 08:38, Dr. Wolfgang Hintze <weh at snafu.de> wrote: > On 11 Jun., 08:23, Andrzej Kozlowski <akozlow... at gmail.com> wrote: >> No, it's similar to: >> >> Integrate[(1 - >> Cos[x])/(x^2*(x^2 - 4*Pi^2)^2), {x, -Infinity, Infinity}] >> >> 3/(32*Pi^3) >> >> On 10 Jun 2013, at 10:11, djmpark <djmp... at comcast.net> wrote: >> >> >> >>> Doesn't this have a singularity at 2 Pi that produces non-convergence? It's >>> similar to: >> >>> Integrate[1/x^2, {x, \[Epsilon], \[Infinity]}, >>> Assumptions -> \[Epsilon] > 0] >> >>> 1/\[Epsilon] >> >>> That diverges as epsilon -> 0. >> >>> Are you sure you copied the integral correctly? >> >>> David Park >>> djmp... at comcast.net >>> http://home.comcast.net/~djmpark/index.html >> >>> From: dsmirno... at gmail.com [mailto:dsmirno... at 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. :) >> >>> Thanks for any suggestions. > > Sorry, but I made indeed a calculation error! > Correcting it the partial fraction decomposition leads to Dmitry's > result. > Furthermore, calculating first the indefinite integral and then taking > limits leads to a false result. > Direct calculation of the integral leads to MeierG functions which are > useless because we cannot enter any numerical value. > So, rather than provding the correct result Mathematica comes up with > different false result depending on the method used, and we cannot tel > which one is correct without "research" work. > Summarizing, I need to restate my criticism of Mathematica with > respect to integration (I'm using version 8). > > Regards, > Wolfgang >

**References**:**Re: Calculating a simple integral***From:*"Dr. Wolfgang Hintze" <weh@snafu.de>