MathGroup Archive 1999

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

Search the Archive

Complex integral from real integrand

  • To: mathgroup at
  • Subject: [mg20301] Complex integral from real integrand
  • From: William Golz <wgolz at>
  • Date: Tue, 12 Oct 1999 03:39:35 -0400
  • Organization: Global Network Services - Remote Access Mail & News Services
  • Sender: owner-wri-mathgroup at

Synopsis of the problem:
I get a complex result of the form f(t)=(a+bi)g(t), where b is very
small (b~10^-18), when evaluating a real integrand F(x,t)*phi(x) over
the interval {x:0<x<L). All of the variables have been properly declared
as real and the functions have been declared as real for real arguments
(using the package "ReIm").

To see the problem more clearly, the code can be copied into Mathematica

(3 or 4) and executed. (The Traditional or Standard Forms will not paste

into a text document such as this)

 When evaluating the integral

                 \!\(\[Integral]\_0\%\[ScriptL]\( simpF\[CurlyPhi]\_n\)

                 over the interval (0,ScriptL) where ScriptL=1. The
                 \!\(simpF\[CurlyPhi]\_n\ is, for n=1, given by

                 \`\(-\(1\/6\)\)\ \[ExponentialE]\^\(\(\(-3\)\
                 \((\((3 + 2\ \[Pi]\^2)\)\ \(cos(\[Pi]\ x)\) -
                 6\ \[ExponentialE]\^\(x/2\) + 3)\)\
                 \((cos(3.66558239083868908`\ x) +
sin(3.66558239083868908`\ x))\)\)

 and for n=2,

                 \`\(-\(1\/6\)\)\ \[ExponentialE]\^\(\(\(-3\)\
                 \((\((3 + 2\ \[Pi]\^2)\)\ \(cos(\[Pi]\ x)\) -
                 6\ \[ExponentialE]\^\(x/2\) + 3)\)\
                 \((cos(6.58302641111680308`\ x) +
sin(6.58302641111680308`\ x))\)\)

I get the result for n=1,2, respectively

                 \`\((\(-2.34710341268466837`\) + 0.`\ \[ImaginaryI])\)\

                 \[ExponentialE]\^\(\(\(-3\)\ \[Tau]\)/2\)\)

                 \`2\[InvisibleSpace]'' ''\[InvisibleSpace]\(\((
                 \(-1.26446964467229783`\) + 0.`\ \[ImaginaryI])\)\
                 \[ExponentialE]\^\(\(\(-3\)\ \[Tau]\)/2\)\)\)

For simple functions F, the product F*phi can be integrated by parts,
where the result contains no potential for complex coefficients when the

variables are real valued. However, evaluating an identical integrand in

Mathematica will give the result f(t)=(a+0.i)g(t). There does not seem
to be any way to avert this, either by defining the variables to be real

and the functions to be real valued (for real arguments).

The evaluation of the integral is also quite slow even for n=2, and even

when the expression is simplified as much as possible; and the final
program will need to evaluate a larger number of terms.

Thanks in advance, Bill

  • Prev by Date: Re: Mathematica 4.0.1 Front End crashes my Mac
  • Next by Date: Re: Generalization of Greater to matrices
  • Previous by thread: Re: 3.0 Front End and 4.0 Kernel
  • Next by thread: add to wishlist