MathGroup Archive 2005

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

Search the Archive

Re: Re: Re: Folding Deltas, and evaluation scheme of Mathematica

  • To: mathgroup at
  • Subject: [mg57007] Re: [mg56976] Re: [mg56906] Re: [mg56876] Folding Deltas, and evaluation scheme of Mathematica
  • From: Daniel Lichtblau <danl at>
  • Date: Thu, 12 May 2005 02:33:10 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at at wrote:
 > I can not agree with you.
 > Integrate[1/x, {x, 1, Infinity}] is Infinity,
 > and Integrate[1/x, {x, Infinity, 1}] = - Integrate[1/x, {x, 1, 
Infinity}] =
 > - Infinity.
 > These are true.
 > But before evaluate Integrate[1/x, {x, 1, Infinity}] - Integrate[1/x, {x,
 > Infinity, 1}]
 > = Infinity - Infinity, the following rules can be applied:
 > (* this comes from the definition of definite integral*)
 > Integrate[exp_, {x_, a_, b_}] := - Integrate[exp, {x, b, a}] /; a > b;
 > Subtract[exp_, exp_] = 0;

These rules apply when values in question are finite. In other cases you 
have what are generally referred to as "indeterminate forms". Often one 
can obtain a desired value as a principal value integral, wherein the 
singular part is cancelled by introducing a dependency into a pair of 

 > Sadly, Mathematica will not apply the second rule at first and it will do
 > the definite integral at first.
 > In my opinion, if Mathematica apply the rule "Subtract[exp_, exp_] = 0"
 > before evaluate
 > exp will free you from applying limit wrappers to improper integrals.
 > More generally, for some functions, such as Subtract, Plus, Times, Power,
 > before evaluate their parameters
 > some rule should be applied if possible. for example:
 > Plus[exp_, exp_] := 2 a; Times[0, exp_] := 0;
 > This is just what "human beings" do when simplify expression. :)

Much of this is already done in Mathematica evaluation of Plus and 
Times. An attempt is made to not do such things when an indeterminate 
form is present, because in such cases these "simplifications" are plain 

There is a good deal of folklore and some published literature in the 
computer algebra community on how these can be incorrect, along with 
(often conflicting) opinions on how and when to avoid such simplifications.


 >                       gauerkk at uregina.c 

 >                       a                        To:       Zhengji Li 
< at>
 >                                                cc: 

 >                       05, 11, 2005             Subject: [mg57007] [mg56976] 
Re: [mg56906] Re: [mg56876] Folding Deltas 

 >                       04:29 AM 


 > Recently reading the mathgroup postings, I saw you post below a
 > generalization which seems to be false.
 > Quoting Zhengji Li < at>:
 >>But, Integrate[Anything, {t, a, b}] + Integrate[Anything, {t, b, a}]
 >>0, so you will get the result.
 > set Anything -> 1/x, a -> 1, b -> Infinity. My understanding is that
 > Infinity-Infinity does not evaluate without a warning message, and
 > instead does not vanish, as you indicate (compare to the other
 > standard improper integral used for calculating the volume of the Horn
 > of Gabriel, Anything -> 1/x^2, where this time, the differences are
 > equal and finite (and also zero), although the intgrals are improper,
 > as below - in the original question).
 > Of course, instead choosing b -> k (a fixed finite real), others as
 > above, and running Limit[Integrate[Anything, {t, a, b}] + Integrate
 > [Anything, {t, b, a}], k -> Infinity] instead should return zero (for
 > most evaluatable functions, excluding Cantor and DiracDelta functions
 > which leap around on a semi-infinite box).

As posed (if I follow correctly) this may well be an indeterminate form.

There are lurking issues of language semantics that cannot and should 
not be ignored. For a linear operator Op, we have on the one hand 
Op[a+b] and on the other hand Op[a]+Op[b]. The standard Mathematica 
semantics for the first says to add a and b before applying Op, and for 
the second we allpy to each separately and then add the results. I would 
guess this is the interpretation used by most programs. It is, to me, 
the one that makes the most sense.

I will also mention that there is a certain amount of voodoo behind the 
scenes. Some integrals are evaluated by splitting sums, but in cases 
when singularities cancel this can be difficult to do correctly.

 > I personally always try to apply a limit wrapper to any improper
 > integral which I may have to evaluate in version 3, and first operate
 > symbolically on my limit in question, followed by, only if necessary,
 > the numerical evaluation. I wonder if they'd fixed in v 5 yet the
 > capability of calculating limits from multiple directions. My guess is
 > probably not, based on a reply to one of the archives messages, circa
 > last decade.
 > [...]

I'm not sure exactly what is the issue here. At points where a function 
is not analytic, limits are dependent on path of approach. If one wants 
limit values along rays from different directions one can certainly do 
that in Mathematica.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: Representation and Simulation of Dynamic Systems
  • Next by Date: Re: Converting result to ASCII-art
  • Previous by thread: Re: Re: Folding Deltas, and evaluation scheme of Mathematica
  • Next by thread: Output to a file