\(\int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x (x+x^2)}{2+e^x}} (4+8 x+e^{2 x} (1+2 x)+e^x (4-4 e^3+8 x))}{4+4 e^x+e^{2 x}} \, dx\) [4817]

   Optimal result
   Rubi [F]
   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 = 93, antiderivative size = 23 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=e^{\frac {4 e^3}{2+e^x}+x+x^2}+12 x \]

[Out]

exp(4*exp(3)/(exp(x)+2)+x^2+x)+12*x

Rubi [F]

\[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=\int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx \]

[In]

Int[(48 + 48*E^x + 12*E^(2*x) + E^((4*E^3 + 2*x + 2*x^2 + E^x*(x + x^2))/(2 + E^x))*(4 + 8*x + E^(2*x)*(1 + 2*
x) + E^x*(4 - 4*E^3 + 8*x)))/(4 + 4*E^x + E^(2*x)),x]

[Out]

12*x + Defer[Int][E^((4*E^3 + 2*x + E^x*x + 2*x^2 + E^x*x^2)/(2 + E^x)), x] + 8*Defer[Int][E^(3 + (4*E^3 + 2*x
 + E^x*x + 2*x^2 + E^x*x^2)/(2 + E^x))/(2 + E^x)^2, x] - 4*Defer[Int][E^(3 + (4*E^3 + 2*x + E^x*x + 2*x^2 + E^
x*x^2)/(2 + E^x))/(2 + E^x), x] + 2*Defer[Int][E^((4*E^3 + 2*x + E^x*x + 2*x^2 + E^x*x^2)/(2 + E^x))*x, x]

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

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=e^{\frac {4 e^3}{2+e^x}+x+x^2}+12 x \]

[In]

Integrate[(48 + 48*E^x + 12*E^(2*x) + E^((4*E^3 + 2*x + 2*x^2 + E^x*(x + x^2))/(2 + E^x))*(4 + 8*x + E^(2*x)*(
1 + 2*x) + E^x*(4 - 4*E^3 + 8*x)))/(4 + 4*E^x + E^(2*x)),x]

[Out]

E^((4*E^3)/(2 + E^x) + x + x^2) + 12*x

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.48

method result size
parallelrisch \(12 x +{\mathrm e}^{\frac {\left (x^{2}+x \right ) {\mathrm e}^{x}+4 \,{\mathrm e}^{3}+2 x^{2}+2 x}{{\mathrm e}^{x}+2}}\) \(34\)
risch \(12 x +{\mathrm e}^{\frac {{\mathrm e}^{x} x^{2}+{\mathrm e}^{x} x +2 x^{2}+4 \,{\mathrm e}^{3}+2 x}{{\mathrm e}^{x}+2}}\) \(36\)
norman \(\frac {{\mathrm e}^{x} {\mathrm e}^{\frac {\left (x^{2}+x \right ) {\mathrm e}^{x}+4 \,{\mathrm e}^{3}+2 x^{2}+2 x}{{\mathrm e}^{x}+2}}+24 x +12 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{\frac {\left (x^{2}+x \right ) {\mathrm e}^{x}+4 \,{\mathrm e}^{3}+2 x^{2}+2 x}{{\mathrm e}^{x}+2}}}{{\mathrm e}^{x}+2}\) \(80\)

[In]

int((((1+2*x)*exp(x)^2+(-4*exp(3)+8*x+4)*exp(x)+8*x+4)*exp(((x^2+x)*exp(x)+4*exp(3)+2*x^2+2*x)/(exp(x)+2))+12*
exp(x)^2+48*exp(x)+48)/(exp(x)^2+4*exp(x)+4),x,method=_RETURNVERBOSE)

[Out]

12*x+exp(((x^2+x)*exp(x)+4*exp(3)+2*x^2+2*x)/(exp(x)+2))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.43 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=12 \, x + e^{\left (\frac {2 \, x^{2} + {\left (x^{2} + x\right )} e^{x} + 2 \, x + 4 \, e^{3}}{e^{x} + 2}\right )} \]

[In]

integrate((((1+2*x)*exp(x)^2+(-4*exp(3)+8*x+4)*exp(x)+8*x+4)*exp(((x^2+x)*exp(x)+4*exp(3)+2*x^2+2*x)/(exp(x)+2
))+12*exp(x)^2+48*exp(x)+48)/(exp(x)^2+4*exp(x)+4),x, algorithm="fricas")

