\(\int x^2 \log (-1+4 x+4 \sqrt {(-1+x) x}) \, dx\) [102]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 149 \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=-\frac {x}{384}+\frac {x^2}{96}-\frac {x^3}{18}-\frac {85}{384} \sqrt {-x+x^2}+\frac {5}{64} (1-2 x) \sqrt {-x+x^2}-\frac {1}{18} \left (-x+x^2\right )^{3/2}-\frac {\text {arctanh}\left (\frac {1-10 x}{6 \sqrt {-x+x^2}}\right )}{3072}-\frac {223 \text {arctanh}\left (\frac {x}{\sqrt {-x+x^2}}\right )}{1536}+\frac {\log (1+8 x)}{3072}+\frac {1}{3} x^3 \log \left (-1+4 x+4 \sqrt {-x+x^2}\right ) \] Output:

-1/384*x+1/96*x^2-1/18*x^3-85/384*(x^2-x)^(1/2)+5/64*(1-2*x)*(x^2-x)^(1/2) 
-1/18*(x^2-x)^(3/2)-1/3072*arctanh(1/6*(1-10*x)/(x^2-x)^(1/2))-223/1536*ar 
ctanh(x/(x^2-x)^(1/2))+1/3072*ln(1+8*x)+1/3*x^3*ln(-1+4*x+4*(x^2-x)^(1/2))
 

Mathematica [A] (warning: unable to verify)

Time = 0.87 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.56 \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=-\frac {24 \sqrt {1-x} x^{3/2}-96 \sqrt {1-x} x^{5/2}+512 \sqrt {1-x} x^{7/2}+928 \sqrt {1-x} x^{3/2} \sqrt {(-1+x) x}+512 \sqrt {1-x} x^{5/2} \sqrt {(-1+x) x}+1320 \sqrt {-(-1+x)^2 x^2}+1338 \sqrt {(-1+x) x} \arcsin \left (\sqrt {1-x}\right )+3 \sqrt {-((-1+x) x)} \text {arctanh}\left (\frac {1-10 x}{6 \sqrt {(-1+x) x}}\right )-3 \sqrt {-((-1+x) x)} \log (1+8 x)-3072 \sqrt {1-x} x^{7/2} \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right )}{9216 \sqrt {-((-1+x) x)}} \] Input:

Integrate[x^2*Log[-1 + 4*x + 4*Sqrt[(-1 + x)*x]],x]
 

Output:

-1/9216*(24*Sqrt[1 - x]*x^(3/2) - 96*Sqrt[1 - x]*x^(5/2) + 512*Sqrt[1 - x] 
*x^(7/2) + 928*Sqrt[1 - x]*x^(3/2)*Sqrt[(-1 + x)*x] + 512*Sqrt[1 - x]*x^(5 
/2)*Sqrt[(-1 + x)*x] + 1320*Sqrt[-((-1 + x)^2*x^2)] + 1338*Sqrt[(-1 + x)*x 
]*ArcSin[Sqrt[1 - x]] + 3*Sqrt[-((-1 + x)*x)]*ArcTanh[(1 - 10*x)/(6*Sqrt[( 
-1 + x)*x])] - 3*Sqrt[-((-1 + x)*x)]*Log[1 + 8*x] - 3072*Sqrt[1 - x]*x^(7/ 
2)*Log[-1 + 4*x + 4*Sqrt[(-1 + x)*x]])/Sqrt[-((-1 + x)*x)]
 

Rubi [A] (verified)

Time = 0.58 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3017, 3015, 27, 7293, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \log \left (4 x+4 \sqrt {(x-1) x}-1\right ) \, dx\)

\(\Big \downarrow \) 3017

\(\displaystyle \int x^2 \log \left (4 \sqrt {x^2-x}+4 x-1\right )dx\)

\(\Big \downarrow \) 3015

