       Re: A Problem with Simplify

• To: mathgroup at smc.vnet.net
• Subject: [mg87760] Re: A Problem with Simplify
• From: Alexey Popkov <popkov at gmail.com>
• Date: Wed, 16 Apr 2008 07:14:00 -0400 (EDT)
• References: <ftkb7f\$a9m\$1@smc.vnet.net> <200804140943.FAA08090@smc.vnet.net>

```On 16 =C1=D0=D2, 13:06, Daniel Lichtblau <d... at wolfram.com> wrote:
> 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 sam=
e.=
>
> >>>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:= InputForm[Integrate[Exp[(a - 1)*x], x]]
> >>Out//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:= InputForm[solns = x /. Solve[a*x^2 + x == 1, x]]
> Out//InputForm= {(-1 - Sqrt[1 + 4*a])/(2*a),
>  (-1 + Sqrt[1 + 4*a])/(2*a)}
>
> In:= Limit[solns, a->0]
> Out= {-Infinity, 1}
>
> Note that a blind substitution of a->0 will not give "nice" results.
>
> In:= 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= {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

>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:= InputForm[solns = x /. Solve[a*x^2 + x == 1, x]]
>Out//InputForm= {(-1 - Sqrt[1 + 4*a])/(2*a),
>   (-1 + Sqrt[1 + 4*a])/(2*a)}
>
>In:= Limit[solns, a->0]
>Out= {-Infinity, 1}
>
>Note that a blind substitution of a->0 will not give "nice" results.

Well. But how I can get the partial answer for the case a=1 with
Limit?
I have tried the foolowing code:
In:= Limit[Integrate[Cos[a*z]/Sin[z],z],a->1]
Out= \[Infinity]
In:= Limit[Integrate[Exp[a*z]*Sinh[z],z],a->1]
Out= -\[Infinity]
In:= Limit[Integrate[Exp[z]*Sinh[a z],z],a->1]
Out= E^z DirectedInfinity[E^(-I*Im[z])]
In:= Limit[Integrate[Exp[(a-1)*x],x],a->1]
Out= \[Infinity]
All results are incorrect!
As I understand, Integrate does not give a generic result that behaves
sensibly in the limit as a->1!

```

• Prev by Date: Re: Re: Re: Cannot Factor an expression
• Next by Date: Re: List re-arrangement question
• Previous by thread: Re: Re: A Problem with Simplify
• Next by thread: Re: Re: A Problem with Simplify