\(\int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} (-12-2 x+2 x^2+(-12 x-2 x^2+2 x^3) \log (6+x))}{6 x^3+x^4} \, dx\) [514]

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

Optimal result

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

[Out]

exp((ln(6+x)+1/x)^2)-x*(-x+3)

Rubi [F]

\[ \int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx=\int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx \]

[In]

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

[Out]

-3*x + x^2 - 12*Defer[Int][(E^(x^(-2) + Log[6 + x]^2)*(6 + x)^(-1 + 2/x))/x^3, x] - 2*Defer[Int][(E^(x^(-2) +
Log[6 + x]^2)*(6 + x)^(-1 + 2/x))/x^2, x] + 2*Defer[Int][(E^(x^(-2) + Log[6 + x]^2)*(6 + x)^(-1 + 2/x))/x, x]
+ 2*Defer[Int][E^(x^(-2) + Log[6 + x]^2)*(6 + x)^(-1 + 2/x)*Log[6 + x], x] - 12*Defer[Int][(E^(x^(-2) + Log[6
+ x]^2)*(6 + x)^(-1 + 2/x)*Log[6 + x])/x^2, x] - 2*Defer[Int][(E^(x^(-2) + Log[6 + x]^2)*(6 + x)^(-1 + 2/x)*Lo
g[6 + x])/x, x]

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

Mathematica [A] (verified)

Time = 0.83 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.38 \[ \int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx=-3 x+x^2+e^{\frac {1}{x^2}+\log ^2(6+x)} (6+x)^{2/x} \]

[In]

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

[Out]

-3*x + x^2 + E^(x^(-2) + Log[6 + x]^2)*(6 + x)^(2/x)

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10

method result size
risch \(-3 x +{\mathrm e}^{\frac {\left (x \ln \left (6+x \right )+1\right )^{2}}{x^{2}}}+x^{2}\) \(23\)
default \(-3 x +{\mathrm e}^{\frac {x^{2} \ln \left (6+x \right )^{2}+2 x \ln \left (6+x \right )+1}{x^{2}}}+x^{2}\) \(32\)
parts \(-3 x +{\mathrm e}^{\frac {x^{2} \ln \left (6+x \right )^{2}+2 x \ln \left (6+x \right )+1}{x^{2}}}+x^{2}\) \(32\)
parallelrisch \(x^{2}-3 x +{\mathrm e}^{\frac {x^{2} \ln \left (6+x \right )^{2}+2 x \ln \left (6+x \right )+1}{x^{2}}}+9\) \(33\)

[In]

int((((2*x^3-2*x^2-12*x)*ln(6+x)+2*x^2-2*x-12)*exp((x^2*ln(6+x)^2+2*x*ln(6+x)+1)/x^2)+2*x^5+9*x^4-18*x^3)/(x^4
+6*x^3),x,method=_RETURNVERBOSE)

[Out]

-3*x+exp((x*ln(6+x)+1)^2/x^2)+x^2

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.48 \[ \int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx=x^{2} - 3 \, x + e^{\left (\frac {x^{2} \log \left (x + 6\right )^{2} + 2 \, x \log \left (x + 6\right ) + 1}{x^{2}}\right )} \]

[In]

integrate((((2*x^3-2*x^2-12*x)*log(6+x)+2*x^2-2*x-12)*exp((x^2*log(6+x)^2+2*x*log(6+x)+1)/x^2)+2*x^5+9*x^4-18*
x^3)/(x^4+6*x^3),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (15) = 30\).

Time = 0.16 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.48 \[ \int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx=x^{2} - 3 x + e^{\frac {x^{2} \log {\left (x + 6 \right )}^{2} + 2 x \log {\left (x + 6 \right )} + 1}{x^{2}}} \]

[In]

integrate((((2*x**3-2*x**2-12*x)*ln(6+x)+2*x**2-2*x-12)*exp((x**2*ln(6+x)**2+2*x*ln(6+x)+1)/x**2)+2*x**5+9*x**
4-18*x**3)/(x**4+6*x**3),x)

[Out]

x**2 - 3*x + exp((x**2*log(x + 6)**2 + 2*x*log(x + 6) + 1)/x**2)

Maxima [A] (verification not implemented)

none

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

[In]

integrate((((2*x^3-2*x^2-12*x)*log(6+x)+2*x^2-2*x-12)*exp((x^2*log(6+x)^2+2*x*log(6+x)+1)/x^2)+2*x^5+9*x^4-18*
x^3)/(x^4+6*x^3),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

integrate((((2*x^3-2*x^2-12*x)*log(6+x)+2*x^2-2*x-12)*exp((x^2*log(6+x)^2+2*x*log(6+x)+1)/x^2)+2*x^5+9*x^4-18*
x^3)/(x^4+6*x^3),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 7.54 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {-18 x^3+9 x^4+2 x^5+e^{\frac {1+2 x \log (6+x)+x^2 \log ^2(6+x)}{x^2}} \left (-12-2 x+2 x^2+\left (-12 x-2 x^2+2 x^3\right ) \log (6+x)\right )}{6 x^3+x^4} \, dx=x^2-3\,x+{\mathrm {e}}^{{\ln \left (x+6\right )}^2}\,{\mathrm {e}}^{\frac {1}{x^2}}\,{\left (x+6\right )}^{2/x} \]

[In]

int(-(exp((2*x*log(x + 6) + x^2*log(x + 6)^2 + 1)/x^2)*(2*x + log(x + 6)*(12*x + 2*x^2 - 2*x^3) - 2*x^2 + 12)
+ 18*x^3 - 9*x^4 - 2*x^5)/(6*x^3 + x^4),x)

[Out]

x^2 - 3*x + exp(log(x + 6)^2)*exp(1/x^2)*(x + 6)^(2/x)