MathGroup Archive 2003

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

Search the Archive

Re: Integrating Abs[Sin[]^2]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39052] Re: Integrating Abs[Sin[]^2]
  • From: "Dana DeLouis" <delouis at bellsouth.net>
  • Date: Sun, 26 Jan 2003 05:22:50 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

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>



  • Prev by Date: Re: Re: Lower Floor
  • Next by Date: new operator
  • Previous by thread: Re: Re: Integrating Abs[Sin[]^2]
  • Next by thread: Re: Integrating Abs[Sin[]^2]