• To: mathgroup at yoda.physics.unc.edu
• From: twj
• Date: Tue, 3 Nov 92 11:11:28 CST

```>I tried to evaluate the Integral:
>
>      Integrate[BesselJ[0,k r], {r,0,Infinity}]
>
>on a Macintosh Quadra running Mathamatica 2.1 extended and got the same
>answer as Rod Price<rprice at physics.att.com>:
>
>\$RecursionLimit::reclim: Recursion depth of 256 exceeded.
>\$RecursionLimit::reclim: Recursion depth of 256 exceeded.
>\$RecursionLimit::reclim: Recursion depth of 256 exceeded.
>General::stop:
>

>Unfortunately, his advice to evaluate a simpler integral first did not
>help for the Macintosh version (I tried Gaussians resulting in expressions
>involving error fonctions). How do I load the full integration package on
>the Mac?

One way to load the definite integration packages on a thin
Kernel (this is the Kernel you have on a Macintosh) is to enter

an integral which cannot evaluate.   For example:

In[1]:= Integrate[ f[x], {x,0,Infinity}]

Out[1]= Integrate[f[x], {x, 0, Infinity}]

However you can fix the original problem.   Find the StartUp
package Integrate/mainalgorithm.m and at the top change the

definitition for IntegrateG to

IntegrateG[f_,{x_,xmin_,xmax_}] :=

Block[
{priv`r,priv`inter,z,positivearg=positivetrigarg={},trigintegral=False,
\$IntegrateAssumptions=sumintegrals=True,dummy=var},
priv`r = PowerExpand[f,{x}]//.{E^(d_.+Complex[c_,a_] b_.) :>

E^(c b+d) Cos[a b]+I E^(c b+d) Sin[a b]}//.
{(n_ z_)^k_ :> n^k z^k/; NumberQ[N[n]]};
priv`inter = (Numerator[priv`r]/Factor[Denominator[priv`r]])/.InputHard;

If[ FreeQ[priv`inter, MeijerG[__]],
priv`inter = Dispatcher[1,priv`r,x,xmin,xmax],
priv`inter = Dispatcher[1,priv`inter,x,xmin,xmax];
If[ !FreeQ[priv`inter,FailInt],

priv`inter = Dispatcher[1,priv`r,x,xmin,xmax] ]
];
If[ !FreeQ[priv`inter,FailInt],
If[ PolynomialQ[Numerator[priv`r],x] &&

PolynomialQ[Denominator[priv`r],x],
priv`inter = Dispatcher[1,Apart[priv`r,x],x,xmin,xmax]
];
If[ !FreeQ[priv`inter,FailInt] && xmin=!=0 &&

FreeQ[xmin,DirectedInfinity],
priv`inter = Dispatcher[1,f/.x->z+xmin,z,0,
If[ !FreeQ[xmax,DirectedInfinity],xmax,xmax-xmin] ]
]
];

\$IntegrateAssumptions=\$IntegrateAssumptions//SimpLogic;
If[ trigintegral,
If@@{\$IntegrateAssumptions, priv`inter, ComplexInfinity},

priv`inter
]/; SimpLogic[\$IntegrateAssumptions]=!=False &&

And@@(FreeQ[priv`inter,#]&/@{
Indeterminate,FailInt,MeijerG,KellyIntegrate,FailIntDiv})
] /; FreeQ[{xmin, xmax}, Complex] &&

And@@(FreeQ[Hold[{f,xmin,xmax}],#]&/@{Blank,Integrate,IntegrateG}) &&
Convergent[f,{x,xmin,xmax}]

then Integrate[BesselJ[0,k r], {r,0,Infinity}] will evaluate properly

without having to load the package first.  This change will appear in
the next relese of Mathematica.

Tom Wickham-Jones
WRI

```

• Prev by Date: Editing Mma graphs on a Sun
• Next by Date: PS Problems
• Previous by thread: Editing Mma graphs on a Sun