Re: Re: Integrating Abs[Sin[]^2]
- To: mathgroup at smc.vnet.net
- Subject: [mg39072] Re: [mg39052] Re: Integrating Abs[Sin[]^2]
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 26 Jan 2003 18:44:12 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
The Assumptions meachanism in Integrate predates the use of domains in Mathematica and has never been updated to work with it. Thus there is completely no point in trying to use functions like Element together with Assumptions in Integrate since they will be ignored. Assumptions in Integrate is a very limited mechanism that deals basically with convergence. ELement belongs to a much newer algebraic mechanism used in functions like Simplify and FunctionalExpand. I beleive there is a plan to update Assumptions some day to make use of the newer technology (which appeared only in version 4), but this has not been done yet. As for the strange bug that the letters one uses as names of variables sometimes affect the output of Integrate; it been menioned to on this list a few times. But it only affects Integrate and not, for example, GroebnerBasis, or Solve, or countless other functions, so it seems to me a bit of an exaggeration to claim that : " One cannot really trust any output from Mathematica 4.2." Unless, of course, you mean that one can't trust any output form any symbolic algebra program or indeed any other computer program, which of course is in a sense true, but hardly news. Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Sunday, January 26, 2003, at 07:22 PM, Dana DeLouis wrote: > I am not an expert, but I believe the huge bug in Mathematica 4.2 > causes > this. > Theoretically, one should be able to tell Mathematica that k is an > element of Complexes by the "Element" command, or thru the use of > "Assumptions" > However, neither one works for Mathematica 4.2. If you tell > Mathematica 4.2 > that k is complex in the following way, then it should work as you > expect. > > Note that "removeall" is my own program to clear Global Variables. > > removeall > "All Global` variables Removed!" > > k = a + b*I; > Integrate[Abs[Sin[k*z]]^2, {z, 0, 1}] > > This returns what you expected? > > ((-b)*Sin[2*a] + a*Sinh[2*b])/(4*a*b) > > However, this only works because you were lucky in picking the variable > a & b that come before the letter x in the Alphabet > If you had picked variable names that begin with y & z, which come > after > x in the alphabet, then your results should be much different. Let's > see... > > removeall > "All Global` variables Removed!" > > k = y + I*z; > > Integrate[Abs[Sin[k*z]]^2, {z, 0, 1}] > > (Sqrt[2*Pi]*y*Erf[Sqrt[2]] + Sqrt[2*Pi]*y*Erfi[Sqrt[2]] - > 4*Sin[2*y])/(16*y) > > It is this fundamental bug in Mathematica 4.2 that makes searching for > any further problems rather useless. One cannot really trust any > output > from Mathematica 4.2. > > -- > Dana DeLouis > Windows XP > $VersionNumber -> 4.2 > = = = = = = = = = = = = = = = = = > > Note: I have removed In / Out at the suggestion of other Newsgroup > contributors. This appears to make it easier to copy into Mathematica. > This option is found under <Kernal> <Show In/Out Names> > > > >