MathGroup Archive 2008

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

Search the Archive

Re: Re: A Problem with Simplify


Alexey Popkov wrote:
> On 15 =C1=D0=D2, 13:51, Daniel Lichtblau <d... at wolfram.com> wrote:
> 
>>Alexey Popkov wrote:
>>
>>>On Apr 10, 10:14 am, "Kevin J. McCann" <Kevin.McC... at umbc.edu> wrote:
>>
>>>>I have the following rather simple integral of two sines, which should
>>>>evaluate to zero if m is not equal to n and to L/2 if they are the same.=
> 
> 
>>>Try the following:
>>>Integrate[Exp[(a - 1)*x], x] /. a -> 1
>>>Integrate[Cos[(a - 1)*x], x] /. a -> 1
>>>Integrate[(a - 1)^x, {x, -1, 0}] /. a -> 1
>>>Integrate[Cos[a x]/Sin[x], x] /. a -> 1
>>
>>>There is the ONE underlying BUG! In some complicated cases this bug
>>>may result in random partial answers.
>>
>>>http://forum.ru-board.com/topic.cgi?forum=5&topic=10291&start=80#9
>>
>>Removing the replacements, here are the Integrate results.
>>
>>In[17]:= InputForm[Integrate[Exp[(a - 1)*x], x]]
>>Out[17]//InputForm= E^((-1 + a)*x)/(-1 + a)
>> [...]
>>As far as I am aware thse are correct. What is the bug?
>>
>>Daniel Lichtblau
>>Wolfram Research
> 
> 
> The above answers are correct only if "a" is not equal to 1. Answers
> with a=1 are lost!
> 
> And code:
> 
> int1 = Integrate[Cos[a*x]/Sin[x], x];
> int1 /. a -> 1
> 
> MUST give us answer equal to
> 
> int2 = Integrate[Cos[x]/Sin[x], x]

Capitalization notwithstanding, it need not do any such thing. Integrate 
should give a generic result that behaves sensibly in the limit as a->1 
from whatever path is specified to Limit. This is similar to the 
situation of

In[18]:= InputForm[solns = x /. Solve[a*x^2 + x == 1, x]]
Out[18]//InputForm= {(-1 - Sqrt[1 + 4*a])/(2*a),
   (-1 + Sqrt[1 + 4*a])/(2*a)}

In[20]:= Limit[solns, a->0]
Out[20]= {-Infinity, 1}

Note that a blind substitution of a->0 will not give "nice" results.

In[21]:= solns /. a->0

                                  1
Power::infy: Infinite expression - encountered.
                                  0

                                  1
Power::infy: Infinite expression - encountered.
                                  0

Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered.

Out[21]= {ComplexInfinity, Indeterminate}


> But the first answer is invalid in this simple case... :(
> 
> I should emphasize that in some complicated cases this BUG may result
> in random partial answers!

I'll emphasize that this is not a bug; it's the way Integrate is 
intended to work in Mathematica. An antiderivative of a function that 
depends on parameters can be invalid for some values of those 
parameters. Provided we are talking about analytic functions (things 
that can be said to have antiderivatives in the usual meaning of the 
term), the "bad set" will have measure zero.


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Re: Deleting Integrate[] transformation rule (some
  • Next by Date: Re: Re: A Problem with Simplify
  • Previous by thread: Re: A Problem with Simplify
  • Next by thread: Re: Re: A Problem with Simplify