\(\displaystyle \frac {8}{3} \int -\frac {x^3}{4 \left (\sqrt {x^2-x} (2 x+1)+2 \left (x-x^2\right )\right )}dx+\frac {1}{3} x^3 \log \left (4 \sqrt {x^2-x}+4 x-1\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{3} x^3 \log \left (4 \sqrt {x^2-x}+4 x-1\right )-\frac {2}{3} \int \frac {x^3}{\sqrt {x^2-x} (2 x+1)+2 \left (x-x^2\right )}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {1}{3} x^3 \log \left (4 \sqrt {x^2-x}+4 x-1\right )-\frac {2}{3} \int \left (\frac {x^2}{4}+\frac {1}{4} \sqrt {x^2-x} x+\frac {x}{3 \sqrt {x^2-x}}-\frac {x}{32}+\frac {\sqrt {x^2-x}}{96 (-8 x-1)}+\frac {11 \sqrt {x^2-x}}{32}-\frac {1}{256 (8 x+1)}+\frac {1}{256}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{3} x^3 \log \left (4 \sqrt {x^2-x}+4 x-1\right )-\frac {2}{3} \left (\frac {\text {arctanh}\left (\frac {1-10 x}{6 \sqrt {x^2-x}}\right )}{2048}+\frac {223 \text {arctanh}\left (\frac {x}{\sqrt {x^2-x}}\right )}{1024}+\frac {x^3}{12}-\frac {x^2}{64}+\frac {1}{12} \left (x^2-x\right )^{3/2}-\frac {15}{128} (1-2 x) \sqrt {x^2-x}+\frac {85 \sqrt {x^2-x}}{256}+\frac {x}{256}-\frac {\log (8 x+1)}{2048}\right )\)

Input:

Int[x^2*Log[-1 + 4*x + 4*Sqrt[(-1 + x)*x]],x]
 

Output:

(-2*(x/256 - x^2/64 + x^3/12 + (85*Sqrt[-x + x^2])/256 - (15*(1 - 2*x)*Sqr 
t[-x + x^2])/128 + (-x + x^2)^(3/2)/12 + ArcTanh[(1 - 10*x)/(6*Sqrt[-x + x 
^2])]/2048 + (223*ArcTanh[x/Sqrt[-x + x^2]])/1024 - Log[1 + 8*x]/2048))/3 
+ (x^3*Log[-1 + 4*x + 4*Sqrt[-x + x^2]])/3
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3015
Int[Log[(d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]] 
*((g_.)*(x_))^(m_.), x_Symbol] :> Simp[(g*x)^(m + 1)*(Log[d + e*x + f*Sqrt[ 
a + b*x + c*x^2]]/(g*(m + 1))), x] + Simp[f^2*((b^2 - 4*a*c)/(2*g*(m + 1))) 
   Int[(g*x)^(m + 1)/((2*d*e - b*f^2)*(a + b*x + c*x^2) - f*(b*d - 2*a*e + 
(2*c*d - b*e)*x)*Sqrt[a + b*x + c*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, 
 g, m}, x] && EqQ[e^2 - c*f^2, 0] && NeQ[m, -1] && IntegerQ[2*m]
 

rule 3017
Int[Log[(d_.) + (f_.)*Sqrt[u_] + (e_.)*(x_)]*(v_.), x_Symbol] :> Int[v*Log[ 
d + e*x + f*Sqrt[ExpandToSum[u, x]]], x] /; FreeQ[{d, e, f}, x] && Quadrati 
cQ[u, x] &&  !QuadraticMatchQ[u, x] && (EqQ[v, 1] || MatchQ[v, ((g_.)*x)^(m 
_.) /; FreeQ[{g, m}, x]])
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.29

method result size
parts \(\frac {x^{3} \ln \left (-1+4 x +4 \sqrt {x \left (x -1\right )}\right )}{3}-\frac {451 \ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x}\right )}{6144}-\frac {25 \sqrt {x^{2}-x}}{256}-\frac {5 x \sqrt {x^{2}-x}}{64}-\frac {\operatorname {arctanh}\left (\frac {\frac {4}{3}-\frac {40 x}{3}}{\sqrt {64 \left (x +\frac {1}{8}\right )^{2}-80 x -1}}\right )}{3072}-\frac {x^{3} \sqrt {x^{2}-x}}{6}-\frac {x^{3}}{18}+\frac {x^{2}}{96}-\frac {x}{384}+\frac {\ln \left (1+8 x \right )}{3072}+\frac {17 \left (2 x -1\right ) \sqrt {x^{2}-x}}{384}+\frac {\left (x^{2}-x \right )^{\frac {3}{2}}}{9}+\frac {x \left (x^{2}-x \right )^{\frac {3}{2}}}{6}-\frac {\sqrt {64 \left (x +\frac {1}{8}\right )^{2}-80 x -1}}{6144}+\frac {5 \ln \left (-\frac {1}{2}+x +\sqrt {\left (x +\frac {1}{8}\right )^{2}-\frac {5 x}{4}-\frac {1}{64}}\right )}{6144}\) \(192\)

Input:

int(x^2*ln(-1+4*x+4*(x*(x-1))^(1/2)),x,method=_RETURNVERBOSE)
 

Output:

1/3*x^3*ln(-1+4*x+4*(x*(x-1))^(1/2))-451/6144*ln(-1/2+x+(x^2-x)^(1/2))-25/ 
256*(x^2-x)^(1/2)-5/64*x*(x^2-x)^(1/2)-1/3072*arctanh(32/3*(1/8-5/4*x)/(64 
*(x+1/8)^2-80*x-1)^(1/2))-1/6*x^3*(x^2-x)^(1/2)-1/18*x^3+1/96*x^2-1/384*x+ 
1/3072*ln(1+8*x)+17/384*(2*x-1)*(x^2-x)^(1/2)+1/9*(x^2-x)^(3/2)+1/6*x*(x^2 
-x)^(3/2)-1/6144*(64*(x+1/8)^2-80*x-1)^(1/2)+5/6144*ln(-1/2+x+((x+1/8)^2-5 
/4*x-1/64)^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.83 \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=-\frac {1}{18} \, x^{3} + \frac {1}{96} \, x^{2} + \frac {1}{3} \, {\left (x^{3} + 1\right )} \log \left (4 \, x + 4 \, \sqrt {x^{2} - x} - 1\right ) - \frac {1}{1152} \, {\left (64 \, x^{2} + 116 \, x + 165\right )} \sqrt {x^{2} - x} - \frac {1}{384} \, x - \frac {511}{3072} \, \log \left (8 \, x + 1\right ) + \frac {245}{1024} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} - x} + 1\right ) - \frac {511}{3072} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} - x} - 1\right ) + \frac {511}{3072} \, \log \left (-4 \, x + 4 \, \sqrt {x^{2} - x} + 1\right ) \] Input:

