3
$\begingroup$

When I try to integrate this $\int_0^{1} \frac{\log ^2(x+1) \log ^2(1-x)}{x} \, dx$, it leads to 0.

And when I use NIntegrate, it turns into a positive number, which seems to be right. the figure shows the function is non-negative

The codes are shown below.

Clear["Global`*"];
Plot[Log[1 + x]^2 Log[1 - x]^2/x, {x, 0, 1}]
Integrate[Log[1 + x]^2 Log[1 - x]^2/x, {x, 0, 1}]
NIntegrate[Log[1 + x]^2 Log[1 - x]^2/x, {x, 0, 1}]
$\endgroup$
8
  • $\begingroup$ Setting $x=0$ and $x=1$ gives Indeterminate and Infinity. In v12.3.1 it doesn't return zero - it can't work out the integral. $\endgroup$
    – flinty
    Sep 14, 2021 at 12:18
  • $\begingroup$ Rubi and Maple 2021 fail with it, returning the input. $\endgroup$
    – user64494
    Sep 14, 2021 at 13:24
  • $\begingroup$ @flinty - with v12.3.1 on my Mac I get zero for Integrate (after a long wait). $\endgroup$
    – Bob Hanlon
    Sep 14, 2021 at 13:40
  • $\begingroup$ Confirm it in 12.3.1 on Windows 10 Pro. $\endgroup$
    – user64494
    Sep 14, 2021 at 13:43
  • $\begingroup$ One can obtain an analytical expression for this integral thrugh Integrate[Log[1 + x]^2 *x^k/x, {x, 0, 1}, Assumptions -> k \[Element] PositiveIntegers] which results in (1/(6 k))(-1)^-k (6 EulerGamma^2 + \[Pi]^2 - 24 k HypergeometricPFQ[{1, 1, 1, 1 - k}, {2, 2, 2}, 2] - 6 Log[2]^2 + 6 (-1)^k Log[2]^2 + 6 k HypergeometricPFQ[{1, 1, 1 - k}, {2, 2}, 2] Log[16] + 12 EulerGamma PolyGamma[0, 1 + k] + 6 PolyGamma[0, 1 + k]^2 - 6 PolyGamma[1, 1 + k]). $\endgroup$
    – user64494
    Sep 14, 2021 at 13:45

1 Answer 1

2
$\begingroup$

I cannot answer why, but I can provide an analytical solution with MA. We have

$$\int_0^1 \frac{\log ^2(1-x) \log ^2(x+1)}{x} \, dx= \frac{1}{12} \int_0^1 \frac{\log ^4\left(1-x^2\right)}{x} \, dx +\frac{1}{12} \int_0^1 \frac{\log ^4\left(\frac{1-x}{x+1}\right)}{x} \, dx -\frac{1}{6} \int_0^1 \frac{\log ^4(1-x)}{x} \, dx -\frac{1}{6} \int_0^1 \frac{\log ^4(x+1)}{x} \, dx.$$

Each of them can be correctly computed with MA

i1 = 1/12 Integrate[Log[1 - x^2]^4/x, {x, 0, 1}]
(*Zeta[5]*)
i2 = 1/12 Integrate[Log[(1 - x)/(1 + x)]^4/x, {x, 0, 1}]
(*(31 Zeta[5])/8*)
i3 = -1/6 Integrate[Log[1 - x]^4/x, {x, 0, 1}]
(*-4 Zeta[5]*)
i4 = -1/6 Integrate[Log[1 + x]^4/x, {x, 0, 1}]
(*1/6 (-(2/3) \[Pi]^2 Log[2]^3 + (4 Log[2]^5)/5 + 21/2 Log[2]^2 Zeta[3] +
   24 (Log[2] PolyLog[4, 1/2] + PolyLog[5, 1/2] - Zeta[5]))*)

Combining together we obtain

i = i1 + i2 + i3 + i4

$$4 \text{Li}_5\left(\frac{1}{2}\right)+\text{Li}_4\left(\frac{1}{2}\right) \log (16)-\frac{25 \zeta (5)}{8}+\frac{7}{4} \zeta (3) \log ^2(2)+\frac{2 \log ^5(2)}{15}-\frac{1}{9} \pi ^2 \log ^3(2).$$

$\endgroup$
9
  • $\begingroup$ Could you ground that the integral under consideration equals i1+i2+i3+i4 in order to complete your answer? TIA. $\endgroup$
    – user64494
    Sep 14, 2021 at 21:38
  • $\begingroup$ @user64494 Does FullSimplify[Log[1 - x^2]^4/(12 x) + Log[(1 - x)/(x + 1)]^4/(12 x) - Log[1 - x]^4/(6 x) - Log[1 + x]^4/(6 x), Assumptions -> 0 < x < 1] which results in (Log[1 - x]^2 Log[1 + x]^2)/x provide the desired justification? $\endgroup$
    – JimB
    Sep 14, 2021 at 21:53
  • $\begingroup$ @JimB: Yes. Thank you. $\endgroup$
    – user64494
    Sep 14, 2021 at 22:00
  • $\begingroup$ BTW, now Integrate[Log[1 + x]^2 Log[1 - x]^2/x, {x, 0, 1}] returns the input. $\endgroup$
    – user64494
    Sep 14, 2021 at 22:03
  • 1
    $\begingroup$ @SHBookP You would do such a separation when solving the integral manually. The four integrals are easier to compute. It seems to be easier to MA as well. Concerning your second question, how they can be actually computed. These are popular integral types often discussed in math.stackexchange.com. Have a look at the solutions of simpler integral math.stackexchange.com/q/795867/435814 . If you ar interested in the manual solution, post your question there, you'll get the answer quick. For MA--post another question here. $\endgroup$
    – yarchik
    Sep 23, 2021 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.