Compute in closed form without using series: $$I =\int_0^{\pi / 4}\frac{x\tan^2 x\ln\left(\tan x\right)}{\cos^2 x}dx$$

I thought of using: $y=\tan x$ then $dy=\frac{1}{\cos^2 x}$, so : $$I =\int_0^{1} \arctan x\ln\left(x\right)x^{2}dx$$

But I find integration arctan.

Please give me ideas to approach it.


Start by doing integration by parts:$$\sf I=\color{chocolate}{\int_0^1 x^2\arctan x\ln xdx}=\color{blue}{-\frac13\int_0^1 \frac{x^3 \ln x}{1+x^2}dx}\color{purple}{-\frac13\int_0^1 x^2\arctan xdx}$$ For the first one, we will use long division and integrate by parts the second integral: $$\sf I=\color{blue}{-\frac13 \int_0^1 x\ln xdx+\frac13\int_0^1\frac{x\ln x}{1+x^2}dx}\color{purple}{-\frac{\pi}{36}+\frac19\int_0^1\left(x-\frac{x}{1+x^2}\right) dx}$$ Another integration by parts for the blue one's leads to: $$\sf I=\color{blue}{\frac1{12} -\frac16\int_0^1\frac{\ln(1+x^2)}{x}dx}\color{purple}{-\frac{\pi}{36}+\frac1{18}-\frac{\ln 2}{18}}$$ $$\sf =\color{chocolate}{\frac5{36}-\frac{\pi}{36}-\frac{\ln 2}{18}-\frac1{12}\underbrace{\int_0^1\frac{\ln(1+t)}{t}dt}_{x^2=t}=\boxed{\frac5{36}-\frac{\pi}{36}-\frac{\ln 2}{18}-\frac{\pi^2}{144}}}$$ Here one can find a proof that the last remain integral equals $\sf \frac{\pi^2}{12}$.

  • $\begingroup$ Perform the change of variable $y=x^2$ directly on $\int_0^1 \frac{x^3 \ln x}{1+x^2}dx$ $\endgroup$ – FDP May 2 at 7:51

Partial integration, the factor $x^2\arctan x$ has a primitive function, that leads to the solution. So for short, let $$ F(x) = \frac 13x^3\arctan x -\frac 16x^2+\frac 16\log(1+x^2)\ , \qquad F'(x)=x^2\arctan x\ . $$ Then $$ \begin{aligned} I &= \int_0^{\pi / 4}\frac{x\; \tan^2 x\; \ln\tan x}{\cos^2 x}\,dx \\ &= \int_0^1 x^2\; \arctan x \; \ln x\,dx \\ &= \int_0^1 F'(x) \; \ln x\,dx \\ &= \lim_{a\searrow 0}\int_a^1 F'(x) \; \ln x\,dx \\ &= \lim_{a\searrow 0}\Big[\ F(x)\; \ln x\ \Big]_a^1 - \lim_{a\searrow 0}\int_a^1 F(x) \; \frac 1x\,dx \\ &= 0-\underbrace{\lim_{a\searrow 0}\frac 16\ln(1+a^2)\ln a}_{=0\text{ e.g. l'Hospital for }\frac{\ln(1+a^2)}{1/\ln a}} \\ &\qquad- \lim_{a\searrow 0}\int_a^1 \left( \frac 13x^2\arctan x -\frac 16x+\frac 16\ln(1+x^2)\;\frac 1x \right) \,dx \\ &= \lim_{a\searrow 0} \int_a^1 \frac 16\frac {\log(1+x^2)}x\; dx -\frac 13\Big[\ F\ \Big]_0^1 -\frac 16\Big[\ \frac 12x^2\ \Big]_0^1 \\ &= \frac 16\int_0^1\frac {\log(1+x^2)}x\; dx -\frac 13F(1)+\frac 1{12}\ . \\ &= \frac 16\cdot\frac 12\cdot\frac {\pi^2}{12} -\frac 13F(1)+\frac 1{12}\ . \end{aligned} $$ The remained integral is after the substitution $y=x^2$ traced back to a dilogarithm value, $$ J= \int_0^1\frac {\log(1+x^2)}x\; dx = \frac 12\int_0^1\frac {\log(1+x^2)}{x^2}\; d(x^2) = \frac 12\int_0^1\frac {\log(1+y)}{y}\; dy = -\frac 12\int_0^{-1}\frac {\log(1-y)}{y}\; dy =:-\frac 12\operatorname{dilog}(-1) =\frac 12\cdot\frac{\pi^2}{12}\ . $$

Computer check, here sage:

sage: f = lambda x: x * tan(x)^2 * log(tan(x)) / cos(x)^2
sage: g = lambda x: x^2 * arctan(x) * log(x)
sage: F(x) = integral( x^2*arctan(x), x )

sage: numerical_integral( f, (0, pi/4) )[0]

sage: numerical_integral( g, (0, 1) )[0]

sage: F(x)
1/3*x^3*arctan(x) - 1/6*x^2 + 1/6*log(x^2 + 1)
sage: F(1)
1/12*pi + 1/6*log(2) - 1/6
sage: -pi^2/6/2/12 - F(1)/3 + 1/12
-1/36*pi - 1/144*pi^2 - 1/18*log(2) + 5/36
sage: _.n()

sage: integral( log(1+x^2)/x, x, 0, 1 ).n()
sage: dilog(-1)
sage: -1/2*dilog(-1).n()

Thanks a lot for the help Zacky!

  • $\begingroup$ Maybe the issue is on the very last rows. After IBP we get: $$I=\underbrace{\left(\frac 13x^3\arctan x -\frac 16x^2+\frac 16\log(1+x^2)\right)\ln x\bigg|_0^1}_{=0}-\int_0^1 \left(\frac 13x^2\arctan x -\frac 16x+\frac 16\log(1+x^2)\;\frac 1x\right) dx$$ $$=\frac1{12} -\frac13 \int_0^1 x^2\arctan xdx -\frac16 \int_0^1 \frac{\ln(1+x^2)}{x}dx$$ Now I don't see how that logarithm integral disappeared. $\endgroup$ – Zacky May 1 at 1:35
  • $\begingroup$ Yes, thanks, this was the missing term. $\endgroup$ – dan_fulea May 1 at 2:29

Your Answer

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