Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: A Problem with Simplify

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87444] Re: A Problem with Simplify
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 11 Apr 2008 01:40:10 -0400 (EDT)
  • References: <ftkb7f$a9m$1@smc.vnet.net>


Hi Kevin,

the culprit is Integrate not Simplify. In the manual one finds:

"For indefinite integrals, Integrate tries to find results that are 

correct for almost all values of parameters."

I think this to be a trap for the unwary.

hope this helps, Daniel



Kevin J. McCann 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.

> 

> The following is just fine

> 

> Imn = Simplify[Integrate[

>         Sin[(m*Pi*x)/L]*

>           Sin[(n*Pi*x)/L],

>         {x, 0, L}]]

> 

> 

> However, if I specify that m and n are integers, I only get the 

> "general" solution of zero, i.e. when m and n are not equal.

> 

> Imn = Simplify[Integrate[

>         Sin[(m*Pi*x)/L]*

>           Sin[(n*Pi*x)/L],

>         {x, 0, L}],

>       Element[m, Integers] &&

>         Element[n, Integers]]

> 

> The workaround is obvious in this case, but shouldn't Mathematica give multiple 

> answers? Perhaps something similar to what it already does with Integrate?

> 

> Kevin




  • Prev by Date: Re: A Problem with Simplify
  • Next by Date: Intersection of lists of lists based on the first term
  • Previous by thread: Re: A Problem with Simplify
  • Next by thread: Re: A Problem with Simplify