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]. – b.gates.you.know.what Sep 05 '14 at 12:11Integrate[(1 + 2*x)^6*Sqrt[(1 - x)/(1 + x)], {x, -1, 1}]– Michael E2 Sep 05 '14 at 12:34Integrate[(1 - x)*(1 + 2*x)^6/Sqrt[1 - x^2], {x, -1, 1}, GenerateConditions -> False]– Michael E2 Sep 05 '14 at 12:44Integrate[1/\[Pi] ((1 - x) (1 + 2 x)^6)/Sqrt[1 - x^2], {x, -1 + a, 1 + a}] /. a -> 0. – Stephen Luttrell Sep 05 '14 at 12:57$Assumptions = w ∈ Reals; FEx[w_] = (I E^(-25 + 5 I w - w^2/4) Sinh[5 w])/Sqrt[2]; NIntegrate[(FEx[w])\[Conjugate]*FEx[w], {w, -∞, ∞}] NIntegrate[(FEx[w])\[Conjugate]* FEx[w], {w, -∞, ∞}, Method -> {Automatic, "SymbolicProcessing" -> 0}]– xslittlegrass Sep 05 '14 at 15:44NIntegrate[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. – Daniel Lichtblau Sep 05 '14 at 17:51$Assumptions = w ∈ Reals;, on my computer I get different result for these two cases: (1)NIntegrate[(FEx[w])\[Conjugate]*FEx[w], {w, -\[Infinity], \[Infinity]}](2)NIntegrate[(FEx[w])\[Conjugate]* FEx[w], {w, -\[Infinity], \[Infinity]}, Method -> {Automatic, "SymbolicProcessing" -> 0}]. I reported to the technical support three years ago, and it was confirmed. I thought this is related to the bug here. I will send a proper report with explanation to the support. – xslittlegrass Sep 05 '14 at 21:50FEx[w]. When I rewrite asConjugate[FEx[w]]it seems to go better, and both cases agreed. – Daniel Lichtblau Sep 05 '14 at 22:05