MathGroup Archive 2004

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

Search the Archive

RE: How to get the real part of an integral?


Andy,

How about...

step1 = Integrate[1/(1 + x^2 + x^4), x];

ComplexExpand[Re[step1], TargetFunctions -> {Re, Im}];
f[x_] = Simplify[%]
(1/12)*((-Sqrt[3])*ArcTan[2 - x, (-Sqrt[3])*x] +
   Sqrt[3]*ArcTan[2 - x, Sqrt[3]*x] -
   Sqrt[3]*ArcTan[2 + x, (-Sqrt[3])*x] +
   Sqrt[3]*ArcTan[2 + x, Sqrt[3]*x] -
   3*Log[1 - x + x^2] + 3*Log[1 + x + x^2])

Plot[f[x], {x, -10, 10}];

You don't need Algebra`ReIm` and you will often have to use ComplexExpand on
complex analysis problems. Think of ComplexExpand as being more a
ComplexSimplify command.

Notice that Mathematica used the two argument ArcTan, which is a pretty neat
function!

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: Andy Kowar [mailto:ankowar at yahoo.com]
To: mathgroup at smc.vnet.net

I am trying to get the real part of an integral (see below).


<< Algebra`ReIm`
Integrate[1/(1 + x^2 + x^4), x]
Re[%]

I am getting the error:
"$IterationLimit::itlim: Iteration limit of 4096 exceeded."


Any advice?

AK





  • Prev by Date: Re: How to get the real part of an integral?
  • Next by Date: Re: complex analysis problem in mathematica 3.0
  • Previous by thread: Re: How to get the real part of an integral?
  • Next by thread: Re: Re: Number of roots from Solve?