\(\int \frac {2 x+2 x^2+10 x^3+2 x^4+(-2 x+2 x^2) \log (x)+2 x^3 \log (4 x)+(2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)) \log (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x})}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx\) [1925]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 117, antiderivative size = 18 \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=\left (x+\log \left (4+x+\frac {\log (x)}{x}+\log (4 x)\right )\right )^2 \]

[Out]

(x+ln(x+ln(4*x)+4+ln(x)/x))^2

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.026, Rules used = {6820, 12, 6818} \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=\left (x+\log \left (x+\log (4 x)+\frac {\log (x)}{x}+4\right )\right )^2 \]

[In]

Int[(2*x + 2*x^2 + 10*x^3 + 2*x^4 + (-2*x + 2*x^2)*Log[x] + 2*x^3*Log[4*x] + (2 + 2*x + 10*x^2 + 2*x^3 + (-2 +
 2*x)*Log[x] + 2*x^2*Log[4*x])*Log[(4*x + x^2 + Log[x] + x*Log[4*x])/x])/(4*x^2 + x^3 + x*Log[x] + x^2*Log[4*x
]),x]

[Out]

(x + Log[4 + x + Log[x]/x + Log[4*x]])^2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6818

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*(y^(m + 1)/(m + 1)), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {2 \left (1+x+5 x^2+x^3+(-1+x) \log (x)+x^2 \log (4 x)\right ) \left (x+\log \left (4+x+\frac {\log (x)}{x}+\log (4 x)\right )\right )}{x (\log (x)+x (4+x+\log (4 x)))} \, dx \\ & = 2 \int \frac {\left (1+x+5 x^2+x^3+(-1+x) \log (x)+x^2 \log (4 x)\right ) \left (x+\log \left (4+x+\frac {\log (x)}{x}+\log (4 x)\right )\right )}{x (\log (x)+x (4+x+\log (4 x)))} \, dx \\ & = \left (x+\log \left (4+x+\frac {\log (x)}{x}+\log (4 x)\right )\right )^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=\left (x+\log \left (4+x+\frac {\log (x)}{x}+\log (4 x)\right )\right )^2 \]

[In]

Integrate[(2*x + 2*x^2 + 10*x^3 + 2*x^4 + (-2*x + 2*x^2)*Log[x] + 2*x^3*Log[4*x] + (2 + 2*x + 10*x^2 + 2*x^3 +
 (-2 + 2*x)*Log[x] + 2*x^2*Log[4*x])*Log[(4*x + x^2 + Log[x] + x*Log[4*x])/x])/(4*x^2 + x^3 + x*Log[x] + x^2*L
og[4*x]),x]

[Out]

(x + Log[4 + x + Log[x]/x + Log[4*x]])^2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(93\) vs. \(2(18)=36\).

Time = 10.86 (sec) , antiderivative size = 94, normalized size of antiderivative = 5.22

method result size
parallelrisch \(x^{2}+2 \ln \left (\frac {x \ln \left (4 x \right )+\ln \left (x \right )+x^{2}+4 x}{x}\right ) x +\ln \left (\frac {x \ln \left (4 x \right )+\ln \left (x \right )+x^{2}+4 x}{x}\right )^{2}+8 \ln \left (x \ln \left (4 x \right )+\ln \left (x \right )+x^{2}+4 x \right )-8 \ln \left (x \right )-8 \ln \left (\frac {x \ln \left (4 x \right )+\ln \left (x \right )+x^{2}+4 x}{x}\right )\) \(94\)

[In]

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

[Out]

x^2+2*ln((x*ln(4*x)+ln(x)+x^2+4*x)/x)*x+ln((x*ln(4*x)+ln(x)+x^2+4*x)/x)^2+8*ln(x*ln(4*x)+ln(x)+x^2+4*x)-8*ln(x
)-8*ln((x*ln(4*x)+ln(x)+x^2+4*x)/x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (18) = 36\).

Time = 0.26 (sec) , antiderivative size = 55, normalized size of antiderivative = 3.06 \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=x^{2} + 2 \, x \log \left (\frac {x^{2} + 2 \, x \log \left (2\right ) + {\left (x + 1\right )} \log \left (x\right ) + 4 \, x}{x}\right ) + \log \left (\frac {x^{2} + 2 \, x \log \left (2\right ) + {\left (x + 1\right )} \log \left (x\right ) + 4 \, x}{x}\right )^{2} \]

