\(\int (32-32 x+24 x^2+e^x (36+27 x^2+9 x^3)+(32-32 x+e^x (36-36 x-18 x^2)) \log (x^2)+(8+e^x (9+9 x)) \log ^2(x^2)) \, dx\) [7458]

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

Optimal result

Integrand size = 68, antiderivative size = 23 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=\left (8 x+9 e^x x\right ) \left (4+\left (x-\log \left (x^2\right )\right )^2\right ) \]

[Out]

(8*x+9*exp(x)*x)*(4+(-ln(x^2)+x)^2)

Rubi [F]

\[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=\int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx \]

[In]

Int[32 - 32*x + 24*x^2 + E^x*(36 + 27*x^2 + 9*x^3) + (32 - 32*x + E^x*(36 - 36*x - 18*x^2))*Log[x^2] + (8 + E^
x*(9 + 9*x))*Log[x^2]^2,x]

[Out]

16*(2 - x)^2 + 96*x + 36*E^x*x - 16*x^2 + 8*x^3 + 9*E^x*x^3 - 72*ExpIntegralEi[x] + 36*E^x*Log[x^2] - 16*x^2*L
og[x^2] - 18*E^x*x^2*Log[x^2] + 8*x*Log[x^2]^2 + 9*Defer[Int][E^x*Log[x^2]^2, x] + 9*Defer[Int][E^x*x*Log[x^2]
^2, x]

Rubi steps \begin{align*} \text {integral}& = 32 x-16 x^2+8 x^3+\int e^x \left (36+27 x^2+9 x^3\right ) \, dx+\int \left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right ) \, dx+\int \left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right ) \, dx \\ & = 32 x-16 x^2+8 x^3+36 e^x \log \left (x^2\right )+32 x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+\int \left (36 e^x+27 e^x x^2+9 e^x x^3\right ) \, dx-\int \left (-32 (-2+x)-\frac {36 e^x \left (-2+x^2\right )}{x}\right ) \, dx+\int \left (8 \log ^2\left (x^2\right )+9 e^x (1+x) \log ^2\left (x^2\right )\right ) \, dx \\ & = 16 (2-x)^2+32 x-16 x^2+8 x^3+36 e^x \log \left (x^2\right )+32 x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+8 \int \log ^2\left (x^2\right ) \, dx+9 \int e^x x^3 \, dx+9 \int e^x (1+x) \log ^2\left (x^2\right ) \, dx+27 \int e^x x^2 \, dx+36 \int e^x \, dx+36 \int \frac {e^x \left (-2+x^2\right )}{x} \, dx \\ & = 36 e^x+16 (2-x)^2+32 x-16 x^2+27 e^x x^2+8 x^3+9 e^x x^3+36 e^x \log \left (x^2\right )+32 x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+8 x \log ^2\left (x^2\right )+9 \int \left (e^x \log ^2\left (x^2\right )+e^x x \log ^2\left (x^2\right )\right ) \, dx-27 \int e^x x^2 \, dx-32 \int \log \left (x^2\right ) \, dx+36 \int \left (-\frac {2 e^x}{x}+e^x x\right ) \, dx-54 \int e^x x \, dx \\ & = 36 e^x+16 (2-x)^2+96 x-54 e^x x-16 x^2+8 x^3+9 e^x x^3+36 e^x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+8 x \log ^2\left (x^2\right )+9 \int e^x \log ^2\left (x^2\right ) \, dx+9 \int e^x x \log ^2\left (x^2\right ) \, dx+36 \int e^x x \, dx+54 \int e^x \, dx+54 \int e^x x \, dx-72 \int \frac {e^x}{x} \, dx \\ & = 90 e^x+16 (2-x)^2+96 x+36 e^x x-16 x^2+8 x^3+9 e^x x^3-72 \operatorname {ExpIntegralEi}(x)+36 e^x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+8 x \log ^2\left (x^2\right )+9 \int e^x \log ^2\left (x^2\right ) \, dx+9 \int e^x x \log ^2\left (x^2\right ) \, dx-36 \int e^x \, dx-54 \int e^x \, dx \\ & = 16 (2-x)^2+96 x+36 e^x x-16 x^2+8 x^3+9 e^x x^3-72 \operatorname {ExpIntegralEi}(x)+36 e^x \log \left (x^2\right )-16 x^2 \log \left (x^2\right )-18 e^x x^2 \log \left (x^2\right )+8 x \log ^2\left (x^2\right )+9 \int e^x \log ^2\left (x^2\right ) \, dx+9 \int e^x x \log ^2\left (x^2\right ) \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=\left (8+9 e^x\right ) x \left (4+x^2-2 x \log \left (x^2\right )+\log ^2\left (x^2\right )\right ) \]

