MathGroup Archive 2004

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

Search the Archive

Re: how to explain this weird effect? Integrate

  • To: mathgroup at
  • Subject: [mg46290] Re: how to explain this weird effect? Integrate
  • From: nma124 at (steve_H)
  • Date: Fri, 13 Feb 2004 21:56:55 -0500 (EST)
  • References: <> <c0hhvb$lgl$>
  • Sender: owner-wri-mathgroup at

Andrzej Kozlowski <akoz at> wrote in message news:<c0hhvb$lgl$1 at>...
> It's not hard to explain if you actually look at the output you get 
> before substituting values for n and m.


I think you missed my point.

As I said , I do see why Mathematica complained. It is clear from
the ouput. and I know that taking the limit will give the correct 
result I wanted to see. But this is not the point.

My point is that mathematically speaking, it should not make a 
difference when one does the substitution. But using a computer 
algebra package, it made a difference. I am not looking for a way around 
this, I wanted to talk about the user not having to work around these

So, the question is that, why did not Mathematica perform the Limit operation
itself to give the correct answer? 

Look at this example:

r = 1/a
r /. a -> 0

Here Mathematica complains becuase of 1/0 problem, but still returns
ComplexInfinity as the correct answer.

Now when I type

Limit[r, a -> 0]
no complaint is given, and infinity is the answer again.

mathematically speaking, 1/a when a=0, is the same as Limit[1/a , a->0]
So, the final answer should not be different.

But when I typed
r = Integrate[Sin[m x] Sin[n x], {x, 0, 2 Pi}] 
r /. {n -> 2, m -> 2}

 Mathematica complained about 1/0 output, BUT also did NOT give the answer. 

So, here we have 2 examples, both have 1/0 problem, in both cases Mathematica 
complained about 1/0, but in one case it still gave the final answer,
and in the second case it did not.

to conclude, Mathematica should do one of 2 things:

1. complain about 1/0, but internally apply the Limit to see if it can
obtain an answer.
2. not complain about 1/0 if applying the Limit will resolve it, else
only then complain about 1/0 and give no answer.


  • Prev by Date: Fw: Re: oo system for Mathematica
  • Next by Date: Re: simplifying first-order diff eq solution
  • Previous by thread: Re: how to explain this weird effect? Integrate
  • Next by thread: Re: Re: how to explain this weird effect? Integrate