# Integration giving unknown messages

I am trying to integrate the following

Integrate[(Log[1 - t] t^(-(1/2) + eps))/(1 + t),{t,0,1}]


To simplify this I am doing a further transformation t->r^2:

Integrate[(2 r^(2 eps) Log[1-r^2])/(1+r^2),{r,0,1},GenerateConditions->True,Assumptions->{eps>0}] //Timing
{88.6184,  ConditionalExpression[  1/2 (HarmonicNumber[-(1/2) + eps]^2 - HarmonicNumber[eps]^2 - PolyGamma[1, 1/2 + eps] + PolyGamma[1, 1 + eps]), Re[IntegrateImproperDumpepsilon$$1241384] > 0 && Im[IntegrateImproperDumpepsilon$$1241384] == 0]}

Collect[Normal[Series[%, {eps, 0, 3}]], eps] // N
{88.6184, -0.684028 + 0.371253 eps - 0.240723 eps^2 + 0.163299 eps^3}


I did not understand the conditions it has generated.

If I do the expansion first (might be questionable due to r->1 limit?) I get a different result,

CoefficientList[ Normal[Series[(2 r^(2 eps) Log[1 - r^2])/(1 + r^2), {eps, 0, 3}]], eps];
NIntegrate[%, {r, 0, 1}]
{-0.743138, 0.426997, -0.281255, 0.189561}


My question is which procedure is wrong? I believe the second one due to r->1 might not be defined. But then I did not understand the condition message generated in the analytic approach:

 Re[IntegrateImproperDumpepsilon$$1241384] > 0 && Im[IntegrateImproperDumpepsilon$$1241384] == 0


$Version : "12.0.0 for Linux x86 (64-bit) (April 7, 2019)" EDIT: I found another thread that suggests using Abs inside the Log but does not change anything for Integrate. EDIT-2: Just to add some more observations: It seems the Integrate in this case is not giving the correct result. j=CoefficientList[ Normal[Series[(2 r^(2 eps) Log[1 - r^2])/(1 + r^2), {eps, 0, 3}]], eps]  {(2 Log[1 - r^2])/(1 + r^2), (4 Log[r] Log[1 - r^2])/(1 + r^2), (4 Log[r]^2 Log[1 - r^2])/(1 + r^2), (8 Log[r]^3 Log[1 - r^2])/(3 (1 + r^2))} NIntegrate[j, {r, 0, 1}]//Timing  {0.104228, {-0.743138, 0.426997, -0.281255, 0.189561}} Integrate[j,{r,0,1},GenerateConditions->False]//Timing  {340.878, {-2 Catalan + 1/2 [Pi] Log[2], 1/48 (15 [Pi]^3 - 384 Catalan Log[2] + 10 I [Pi]^2 Log[2] + 12 [Pi] Log[2]^2 - 2 I (4 Log[2]^3 - 192 PolyLog[3, 1/2 + I/2] + 105 Zeta[3])), -((11 [Pi]^4)/90) + 7 Log[4] Zeta[3], -(1/3) [Pi]^4 Log[2] - 10/3 [Pi]^2 Zeta[3] + 60 Zeta[5]}} %//N  {340.878, {-0.743138, 0.426997, -0.240723, 0.163299}} It thus follows that in the integrands associated with eps^2, eps^3 there is something strange. Attempting the same with the original integrand in t kills the kernel. Checked with 13.1.0 for Linux x86 (64-bit) (June 16, 2022) • Assumtions->{eps>0} I assume you used Assumptions in your actual code and not Assumtions? Besides this, on V 13.3.1 it does not evaluate: !Mathematica graphics Commented Oct 13, 2023 at 10:58 • @Nasser I have used the correct one during the evaluation. It is just a mistake while writing here. I have corrected that now. Commented Oct 13, 2023 at 11:01 • Since you are using V 12, which is 4 years old, this looks like a bug that was since fixed since the integral does not evaluate now. These messages IntegrateImproperDumpepsilon$1241384 are clearly leaked symbols from internal code and should not show up. Commented Oct 13, 2023 at 11:03
• @Nasser I have tried it with V13.1.0 and the problem is still there. Maybe it was fixed later as you said. Commented Oct 13, 2023 at 11:07

