Group Abstract Group Abstract

Message Boards Message Boards

0
|
213 Views
|
8 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Possible error in solving Improper integral

Posted 2 days ago
NIntegrate[ArcTan[x]/(x^2 - x + 1), {x, 0, Infinity}]

1.89941
 Integrate[ArcTan[x]/(x^2 - x + 1), {x, 0, Infinity}] // N

1.89941 - 3.64593 I !!!!

Integrate[ArcTan[x]/(
  x^2 - x + 1), {x, 0, Infinity}] -> ( x -> (1 - y)/(1 + y )) -> 
  Integrate[(2 ArcTan[(1 - y)/(1 + y)])/(1 + 3 y^2), {y, -1, 1}] -> 
   2 Integrate[(Pi/4 - ArcTan[y])/(1 + 3 y^2), {y, -1, 1}] -> 
    Pi/2  Integrate[ 1/(1 + 3 y^2), {y, -1, 1}] - 
      2 Integrate[ArcTan[y]/(1 + 3 y^2), {y, -1, 1}] -> \[Pi]^2/(
      3 Sqrt[3])  - 0

N[\[Pi]^2/(3 Sqrt[3])]

1.89941

Attachments:
8 Replies

In Integrate[ArcTan[x]/(x^2 - x + 1), {x, 0, Infinity}] // FullSimplify

Out[21]= 1/( 288 Sqrt[ 3]) (121 [Pi]^2 - 36 (ArcCos[2]^2 - 4 Log[2] Log[28 - 16 Sqrt[3]] + 2 Log[8 - 4 Sqrt[3]]^2 + 4 (PolyLog[2, 1 - (-1)^(1/6)] + PolyLog[2, 1/2 ((2 + I) - Sqrt[3])] + PolyLog[2, 2/((2 - I) + Sqrt[3])] + PolyLog[2, 2/((2 + I) + Sqrt[3])])))

In[22]:= N[%]

Out[22]= 1.89941 - 3.20494*10^-17 I

It seems that FullSimplify changes the numerical value of an expression a lot:

In[69]:= a = finfinity - fdisc1 + fdisc0 - f0;
a // N
FullSimplify[a] // N

Out[70]= -0.474852 - 1.19435 I

Out[71]= 1.89941 + 0. I
POSTED BY: Gianluca Gorni

FullSimplify might not have changed the numeric value at all. What might instead have changed is their numerical conditioning. This can be checked by using e.g. N[...,50].

POSTED BY: Daniel Lichtblau

Is it Accuracy that does a poor job here?

int = Integrate[ArcTan[x]/(x^2 - x + 1), {x, 0, Infinity}];
int // N
% // Accuracy
POSTED BY: Gianluca Gorni

Another way:

POSTED BY: Mariusz Iwaniuk

This appears to be a bug in Integrate.

POSTED BY: Daniel Lichtblau

This appears to be a bug in Limit maybe in the Integrate:

POSTED BY: Mariusz Iwaniuk

Let us try a workaround. The primitive given by Mathematica is discontinuous:

f[x_] = Integrate[ArcTan[x]/(x^2 - x + 1), x]
Plot[f[x], {x, 0, Infinity}]

This is where the discontinuity occurs:

FunctionDiscontinuities[f[x], x, Complexes];
FullSimplify[%, Element[x, Reals]]

The full integral can be calculated this way:

disc = 2 + Sqrt[3];
f0 = f[0];
fdisc0 = Limit[f[x], x -> disc, Direction -> "FromBelow"];
fdisc1 = Limit[f[x], x -> disc, Direction -> "FromAbove"];
finfinity = Limit[f[x], x -> Infinity];
finfinity - fdisc1 + fdisc0 - f0 // FullSimplify
% // N
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard