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

• To: mathgroup at smc.vnet.net
• Subject: [mg48474] RE: [mg48453] How to get the real part of an integral?
• From: "David Park" <djmp at earthlink.net>
• Date: Tue, 1 Jun 2004 03:02:50 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

Andy,

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

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."