integrate(x^2*log(-1+4*x+4*((x-1)*x)^(1/2)),x, algorithm="fricas")
 

Output:

-1/18*x^3 + 1/96*x^2 + 1/3*(x^3 + 1)*log(4*x + 4*sqrt(x^2 - x) - 1) - 1/11 
52*(64*x^2 + 116*x + 165)*sqrt(x^2 - x) - 1/384*x - 511/3072*log(8*x + 1) 
+ 245/1024*log(-2*x + 2*sqrt(x^2 - x) + 1) - 511/3072*log(-2*x + 2*sqrt(x^ 
2 - x) - 1) + 511/3072*log(-4*x + 4*sqrt(x^2 - x) + 1)
 

Sympy [F]

\[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=\int x^{2} \log {\left (4 x + 4 \sqrt {x^{2} - x} - 1 \right )}\, dx \] Input:

integrate(x**2*ln(-1+4*x+4*((x-1)*x)**(1/2)),x)
 

Output:

Integral(x**2*log(4*x + 4*sqrt(x**2 - x) - 1), x)
 

Maxima [F]

\[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=\int { x^{2} \log \left (4 \, x + 4 \, \sqrt {{\left (x - 1\right )} x} - 1\right ) \,d x } \] Input:

integrate(x^2*log(-1+4*x+4*((x-1)*x)^(1/2)),x, algorithm="maxima")
 

