Group Abstract Group Abstract

Message Boards Message Boards

0
|
126 Views
|
6 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Possible error in solving Improper integral

Posted 1 day 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:
6 Replies

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

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