[Out]

12*x + e^((2*x^2 + (x^2 + x)*e^x + 2*x + 4*e^3)/(e^x + 2))

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.35 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=12 x + e^{\frac {2 x^{2} + 2 x + \left (x^{2} + x\right ) e^{x} + 4 e^{3}}{e^{x} + 2}} \]

[In]

integrate((((1+2*x)*exp(x)**2+(-4*exp(3)+8*x+4)*exp(x)+8*x+4)*exp(((x**2+x)*exp(x)+4*exp(3)+2*x**2+2*x)/(exp(x
)+2))+12*exp(x)**2+48*exp(x)+48)/(exp(x)**2+4*exp(x)+4),x)

[Out]

12*x + exp((2*x**2 + 2*x + (x**2 + x)*exp(x) + 4*exp(3))/(exp(x) + 2))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (20) = 40\).

Time = 0.33 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.52 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=12 \, x + e^{\left (\frac {x^{2} e^{x}}{e^{x} + 2} + \frac {2 \, x^{2}}{e^{x} + 2} + \frac {x e^{x}}{e^{x} + 2} + \frac {2 \, x}{e^{x} + 2} + \frac {4 \, e^{3}}{e^{x} + 2}\right )} \]

[In]

integrate((((1+2*x)*exp(x)^2+(-4*exp(3)+8*x+4)*exp(x)+8*x+4)*exp(((x^2+x)*exp(x)+4*exp(3)+2*x^2+2*x)/(exp(x)+2
))+12*exp(x)^2+48*exp(x)+48)/(exp(x)^2+4*exp(x)+4),x, algorithm="maxima")

[Out]

12*x + e^(x^2*e^x/(e^x + 2) + 2*x^2/(e^x + 2) + x*e^x/(e^x + 2) + 2*x/(e^x + 2) + 4*e^3/(e^x + 2))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (20) = 40\).

Time = 0.49 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.09 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx={\left (12 \, x e^{3} + e^{\left (\frac {x^{2} e^{x} + 2 \, x^{2} + x e^{x} + 2 \, x - 2 \, e^{\left (x + 3\right )}}{e^{x} + 2} + 2 \, e^{3} + 3\right )}\right )} e^{\left (-3\right )} \]

[In]

integrate((((1+2*x)*exp(x)^2+(-4*exp(3)+8*x+4)*exp(x)+8*x+4)*exp(((x^2+x)*exp(x)+4*exp(3)+2*x^2+2*x)/(exp(x)+2
))+12*exp(x)^2+48*exp(x)+48)/(exp(x)^2+4*exp(x)+4),x, algorithm="giac")

[Out]

(12*x*e^3 + e^((x^2*e^x + 2*x^2 + x*e^x + 2*x - 2*e^(x + 3))/(e^x + 2) + 2*e^3 + 3))*e^(-3)

Mupad [B] (verification not implemented)

Time = 10.89 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.70 \[ \int \frac {48+48 e^x+12 e^{2 x}+e^{\frac {4 e^3+2 x+2 x^2+e^x \left (x+x^2\right )}{2+e^x}} \left (4+8 x+e^{2 x} (1+2 x)+e^x \left (4-4 e^3+8 x\right )\right )}{4+4 e^x+e^{2 x}} \, dx=12\,x+{\mathrm {e}}^{\frac {x^2\,{\mathrm {e}}^x}{{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{\frac {2\,x^2}{{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{\frac {x\,{\mathrm {e}}^x}{{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{\frac {4\,{\mathrm {e}}^3}{{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{\frac {2\,x}{{\mathrm {e}}^x+2}} \]

[In]

int((12*exp(2*x) + 48*exp(x) + exp((2*x + 4*exp(3) + 2*x^2 + exp(x)*(x + x^2))/(exp(x) + 2))*(8*x + exp(x)*(8*
x - 4*exp(3) + 4) + exp(2*x)*(2*x + 1) + 4) + 48)/(exp(2*x) + 4*exp(x) + 4),x)

[Out]

12*x + exp((x^2*exp(x))/(exp(x) + 2))*exp((2*x^2)/(exp(x) + 2))*exp((x*exp(x))/(exp(x) + 2))*exp((4*exp(3))/(e
xp(x) + 2))*exp((2*x)/(exp(x) + 2))