Re: Re: Integrating Abs[Sin[]^2]
- To: mathgroup at smc.vnet.net
- Subject: [mg39126] Re: [mg39096] Re: Integrating Abs[Sin[]^2]
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 30 Jan 2003 01:06:35 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I think you are first overestimating what Assumptions in Integrate is meant to do and then not surprisingly are disappointed when you discover it does not do it. But actually it is an old and rather primitive mechanism. It essentially only does the following: if Integrate[integrand] without assumptions returns the answer in the form If[ assumption, "something", integrand] form Integrate[integrand, Assumptions-> assumption] will (usually) return "something". (It actually does a little more but not much). Moreover, you can sometimes use assumptions like Im[z]==0 but not Element[z,Reals], because, Element was introduced later than the Assumptions mechanism in Integrate and the latter was not revised to make use of it. It would be undoubtedly marvelous if every time a new capability was added to Mathematica the entire program was re-written and all function that might benefit form it did so, but this is unrealistic. I know of some parts of Mathematica that have not changed since at least version 2, and I am sure there are parts of the code that nobody working at Wolfram has looked at for years. This is only natural with a program of this size and complexity and with so many specialized functions. I think almost everyone will agree that Integrate badly needs an overhaul but it's clearly not a simple task, the number of people working on it is small, and I suspect we will be lucky if its done by the next version. In any case, I don't expect that you will ever be able to enter any reasonable assumptions into any function you like and have Mathematica take it into account in the answer it returns. On Wednesday, January 29, 2003, at 05:37 PM, Jos R Bergervoet wrote: > >> But surely, as I noted previously in this thread, Mathematica -- at >> least version 4.2 for Windows -- does give a wrong answer for >> result = Integrate[ Abs[Sin[k x]]^2, {x,0,1}, Assumptions-> >> Element[k, Complexes]; N[ result /. k->I+1 ]. I do not see how the >> incorrectness of this can be debated (other than to say that >> Mathematica should be allowed to ignore an _explicitly stated_ >> assumption!) > > Coming to think of it, Mathematica could of course also ignore _any_ > explicitly stated fact in its input and give the default result "42" > to all questions! But version 4.2 is probably still lacking one order > of magnitude in wisdom to do this. :-) > > -- Jos < Jos.Bergervoet@philips .n_o_spa_m. com > > > > Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/