Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem loading full integration package on the Macintosh

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: Problem loading full integration package on the Macintosh
  • 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}]

General::intinit: Loading integration packages -- please wait.

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

will load the packages.   The  message tells you the packages are loading.


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] ]
        ]
    ];	
    priv`inter = TransfAnswer[priv`inter/.SimpGfunction]; 

    $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
  • Next by thread: rescalling(sp)