\(\int (1-6 e^9+9 e^{18}-\log (4)+(2-6 e^9) \log (x)+\log ^2(x)) \, dx\) [6831]

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

Optimal result

Integrand size = 30, antiderivative size = 22 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=-3+x-x \log (4)+x \left (3 e^9-\log (x)\right )^2 \]

[Out]

x-3+x*(3*exp(9)-ln(x))^2-2*x*ln(2)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(55\) vs. \(2(22)=44\).

Time = 0.02 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.50, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2332, 2333} \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=-2 \left (1-3 e^9\right ) x+2 x+x \log ^2(x)+2 \left (1-3 e^9\right ) x \log (x)-2 x \log (x)+x \left (1-6 e^9+9 e^{18}-\log (4)\right ) \]

[In]

Int[1 - 6*E^9 + 9*E^18 - Log[4] + (2 - 6*E^9)*Log[x] + Log[x]^2,x]

[Out]

2*x - 2*(1 - 3*E^9)*x + x*(1 - 6*E^9 + 9*E^18 - Log[4]) - 2*x*Log[x] + 2*(1 - 3*E^9)*x*Log[x] + x*Log[x]^2

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.23 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=x+9 e^{18} x-x \log (4)-6 e^9 x \log (x)+x \log ^2(x) \]

[In]

Integrate[1 - 6*E^9 + 9*E^18 - Log[4] + (2 - 6*E^9)*Log[x] + Log[x]^2,x]

[Out]

x + 9*E^18*x - x*Log[4] - 6*E^9*x*Log[x] + x*Log[x]^2

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.27

method result size
risch \(9 \,{\mathrm e}^{18} x -6 x \,{\mathrm e}^{9} \ln \left (x \right )+x \ln \left (x \right )^{2}-2 x \ln \left (2\right )+x\) \(28\)
norman \(x \ln \left (x \right )^{2}+\left (1+9 \,{\mathrm e}^{18}-2 \ln \left (2\right )\right ) x -6 x \,{\mathrm e}^{9} \ln \left (x \right )\) \(29\)
parallelrisch \(-6 x \,{\mathrm e}^{9} \ln \left (x \right )+x \ln \left (x \right )^{2}+6 x \,{\mathrm e}^{9}+\left (9 \,{\mathrm e}^{18}-6 \,{\mathrm e}^{9}-2 \ln \left (2\right )+1\right ) x\) \(38\)
default \(3 x +x \ln \left (x \right )^{2}-2 x \ln \left (x \right )+\left (-6 \,{\mathrm e}^{9}+2\right ) \left (x \ln \left (x \right )-x \right )+9 \,{\mathrm e}^{18} x -6 x \,{\mathrm e}^{9}-2 x \ln \left (2\right )\) \(48\)
parts \(3 x +x \ln \left (x \right )^{2}-2 x \ln \left (x \right )+\left (-6 \,{\mathrm e}^{9}+2\right ) \left (x \ln \left (x \right )-x \right )+9 \,{\mathrm e}^{18} x -6 x \,{\mathrm e}^{9}-2 x \ln \left (2\right )\) \(48\)

[In]

int(ln(x)^2+(-6*exp(9)+2)*ln(x)-2*ln(2)+9*exp(9)^2-6*exp(9)+1,x,method=_RETURNVERBOSE)

[Out]

9*x*exp(9)^2-6*x*exp(9)*ln(x)+x*ln(x)^2-2*x*ln(2)+x

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.14 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=-6 \, x e^{9} \log \left (x\right ) + x \log \left (x\right )^{2} + 9 \, x e^{18} - 2 \, x \log \left (2\right ) + x \]

[In]

integrate(log(x)^2+(-6*exp(9)+2)*log(x)-2*log(2)+9*exp(9)^2-6*exp(9)+1,x, algorithm="fricas")

[Out]

-6*x*e^9*log(x) + x*log(x)^2 + 9*x*e^18 - 2*x*log(2) + x

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.32 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=x \log {\left (x \right )}^{2} - 6 x e^{9} \log {\left (x \right )} + x \left (- 2 \log {\left (2 \right )} + 1 + 9 e^{18}\right ) \]

[In]

integrate(ln(x)**2+(-6*exp(9)+2)*ln(x)-2*ln(2)+9*exp(9)**2-6*exp(9)+1,x)

[Out]

x*log(x)**2 - 6*x*exp(9)*log(x) + x*(-2*log(2) + 1 + 9*exp(18))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (21) = 42\).

Time = 0.19 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.05 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx={\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x - 2 \, {\left (x \log \left (x\right ) - x\right )} {\left (3 \, e^{9} - 1\right )} + 9 \, x e^{18} - 6 \, x e^{9} - 2 \, x \log \left (2\right ) + x \]

[In]

integrate(log(x)^2+(-6*exp(9)+2)*log(x)-2*log(2)+9*exp(9)^2-6*exp(9)+1,x, algorithm="maxima")

[Out]

(log(x)^2 - 2*log(x) + 2)*x - 2*(x*log(x) - x)*(3*e^9 - 1) + 9*x*e^18 - 6*x*e^9 - 2*x*log(2) + x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (21) = 42\).

Time = 0.28 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.09 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=x \log \left (x\right )^{2} - 2 \, {\left (x \log \left (x\right ) - x\right )} {\left (3 \, e^{9} - 1\right )} + 9 \, x e^{18} - 6 \, x e^{9} - 2 \, x \log \left (2\right ) - 2 \, x \log \left (x\right ) + 3 \, x \]

[In]

integrate(log(x)^2+(-6*exp(9)+2)*log(x)-2*log(2)+9*exp(9)^2-6*exp(9)+1,x, algorithm="giac")

[Out]

x*log(x)^2 - 2*(x*log(x) - x)*(3*e^9 - 1) + 9*x*e^18 - 6*x*e^9 - 2*x*log(2) - 2*x*log(x) + 3*x

Mupad [B] (verification not implemented)

Time = 12.80 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \left (1-6 e^9+9 e^{18}-\log (4)+\left (2-6 e^9\right ) \log (x)+\log ^2(x)\right ) \, dx=x\,\left ({\ln \left (x\right )}^2-6\,{\mathrm {e}}^9\,\ln \left (x\right )+9\,{\mathrm {e}}^{18}-\ln \left (4\right )+1\right ) \]

[In]

int(9*exp(18) - 6*exp(9) - 2*log(2) + log(x)^2 - log(x)*(6*exp(9) - 2) + 1,x)

[Out]

x*(9*exp(18) - log(4) + log(x)^2 - 6*exp(9)*log(x) + 1)