Mathematica v12.2 is able to evaluate the first form of the integral (with general exponent a=-1/2+eps):

Integrate[Log[1 - t] t^a/(1 + t), {t, 0, 1}]


and gives the restriction Re[a]>-1

int = Integrate[Log[1 - t] t^a/(1 + t), {t, 0, 1},Assumptions -> Re[a] > -1]


$$\frac{\Gamma (a+2) \left(2 \left(\text{Hypergeometric2F1Regularized}^{(0,0,1,0)}(1,a+1,a+3,-1)+\text{Hypergeometric2F1Regularized}^{(0,1 ,0,0)}(1,a+1,a+3,-1)\right)-\text{HypergeometricPFQRegularized}^{(\{0,0,0\},\{0,1\},0)}\left(\{1,2,2\},\{a+3, 2\},\frac{1}{2}\right)\right)-2 H_{a+1}}{4 (a+1)}$$

The formula holds for eps>-1/2

Plot[int /. a -> -1/2 + eps, {eps, -1/2, 2},AxesLabel -> {eps, "int[eps]"}, AxesOrigin -> {0, 0}]


Hope it helps!

• In fact, yhe formula holds for eps > -3/2 as shown in my answer, making use of 13.3.1 on Windows 10. Commented Oct 13, 2023 at 17:24
• @user64494 Perhaps Mathematica v13 Integrate[Log[1 - t] t^a/(1 + t), {t, 0, 1} ] gives a stronger condition for a? v12 only gives a>-1 ( eps>-1/2) Commented Oct 13, 2023 at 17:53
• @UlrichNeumann In 13.1.0 its the same Re[a] > -1. Commented Oct 13, 2023 at 18:27

As I understand it, your aim is to find the integral depending on eps. The result of

Series[Log[1 - t] t^(-1/2 + eps)/(1 + t), {t, 0, 3}] // Normal


t^eps (-Sqrt[t] + t^(3/2)/2 - (5 t^(5/2))/6)

implies its convergence iff eps>-3/2. Knowing it, we need not in GenerateConditions at all

j = Integrate[Log[1 - t] t^(-1/2 + eps)/(1 + t), {t, 0, 1},
Assumptions -> eps > -3/2, GenerateConditions -> False]


(-4*HarmonicNumber[1/2 + eps] - 2*Gamma[3/2 + eps]* (Derivative[{0, 0, 0}, {0, 1}, 0][HypergeometricPFQRegularized][ {1, 2, 2}, {5/2 + eps, 2}, 1/2] - 2*(Derivative[0, 0, 1, 0][Hypergeometric2F1Regularized][1, 1/2 + eps, 5/2 + eps, -1] + Derivative[0, 1, 0, 0][ Hypergeometric2F1Regularized][1, 1/2 + eps, 5/2 + eps, -1])))/ (4 + 8*eps)

We should test the behavior of the analytic expression j at eps==-1/2 because of the denominator 4+8*eps.

j /. eps -> -0.499


-1.06174

Last, but not least: numerical test of j

NIntegrate[Log[1 - t] t^(-1/2 + eps)/(1 + t) /. eps -> -0.499, {t, 0, 1}]


-1.06174

All that is done in 13.3.1 on Windows 10.

Edit. Series.

