MathGroup Archive 2008

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

Search the Archive

Re: A Problem with Simplify

  • To: mathgroup at
  • Subject: [mg87536] Re: A Problem with Simplify
  • From: "David W.Cantrell" <DWCantrell at>
  • Date: Sat, 12 Apr 2008 07:00:47 -0400 (EDT)
  • References: <> <> <> <ftncra$8bc$>

Andrzej Kozlowski <akoz at> wrote:
> I am not convinced (by the way, this very question with the same
> example was discussed here quite recently).
> The usual argument is that Mathematica adopts a "generic" approach,
> whatever that means. I don't much like this way of thinking because
> such a concept of "genericity" is hard to formalize. Instead I have my
> own way of thinking about this, which at least satisfies me on this
> score. Essentially, I think of all Mathematica expressions as
> belonging to some formal algebraic system, a "partial algebra" (you
> can formally add and multiply most expressions although not quite all,
> and you can even multiply then by "scalars"). There are certain "built
> in" relations that hold between certain expressions in the algebra and
> other relations can be introduced by the user. Any two different
> symbols are always different, unless there is a built in relationship
> or a user defined relationship that says otherwise. Hence the answer
> returned by
>   Assuming[Element[m | n, Integers],
>   Simplify[Integrate[Sin[(m*Pi*x)/L]*Sin[(n*Pi*x)/L], {x, 0, L}]]]
>   0
> is completely correct in my interpretation and not just "generically
> correct" because in my interpretation m and n are not equal simply by
> virtue of being different Mathematica expressions. On the other hand:
>   Assuming[Element[m | n, Integers] && m == n,
>   Simplify[Integrate[Sin[(m*Pi*x)/L]*Sin[(n*Pi*x)/L], {x, 0, L}]]]
> L/2
> is also O.K. because we performed the simplification with the user
> introduced relation m==n.

That's not the reason. Rather, it's because we performed the _integration_
with the assumption that m==n. (Note that if the integration had been done
without that assumption and then that result had been simplified with the
assumption, we would have gotten Indeterminate.)

> So, with my interpretation (different symbols are always different
> quantities unless stated otherwise) all is well.

Not in my opinion. If both m and n are 0, then obviously the value of the
integral must be 0, rather than L/2. (BTW, I had not noted that fact in my
previous response to Kevin.)

In my previous post, I gave a result which is valid for all real values of
the parameters:

L/2 (Sinc[(m - n) Pi] - Sinc[(m + n) Pi])

David W. Cantrell

  • Prev by Date: Re: Ranks for an array of triplets
  • Next by Date: Re: Ranks for an array of triplets
  • Previous by thread: Re: A Problem with Simplify
  • Next by thread: Re: A Problem with Simplify