[In]

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

[Out]

x^2 + 2*x*log((x^2 + 2*x*log(2) + (x + 1)*log(x) + 4*x)/x) + log((x^2 + 2*x*log(2) + (x + 1)*log(x) + 4*x)/x)^
2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (17) = 34\).

Time = 0.23 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.83 \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=x^{2} + 2 x \log {\left (\frac {x^{2} + x \left (\log {\left (x \right )} + \log {\left (4 \right )}\right ) + 4 x + \log {\left (x \right )}}{x} \right )} + \log {\left (\frac {x^{2} + x \left (\log {\left (x \right )} + \log {\left (4 \right )}\right ) + 4 x + \log {\left (x \right )}}{x} \right )}^{2} \]

[In]

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

[Out]

x**2 + 2*x*log((x**2 + x*(log(x) + log(4)) + 4*x + log(x))/x) + log((x**2 + x*(log(x) + log(4)) + 4*x + log(x)
)/x)**2

Maxima [F]

\[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=\int { \frac {2 \, {\left (x^{4} + x^{3} \log \left (4 \, x\right ) + 5 \, x^{3} + x^{2} + {\left (x^{2} - x\right )} \log \left (x\right ) + {\left (x^{3} + x^{2} \log \left (4 \, x\right ) + 5 \, x^{2} + {\left (x - 1\right )} \log \left (x\right ) + x + 1\right )} \log \left (\frac {x^{2} + x \log \left (4 \, x\right ) + 4 \, x + \log \left (x\right )}{x}\right ) + x\right )}}{x^{3} + x^{2} \log \left (4 \, x\right ) + 4 \, x^{2} + x \log \left (x\right )} \,d x } \]

[In]

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

[Out]

2*integrate((x^4 + x^3*log(4*x) + 5*x^3 + x^2 + (x^2 - x)*log(x) + (x^3 + x^2*log(4*x) + 5*x^2 + (x - 1)*log(x
) + x + 1)*log((x^2 + x*log(4*x) + 4*x + log(x))/x) + x)/(x^3 + x^2*log(4*x) + 4*x^2 + x*log(x)), x)

Giac [F]

\[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx=\int { \frac {2 \, {\left (x^{4} + x^{3} \log \left (4 \, x\right ) + 5 \, x^{3} + x^{2} + {\left (x^{2} - x\right )} \log \left (x\right ) + {\left (x^{3} + x^{2} \log \left (4 \, x\right ) + 5 \, x^{2} + {\left (x - 1\right )} \log \left (x\right ) + x + 1\right )} \log \left (\frac {x^{2} + x \log \left (4 \, x\right ) + 4 \, x + \log \left (x\right )}{x}\right ) + x\right )}}{x^{3} + x^{2} \log \left (4 \, x\right ) + 4 \, x^{2} + x \log \left (x\right )} \,d x } \]

[In]

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

[Out]

integrate(2*(x^4 + x^3*log(4*x) + 5*x^3 + x^2 + (x^2 - x)*log(x) + (x^3 + x^2*log(4*x) + 5*x^2 + (x - 1)*log(x
) + x + 1)*log((x^2 + x*log(4*x) + 4*x + log(x))/x) + x)/(x^3 + x^2*log(4*x) + 4*x^2 + x*log(x)), x)

Mupad [B] (verification not implemented)

Time = 11.88 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.33 \[ \int \frac {2 x+2 x^2+10 x^3+2 x^4+\left (-2 x+2 x^2\right ) \log (x)+2 x^3 \log (4 x)+\left (2+2 x+10 x^2+2 x^3+(-2+2 x) \log (x)+2 x^2 \log (4 x)\right ) \log \left (\frac {4 x+x^2+\log (x)+x \log (4 x)}{x}\right )}{4 x^2+x^3+x \log (x)+x^2 \log (4 x)} \, dx={\left (x+\ln \left (\frac {4\,x+\ln \left (x\right )+x\,\ln \left (4\,x\right )+x^2}{x}\right )\right )}^2 \]

[In]

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

[Out]

(x + log((4*x + log(x) + x*log(4*x) + x^2)/x))^2