\(\int \frac {18 \log (4+2 x)+e^{e^x} (-12 \log (4+2 x)+e^x (-12-6 x) \log ^2(4+2 x))+e^{2 e^x} (2 \log (4+2 x)+e^x (4+2 x) \log ^2(4+2 x))}{2+x} \, dx\) [7852]

   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 [F(-1)]

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

9*Log[2*(2 + x)]^2 + 12*Log[4 + 2*x]*Defer[Int][E^E^x/(-2 - x), x] + 2*Log[4 + 2*x]*Defer[Int][E^(2*E^x)/(2 +
x), x] - 6*Defer[Int][E^(E^x + x)*Log[4 + 2*x]^2, x] + 2*Defer[Int][E^(2*E^x + x)*Log[4 + 2*x]^2, x] - 12*Defe
r[Int][Defer[Int][-(E^E^x/(2 + x)), x]/(2 + x), x] - 2*Defer[Int][Defer[Int][E^(2*E^x)/(2 + x), x]/(2 + x), x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [B] (verified)

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

Time = 0.36 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.95

method result size
risch \(\ln \left (4+2 x \right )^{2} {\mathrm e}^{2 \,{\mathrm e}^{x}}-6 \ln \left (4+2 x \right )^{2} {\mathrm e}^{{\mathrm e}^{x}}+9 \ln \left (4+2 x \right )^{2}\) \(39\)
parallelrisch \(\ln \left (4+2 x \right )^{2} {\mathrm e}^{2 \,{\mathrm e}^{x}}-6 \ln \left (4+2 x \right )^{2} {\mathrm e}^{{\mathrm e}^{x}}+9 \ln \left (4+2 x \right )^{2}\) \(39\)

[In]

int((((4+2*x)*exp(x)*ln(4+2*x)^2+2*ln(4+2*x))*exp(exp(x))^2+((-6*x-12)*exp(x)*ln(4+2*x)^2-12*ln(4+2*x))*exp(ex
p(x))+18*ln(4+2*x))/(2+x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 14.10 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.95 \[ \int \frac {18 \log (4+2 x)+e^{e^x} \left (-12 \log (4+2 x)+e^x (-12-6 x) \log ^2(4+2 x)\right )+e^{2 e^x} \left (2 \log (4+2 x)+e^x (4+2 x) \log ^2(4+2 x)\right )}{2+x} \, dx=e^{2 e^{x}} \log {\left (2 x + 4 \right )}^{2} - 6 e^{e^{x}} \log {\left (2 x + 4 \right )}^{2} + 9 \log {\left (2 x + 4 \right )}^{2} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.34 (sec) , antiderivative size = 66, normalized size of antiderivative = 3.30 \[ \int \frac {18 \log (4+2 x)+e^{e^x} \left (-12 \log (4+2 x)+e^x (-12-6 x) \log ^2(4+2 x)\right )+e^{2 e^x} \left (2 \log (4+2 x)+e^x (4+2 x) \log ^2(4+2 x)\right )}{2+x} \, dx={\left (\log \left (2\right )^{2} + 2 \, \log \left (2\right ) \log \left (x + 2\right ) + \log \left (x + 2\right )^{2}\right )} e^{\left (2 \, e^{x}\right )} - 6 \, {\left (\log \left (2\right )^{2} + 2 \, \log \left (2\right ) \log \left (x + 2\right ) + \log \left (x + 2\right )^{2}\right )} e^{\left (e^{x}\right )} + 18 \, \log \left (2\right ) \log \left (x + 2\right ) + 9 \, \log \left (x + 2\right )^{2} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 83, normalized size of antiderivative = 4.15 \[ \int \frac {18 \log (4+2 x)+e^{e^x} \left (-12 \log (4+2 x)+e^x (-12-6 x) \log ^2(4+2 x)\right )+e^{2 e^x} \left (2 \log (4+2 x)+e^x (4+2 x) \log ^2(4+2 x)\right )}{2+x} \, dx=e^{\left (2 \, e^{x}\right )} \log \left (2\right )^{2} - 6 \, e^{\left (e^{x}\right )} \log \left (2\right )^{2} + 2 \, e^{\left (2 \, e^{x}\right )} \log \left (2\right ) \log \left (x + 2\right ) - 12 \, e^{\left (e^{x}\right )} \log \left (2\right ) \log \left (x + 2\right ) + e^{\left (2 \, e^{x}\right )} \log \left (x + 2\right )^{2} - 6 \, e^{\left (e^{x}\right )} \log \left (x + 2\right )^{2} + 18 \, \log \left (2\right ) \log \left (x + 2\right ) + 9 \, \log \left (x + 2\right )^{2} \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {18 \log (4+2 x)+e^{e^x} \left (-12 \log (4+2 x)+e^x (-12-6 x) \log ^2(4+2 x)\right )+e^{2 e^x} \left (2 \log (4+2 x)+e^x (4+2 x) \log ^2(4+2 x)\right )}{2+x} \, dx=\int \frac {18\,\ln \left (2\,x+4\right )-{\mathrm {e}}^{{\mathrm {e}}^x}\,\left ({\mathrm {e}}^x\,\left (6\,x+12\right )\,{\ln \left (2\,x+4\right )}^2+12\,\ln \left (2\,x+4\right )\right )+{\mathrm {e}}^{2\,{\mathrm {e}}^x}\,\left ({\mathrm {e}}^x\,\left (2\,x+4\right )\,{\ln \left (2\,x+4\right )}^2+2\,\ln \left (2\,x+4\right )\right )}{x+2} \,d x \]

[In]

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

[Out]

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