[In]

Integrate[32 - 32*x + 24*x^2 + E^x*(36 + 27*x^2 + 9*x^3) + (32 - 32*x + E^x*(36 - 36*x - 18*x^2))*Log[x^2] + (
8 + E^x*(9 + 9*x))*Log[x^2]^2,x]

[Out]

(8 + 9*E^x)*x*(4 + x^2 - 2*x*Log[x^2] + Log[x^2]^2)

Maple [B] (verified)

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

Time = 0.18 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.70

method result size
parallelrisch \(9 \,{\mathrm e}^{x} x^{3}-18 x^{2} {\mathrm e}^{x} \ln \left (x^{2}\right )+9 \,{\mathrm e}^{x} \ln \left (x^{2}\right )^{2} x +8 x^{3}-16 x^{2} \ln \left (x^{2}\right )+8 x \ln \left (x^{2}\right )^{2}+36 \,{\mathrm e}^{x} x +32 x\) \(62\)
risch \(\left (36 \,{\mathrm e}^{x} x +32 x \right ) \ln \left (x \right )^{2}+\left (-16 i x \left (\pi \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )-2 \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2}+\pi \operatorname {csgn}\left (i x^{2}\right )^{3}-4 i\right )-18 i \left (\pi x \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )-2 \pi x \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2}+\pi x \operatorname {csgn}\left (i x^{2}\right )^{3}-4 i\right ) {\mathrm e}^{x}\right ) \ln \left (x \right )+16 i \pi x \operatorname {csgn}\left (i x^{2}\right )^{3}+16 i \pi x \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )-36 i {\mathrm e}^{x} \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2}+18 i {\mathrm e}^{x} \pi \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )-32 i \pi x \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2}+18 i {\mathrm e}^{x} \pi \operatorname {csgn}\left (i x^{2}\right )^{3}-\frac {\pi ^{2} \operatorname {csgn}\left (i x^{2}\right )^{2} \left (\operatorname {csgn}\left (i x \right )^{2}-2 \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )+\operatorname {csgn}\left (i x^{2}\right )^{2}\right )^{2} \left (8 x +9 \,{\mathrm e}^{x} x \right )}{4}+\left (-32 x^{2}+64 x +\left (-36 x^{2}+72\right ) {\mathrm e}^{x}\right ) \ln \left (x \right )+i \pi \,\operatorname {csgn}\left (i x^{2}\right ) \left (\operatorname {csgn}\left (i x \right )^{2}-2 \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )+\operatorname {csgn}\left (i x^{2}\right )^{2}\right ) \left (8 x^{2}-16 x +9 \,{\mathrm e}^{x} x^{2}-18 \,{\mathrm e}^{x}\right )+36 \,{\mathrm e}^{x} x -36 \,{\mathrm e}^{x}+\left (9 x^{3}+36\right ) {\mathrm e}^{x}+8 x^{3}+32 x\) \(400\)

[In]

int(((9*x+9)*exp(x)+8)*ln(x^2)^2+((-18*x^2-36*x+36)*exp(x)-32*x+32)*ln(x^2)+(9*x^3+27*x^2+36)*exp(x)+24*x^2-32
*x+32,x,method=_RETURNVERBOSE)

[Out]

9*exp(x)*x^3-18*x^2*exp(x)*ln(x^2)+9*exp(x)*ln(x^2)^2*x+8*x^3-16*x^2*ln(x^2)+8*x*ln(x^2)^2+36*exp(x)*x+32*x

Fricas [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.39 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=8 \, x^{3} + {\left (9 \, x e^{x} + 8 \, x\right )} \log \left (x^{2}\right )^{2} + 9 \, {\left (x^{3} + 4 \, x\right )} e^{x} - 2 \, {\left (9 \, x^{2} e^{x} + 8 \, x^{2}\right )} \log \left (x^{2}\right ) + 32 \, x \]

[In]

integrate(((9*x+9)*exp(x)+8)*log(x^2)^2+((-18*x^2-36*x+36)*exp(x)-32*x+32)*log(x^2)+(9*x^3+27*x^2+36)*exp(x)+2
4*x^2-32*x+32,x, algorithm="fricas")