• All I want is the eps expasion of the correct result. Unfortunately, I do not have access to 13.3.1. But with 12 I could reproduce your result although it generates a lot of messages like RecursionLimit, IterationLimit exceeded, Hold[Select::normal : Nonatomic expression expected at position 1 in Select[IntegrateTableDumpres$39229,Last[#1]=!={}&].]. If I try to get the leading term setting eps->0 limit, I get 0.25 (-2.45482 - 1.77245 (-0.933543 - 2. (True Return[-0.418354] + True Return[-0.194467]))). I believe the NIntegrate is giving correct result even in V12. Commented Oct 13, 2023 at 16:07 • @BabaYaga: You wrote "I have tried it with V13.1.0 and the problem is still there. Maybe it was fixed later as you said" . Try it in free Wolfram Cloud. Commented Oct 13, 2023 at 16:11 • Yes. In all mathematica versions up to 13.1.0, the NIntegrate (first expanding the integrand in eps and then performing NIntegration) gives the same result & is quoted in the question. Now the problem is the Integrate which gives some results but it seems different from NIntegrate. I tried your method in V13.1.0 and could generate the result and also the correct leading term (eps=0) which is the same as the NIntegrate. Even with HypExp I could also exactly get the NIntegrate results. Unfortunately, I could not get the analytical eps - expanded results by any of the methods. Commented Oct 13, 2023 at 16:22 • I was hoping the results after the eps expansion will be something of simpler form but it is already with Hypergeometric etc. Commented Oct 13, 2023 at 16:24 • In your approach why didn't you try integrating the integrand in terms of r ? You checked the Series in r and then tried the original integrand in t. Is there any specific reason for that? Commented Oct 13, 2023 at 16:26 Using NSeries $Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global*"]

int[eps_] =
Assuming[eps > -1/2,
Integrate[(Log[1 - t] t^(-(1/2) + eps))/(1 + t), {t, 0, 1}] // Simplify]


Needs["NumericalCalculus"]

intApprox[eps_] =
NSeries[int[eps], {eps, 0, 18}, WorkingPrecision -> 15] // Normal

(* -0.7431381432026 + 0.4269973678628 eps - 0.2812548075579 eps^2 +
0.1895607297093 eps^3 - 0.1279652435101 eps^4 + 0.0861500457739 eps^5 -
0.0578267139030 eps^6 + 0.0387251026194 eps^7 - 0.0258911737789 eps^8 +
0.0172919781863 eps^9 - 0.0115408785430 eps^10 + 0.0076991971011 eps^11 -
0.0051349443936 eps^12 + 0.0034241649584 eps^13 - 0.0022831270543 eps^14 +
0.0015222257158 eps^15 - 0.0010148737927 eps^16 + 0.0006766052580 eps^17 -
0.0004510792839 eps^18 *)

Plot[{int[eps], intApprox[eps]}, {eps, -3/2, 3/2},
PlotStyle -> {Automatic, Dashed},
WorkingPrecision -> 15,
PlotLegends -> Placed["Expressions", {.8, .5}]]


• I was not aware of NSeries. It confirms that the expansion method should work in this case. Also my original attempt in terms r and Integrate in the question is giving the wrong result. This is a little scary! Commented Oct 13, 2023 at 18:08
• Another way is as follows. Execute Series[(Log[1 - t] t^(-(1/2) + eps))/(1 + t), {eps, 0, 5}] // Normal and then NIntegrate[Log[1 - t]/(Sqrt[t] (1 + t)), {t, 0, 1}] + NIntegrate[(Log[1 - t] Log[t])/(Sqrt[t] (1 + t)), {t, 0, 1}]*eps + NIntegrate[( Log[1 - t] Log[t]^2)/(2 Sqrt[t] (1 + t)), {t, 0, 1}]* eps^2 + NIntegrate[( Log[1 - t] Log[t]^3)/( 6 Sqrt[t] (1 + t)), {t, 0, 1}]*eps^3 + NIntegrate[(Log[1 - t] Log[t]^4)/(24 Sqrt[t] (1 + t)), {t, 0, 1}]* eps^4 + NIntegrate[( Log[1 - t] Log[t]^5)/( 120 Sqrt[t] (1 + t)), {t, 0, 1}]*eps^5 which results in Commented Oct 13, 2023 at 18:37
• -0.743138 + 0.426997 eps - 0.281255 eps^2 + 0.189561 eps^3 - 0.127965 eps^4 + 0.08615 eps^5 Commented Oct 13, 2023 at 18:37
• @user64494. This is not different from what I did for NIntegrate in the question. If you see the EDIT2, the problem is with Integrate. Unfortunately I can not check this in newer version. Commented Oct 13, 2023 at 19:17