Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Problem with definite integrals having symbolic limits

  • To: mathgroup at
  • Subject: [mg21853] Re: [mg21850] Problem with definite integrals having symbolic limits
  • From: Bojan Bistrovic <bojanb at>
  • Date: Wed, 2 Feb 2000 22:54:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at

> Dear MathGroup,
> I discovered what I think is an inconsistency and would like to check my
> opinion and offer a suggestion to Wolfram.
> When you do a "definite" integration with symbolic limits (instead of
> concrete numbers), the result you get may not be unconditionally true. The
> necessary conditions are not stated by Mathematica, although
> "GenerateConditions" is set to True.
> The notebook added demonstrates this problem. I suggest that a warning
> message should be given, that describes the conditions for the stated
> result.
> With best regards,
> Wolter Kaper
> dept. of Chemistry
> Univ. of Amsterdam
The "problem" is the folowing: you use Set to define you function 
instead of SetDelayed:

In[1]:= Int[xend_] = Integrate[1/x^2, {x, -2, xend},  
	GenerateConditions -> True]

The right hand side is evaluated AT THIS TIME, so, since "xend" is just a
symbol, the result is calculated and assigned to your function:

Out[1]= -1/2 - 1/xend

In[2]:= ?Int
Out[2]= Global`Int
	Int[xend_] = -1/2 - xend^(-1)

So when you type Int[2], you get the wrong result. What you should do is

In[3]:= Int[xend_] := Integrate[1/x^2, {x, -2, xend},
      GenerateConditions -> True]

In[4]:= ?Int
Out[4]= Global`Int
	Int[xend_] := Integrate[1/x^2, {x, -2, xend}, GenerateConditions -> True]

In[5]:= Int[2]
Out[5]= Infinity

Now, SHOULD the integrate return the result like: 

If[xend > -2 && xend < 0, -(2 + xend)/(2*xend), Integrate[a/x^2, {x, -2, xend}]]

Well, if you try 

Integrate[a/x^2, {x, -2, xend}, GenerateConditions -> True, Assumptions->{a>0}]

you get

If[xend > -2 && xend < 0, -(a*(2 + xend))/(2*xend), Integrate[a/x^2, {x, -2,

It looks bizzare :-). SetDelayed will solve your problem for the time, and as
for the question about inconsistency, it looks like one to me.

Bye, Bojan

Bojan Bistrovic,                       bojanb at  
Old Dominion University, Physics Department,      Norfolk, VA

  • Prev by Date: Re: NDSolve and numeric-only computation
  • Next by Date: Re: Corrupted notebook
  • Previous by thread: Re: Double-sided printing, one side at a time ....
  • Next by thread: Re: Corrupted notebook