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: [mg87486] Re: [mg87419] A Problem with Simplify
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Fri, 11 Apr 2008 01:48:02 -0400 (EDT)
  • References: <200804100612.CAA10423@smc.vnet.net>

Simplify does not return conditional answers (in the form If[..]) and  
I don't think it would be reasonable to expect it to do so. The reason  
is that unlike definite Integration (which does) Simplify is  
frequently used as part of code for other functions (including built  
in functions) and returning conditional answers could have a dramatic  
impact on complexity and what's worse, would only make sense if other  
functions also returned conditional answers (and accepted conditional  
input). It just does not seem practical now or in any foreseeable  
future.

Andrzej Kozlowski


On 10 Apr 2008, at 15:12, 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
> -- 
>
> Kevin J. McCann
> Research Associate Professor
> JCET/Physics
> Physics Building
> University of Maryland, Baltimore County
> 1000 Hilltop Circle
> Baltimore, MD 21250
>




  • Prev by Date: Re: Import .xlsx files
  • Next by Date: RE: Event when clicking one of many Disks in a Pane
  • Previous by thread: A Problem with Simplify
  • Next by thread: Re: A Problem with Simplify