       Re: A Problem with Simplify

• To: mathgroup at smc.vnet.net
• Subject: [mg87696] Re: A Problem with Simplify
• From: Alexey Popkov <popkov at gmail.com>
• Date: Tue, 15 Apr 2008 06:51:18 -0400 (EDT)
• References: <ftkb7f\$a9m\$1@smc.vnet.net> <200804140943.FAA08090@smc.vnet.net>

```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:= InputForm[Integrate[Exp[(a - 1)*x], x]]
> Out//InputForm= E^((-1 + a)*x)/(-1 + a)
>
> In:= InputForm[Integrate[Cos[(a - 1)*x], x]]
> Out//InputForm= Sin[(-1 + a)*x]/(-1 + a)
>
> In:= InputForm[Integrate[(a - 1)^x, {x, -1, 0}]]
> Out//InputForm= (-2 + a)/((-1 + a)*Log[-1 + a])
>
> In:= InputForm[Integrate[Cos[a*x]/Sin[x], x]]
> Out//InputForm=
> ((1 + a)*Hypergeometric2F1[1/2 - a/2, 1, 3/2 - a/2, E^((2*I)*x)] -
> =9A =9A(-1 + a)*E^((2*I)*a*x)*Hypergeometric2F1[(1 + a)/2, 1, (3 + a)/2,
> =9A =9A =9AE^((2*I)*x)])/((-1 + a^2)*E^(I*(-1 + a)*x))
>
> 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]

But the first answer is invalid in this simple case... :(

I should emphasize that in some complicated cases this BUG may result

And the lost answer in the above-mentioned case (by Kevin J. McCann)
is already very dangerous in spite of the fact that this partial
answer is still not random (because in this relatively simple case
there are only 2 partial answers):

int1 = Integrate[Sin[a*x/L]*Sin[x/L], {x, 0, L}]
int1 /. a -> 1
int2 = Integrate[Sin[x/L]*Sin[x/L], {x, 0, L}]

One can represent how it will be, when 3 or more partial answers will
exist!

On 11 =C1=D0=D2, 09:42, dh <d... at metrohm.ch> wrote:
>In the manual one finds:
> "For indefinite integrals, Integrate tries to find results that are
> correct for almost all values of parameters."
for Integrate. And this seems to be false... :( And for definite
integrals there is an option "GenerateConditions" that does not work
in the most cases (try it with example above:
int1 = Integrate[Sin[a*x/L]*Sin[x/L], {x, 0, L}, GenerateConditions ->
True]
int1 /. a -> 1
The answer is Indeterminate that is false! :(
).

```

• Prev by Date: Re: EdgeRenderingFunction to produce edge labels in GraphPlot
• Next by Date: Dynamic (more)
• Previous by thread: Re: Re: A Problem with Simplify
• Next by thread: Re: Re: A Problem with Simplify