Main
The bug cannot only be attributed to the Sqrt in the integrand. It is trickier.
In fact, define for t=0,1,2,...
f[t_] := Integrate[(1 - x)*(1 + 2*x)^t/Sqrt[1 - x^2], {x, -1, 1}]/Pi
Then
{#, f[#]} & /@ {0, 1, 2, 3, 4, 5, 6, 7, 8}
(* Out[33]= {{0, 1}, {1, 0}, {2, 1}, {3, 1}, {4, 3}, {5, 6}, {6, (
1 + (29 \[Pi])/2)/\[Pi]}, {7, (1 + (71 \[Pi])/2)/\[Pi]}, {8, (
1 + (181 \[Pi])/2)/\[Pi]}} *)
Which is correct for t=0..5 but becomes wrong for t=6, 7, ... but in all cases the branch cut problem of the Sqrt in the integrand should appear. So what is so special about t=6, 7, ...?
I don't have an answer but have continued the study: writing in the integrand (for |x|<1)
Simplify[(1 - x)/Sqrt[1 - x^2 ] == Sqrt[(1 - x)/(1 + x)], -1 <= x <= 1]
(* Out[40]= True *)
the integral becomes
f1[t_] := Integrate[Sqrt[(1 - x)/(1 + x)] (1 + 2*x)^t, {x, -1, 1}]/Pi
At integer values we have
{#, f1[#]} & /@ {0, 1, 2, 3, 4, 5, 6, 7, 8}
(* Out[37]= {{0, 1}, {1, 0}, {2, 1}, {3, 1}, {4, 3}, {5, 6}, {6, 15}, {7, 36}, {8, 91}} *)
and no problem is encountered.
The integral can even be solved for real t (do the indefinite integral, then insert the limits x=1, x=-1), with the analytical result
f2[t_] := -3^t (-2 Hypergeometric2F1[1/2, -t, 1, 4/3] + Hypergeometric2F1[1/2, -t, 2, 4/3])
Except for non negative integers t this function is complex as can be seen by plotting it:
Plot[{Re[#], Im[#]} &[f2[t]], {t, -7, 7}]
(* graph now shown here *)
Best regards,
Wolfgang
EDIT 07.09.14 00:55
Even stranger:
Integrate[(1 + 2 x)^6/Sqrt[1 - x^2] (1 - x), {x, -1, 1}]/Pi
(* Out[88]= (1 + (29 \[Pi])/2)/\[Pi] *)
Decomposing trivially (1-x) = 1 - x
gives two integer parts
Integrate[(1 + 2 x)^6/Sqrt[1 - x^2] (1), {x, -1, 1}]/Pi
(* Out[91]= 141 *)
Integrate[(1 + 2 x)^6/Sqrt[1 - x^2] (-x), {x, -1, 1}]/Pi
(* Out[92]= -126 *)
and added = 15, as it should be
% + %%
(* Out[93]= 15 *)
Regards, Wolfgang
int = Integrate[(1 - x)*(1 + 2*x)^6/Sqrt[1 - x^2], x]
and thenLimit[int, x -> 1] - Limit[int, x -> -1]
. $\endgroup$Integrate[(1 - x)*(1 + 2*x)^6/Sqrt[1 - x^2], {x, -1, 1}, GenerateConditions -> False]
$\endgroup$NIntegrate[FEx[w]*Conjugate[FEx[w]], {w, -Infinity, Infinity}]
(or same, but withIntegrate
) then I do not see an incorrect result. In any case, sending a report via comment, without proper formatting of the input and without full explanation of the issue, is not all that sensible in terms of getting it addressed. $\endgroup$