Output:

integrate(x^2*log(4*x + 4*sqrt((x - 1)*x) - 1), x)
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.83 \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=\frac {1}{3} \, x^{3} \log \left (4 \, x + 4 \, \sqrt {{\left (x - 1\right )} x} - 1\right ) - \frac {1}{18} \, x^{3} + \frac {1}{96} \, x^{2} - \frac {1}{1152} \, {\left (4 \, {\left (16 \, x + 29\right )} x + 165\right )} \sqrt {x^{2} - x} - \frac {1}{384} \, x + \frac {1}{3072} \, \log \left ({\left | 8 \, x + 1 \right |}\right ) + \frac {223}{3072} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x} + 1 \right |}\right ) + \frac {1}{3072} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x} - 1 \right |}\right ) - \frac {1}{3072} \, \log \left ({\left | -4 \, x + 4 \, \sqrt {x^{2} - x} + 1 \right |}\right ) \] Input:

integrate(x^2*log(-1+4*x+4*((x-1)*x)^(1/2)),x, algorithm="giac")
 

Output:

1/3*x^3*log(4*x + 4*sqrt((x - 1)*x) - 1) - 1/18*x^3 + 1/96*x^2 - 1/1152*(4 
*(16*x + 29)*x + 165)*sqrt(x^2 - x) - 1/384*x + 1/3072*log(abs(8*x + 1)) + 
 223/3072*log(abs(-2*x + 2*sqrt(x^2 - x) + 1)) + 1/3072*log(abs(-2*x + 2*s 
qrt(x^2 - x) - 1)) - 1/3072*log(abs(-4*x + 4*sqrt(x^2 - x) + 1))
 

Mupad [F(-1)]

Timed out. \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=\int x^2\,\ln \left (4\,x+4\,\sqrt {x\,\left (x-1\right )}-1\right ) \,d x \] Input:

int(x^2*log(4*x + 4*(x*(x - 1))^(1/2) - 1),x)
 

Output:

int(x^2*log(4*x + 4*(x*(x - 1))^(1/2) - 1), x)
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.59 \[ \int x^2 \log \left (-1+4 x+4 \sqrt {(-1+x) x}\right ) \, dx=-\frac {\sqrt {x}\, \sqrt {x -1}\, x^{2}}{18}-\frac {29 \sqrt {x}\, \sqrt {x -1}\, x}{288}-\frac {55 \sqrt {x}\, \sqrt {x -1}}{384}-\frac {7 \,\mathrm {log}\left (\sqrt {x -1}+\sqrt {x}\right )}{48}+\frac {\mathrm {log}\left (4 \sqrt {x}\, \sqrt {x -1}+4 x -1\right ) x^{3}}{3}+\frac {\mathrm {log}\left (4 \sqrt {x}\, \sqrt {x -1}+4 x -1\right )}{1536}-\frac {x^{3}}{18}+\frac {x^{2}}{96}-\frac {x}{384}+\frac {17}{1152} \] Input:

int(x^2*log(-1+4*x+4*(x*(x-1))^(1/2)),x)
 

Output:

( - 256*sqrt(x)*sqrt(x - 1)*x**2 - 464*sqrt(x)*sqrt(x - 1)*x - 660*sqrt(x) 
*sqrt(x - 1) - 672*log(sqrt(x - 1) + sqrt(x)) + 1536*log(4*sqrt(x)*sqrt(x 
- 1) + 4*x - 1)*x**3 + 3*log(4*sqrt(x)*sqrt(x - 1) + 4*x - 1) - 256*x**3 + 
 48*x**2 - 12*x + 68)/4608