[Out]

8*x^3 + (9*x*e^x + 8*x)*log(x^2)^2 + 9*(x^3 + 4*x)*e^x - 2*(9*x^2*e^x + 8*x^2)*log(x^2) + 32*x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (19) = 38\).

Time = 0.17 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.61 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=8 x^{3} - 16 x^{2} \log {\left (x^{2} \right )} + 8 x \log {\left (x^{2} \right )}^{2} + 32 x + \left (9 x^{3} - 18 x^{2} \log {\left (x^{2} \right )} + 9 x \log {\left (x^{2} \right )}^{2} + 36 x\right ) e^{x} \]

[In]

integrate(((9*x+9)*exp(x)+8)*ln(x**2)**2+((-18*x**2-36*x+36)*exp(x)-32*x+32)*ln(x**2)+(9*x**3+27*x**2+36)*exp(
x)+24*x**2-32*x+32,x)

[Out]

8*x**3 - 16*x**2*log(x**2) + 8*x*log(x**2)**2 + 32*x + (9*x**3 - 18*x**2*log(x**2) + 9*x*log(x**2)**2 + 36*x)*
exp(x)

Maxima [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.35 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=8 \, x^{3} - 32 \, x^{2} \log \left (x\right ) + 32 \, x \log \left (x\right )^{2} + 9 \, {\left (x^{3} + 4\right )} e^{x} - 36 \, {\left (x^{2} \log \left (x\right ) - x \log \left (x\right )^{2} - x + 1\right )} e^{x} + 32 \, x \]

[In]

integrate(((9*x+9)*exp(x)+8)*log(x^2)^2+((-18*x^2-36*x+36)*exp(x)-32*x+32)*log(x^2)+(9*x^3+27*x^2+36)*exp(x)+2
4*x^2-32*x+32,x, algorithm="maxima")

[Out]

8*x^3 - 32*x^2*log(x) + 32*x*log(x)^2 + 9*(x^3 + 4)*e^x - 36*(x^2*log(x) - x*log(x)^2 - x + 1)*e^x + 32*x

Giac [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 82, normalized size of antiderivative = 3.57 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=8 \, x^{3} + {\left (9 \, x e^{x} + 8 \, x\right )} \log \left (x^{2}\right )^{2} + 9 \, {\left (x^{3} + 4\right )} e^{x} + 36 \, x e^{x} - 2 \, {\left (8 \, x^{2} + 9 \, {\left (x^{2} - 2\right )} e^{x} - 16 \, x\right )} \log \left (x^{2}\right ) - 32 \, x \log \left (x^{2}\right ) - 36 \, e^{x} \log \left (x^{2}\right ) + 32 \, x - 36 \, e^{x} \]

[In]

integrate(((9*x+9)*exp(x)+8)*log(x^2)^2+((-18*x^2-36*x+36)*exp(x)-32*x+32)*log(x^2)+(9*x^3+27*x^2+36)*exp(x)+2
4*x^2-32*x+32,x, algorithm="giac")

[Out]

8*x^3 + (9*x*e^x + 8*x)*log(x^2)^2 + 9*(x^3 + 4)*e^x + 36*x*e^x - 2*(8*x^2 + 9*(x^2 - 2)*e^x - 16*x)*log(x^2)
- 32*x*log(x^2) - 36*e^x*log(x^2) + 32*x - 36*e^x

Mupad [B] (verification not implemented)

Time = 13.10 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.13 \[ \int \left (32-32 x+24 x^2+e^x \left (36+27 x^2+9 x^3\right )+\left (32-32 x+e^x \left (36-36 x-18 x^2\right )\right ) \log \left (x^2\right )+\left (8+e^x (9+9 x)\right ) \log ^2\left (x^2\right )\right ) \, dx=x\,\left (9\,{\mathrm {e}}^x+8\right )\,\left (x^2-2\,x\,\ln \left (x^2\right )+{\ln \left (x^2\right )}^2+4\right ) \]

[In]

int(exp(x)*(27*x^2 + 9*x^3 + 36) - 32*x - log(x^2)*(32*x + exp(x)*(36*x + 18*x^2 - 36) - 32) + log(x^2)^2*(exp
(x)*(9*x + 9) + 8) + 24*x^2 + 32,x)

[Out]

x*(9*exp(x) + 8)*(log(x^2)^2 - 2*x*log(x^2) + x^2 + 4)