\(\int \frac {-10-20 x+(-5-10 x-10 x^2) \log (3)+e^x (-20-10 x+(-5-20 x-5 x^2+5 x^3) \log (3))}{x^2+2 x^3+x^4+e^{2 x} (1+2 x+x^2)+e^x (2 x+4 x^2+2 x^3)} \, dx\) [9612]

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

Optimal result

Integrand size = 92, antiderivative size = 27 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=\frac {5 \left (2+\left (1+x-x^2\right ) \log (3)\right )}{(1+x) \left (e^x+x\right )} \]

[Out]

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

Rubi [F]

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

[In]

Int[(-10 - 20*x + (-5 - 10*x - 10*x^2)*Log[3] + E^x*(-20 - 10*x + (-5 - 20*x - 5*x^2 + 5*x^3)*Log[3]))/(x^2 +
2*x^3 + x^4 + E^(2*x)*(1 + 2*x + x^2) + E^x*(2*x + 4*x^2 + 2*x^3)),x]

[Out]

(5*Log[27])/(E^x + x) + 5*(2 - Log[27])*Defer[Int][(E^x + x)^(-2), x] + 5*Log[27]*Defer[Int][(E^x + x)^(-2), x
] - 5*Log[3]*Defer[Int][x^2/(E^x + x)^2, x] - 5*(4 - Log[9])*Defer[Int][1/((1 + x)*(E^x + x)^2), x] - 15*Log[3
]*Defer[Int][(E^x + x)^(-1), x] + 5*Log[27]*Defer[Int][(E^x + x)^(-1), x] + 5*Log[3]*Defer[Int][x/(E^x + x), x
] - 5*(2 - Log[3])*Defer[Int][1/((1 + x)^2*(E^x + x)), x] - 5*(2 - Log[3])*Defer[Int][1/((1 + x)*(E^x + x)), x
]

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

Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.81 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=-\frac {5 \left (2+\log (3)+x \log (3)-x^3 \log (3)+x^4 \log (3)-x^2 (2+\log (9))\right )}{(-1+x) (1+x)^2 \left (e^x+x\right )} \]

[In]

Integrate[(-10 - 20*x + (-5 - 10*x - 10*x^2)*Log[3] + E^x*(-20 - 10*x + (-5 - 20*x - 5*x^2 + 5*x^3)*Log[3]))/(
x^2 + 2*x^3 + x^4 + E^(2*x)*(1 + 2*x + x^2) + E^x*(2*x + 4*x^2 + 2*x^3)),x]

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15

method result size
risch \(-\frac {5 \left (x^{2} \ln \left (3\right )-x \ln \left (3\right )-\ln \left (3\right )-2\right )}{\left (1+x \right ) \left ({\mathrm e}^{x}+x \right )}\) \(31\)
parallelrisch \(-\frac {5 x^{2} \ln \left (3\right )-10-5 x \ln \left (3\right )-5 \ln \left (3\right )}{{\mathrm e}^{x} x +x^{2}+{\mathrm e}^{x}+x}\) \(34\)
norman \(\frac {5 \ln \left (3\right ) {\mathrm e}^{x}+10 x \ln \left (3\right )+5 x \ln \left (3\right ) {\mathrm e}^{x}+5 \ln \left (3\right )+10}{{\mathrm e}^{x} x +x^{2}+{\mathrm e}^{x}+x}\) \(39\)

[In]

int((((5*x^3-5*x^2-20*x-5)*ln(3)-10*x-20)*exp(x)+(-10*x^2-10*x-5)*ln(3)-20*x-10)/((x^2+2*x+1)*exp(x)^2+(2*x^3+
4*x^2+2*x)*exp(x)+x^4+2*x^3+x^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=-\frac {5 \, {\left ({\left (x^{2} - x - 1\right )} \log \left (3\right ) - 2\right )}}{x^{2} + {\left (x + 1\right )} e^{x} + x} \]

[In]

integrate((((5*x^3-5*x^2-20*x-5)*log(3)-10*x-20)*exp(x)+(-10*x^2-10*x-5)*log(3)-20*x-10)/((x^2+2*x+1)*exp(x)^2
+(2*x^3+4*x^2+2*x)*exp(x)+x^4+2*x^3+x^2),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=\frac {- 5 x^{2} \log {\left (3 \right )} + 5 x \log {\left (3 \right )} + 5 \log {\left (3 \right )} + 10}{x^{2} + x + \left (x + 1\right ) e^{x}} \]

[In]

integrate((((5*x**3-5*x**2-20*x-5)*ln(3)-10*x-20)*exp(x)+(-10*x**2-10*x-5)*ln(3)-20*x-10)/((x**2+2*x+1)*exp(x)
**2+(2*x**3+4*x**2+2*x)*exp(x)+x**4+2*x**3+x**2),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=-\frac {5 \, {\left (x^{2} \log \left (3\right ) - x \log \left (3\right ) - \log \left (3\right ) - 2\right )}}{x^{2} + {\left (x + 1\right )} e^{x} + x} \]

[In]

integrate((((5*x^3-5*x^2-20*x-5)*log(3)-10*x-20)*exp(x)+(-10*x^2-10*x-5)*log(3)-20*x-10)/((x^2+2*x+1)*exp(x)^2
+(2*x^3+4*x^2+2*x)*exp(x)+x^4+2*x^3+x^2),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=-\frac {5 \, {\left (x^{2} \log \left (3\right ) - x \log \left (3\right ) - \log \left (3\right ) - 2\right )}}{x^{2} + x e^{x} + x + e^{x}} \]

[In]

integrate((((5*x^3-5*x^2-20*x-5)*log(3)-10*x-20)*exp(x)+(-10*x^2-10*x-5)*log(3)-20*x-10)/((x^2+2*x+1)*exp(x)^2
+(2*x^3+4*x^2+2*x)*exp(x)+x^4+2*x^3+x^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.96 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-10-20 x+\left (-5-10 x-10 x^2\right ) \log (3)+e^x \left (-20-10 x+\left (-5-20 x-5 x^2+5 x^3\right ) \log (3)\right )}{x^2+2 x^3+x^4+e^{2 x} \left (1+2 x+x^2\right )+e^x \left (2 x+4 x^2+2 x^3\right )} \, dx=\frac {-\ln \left (243\right )\,x^2+\ln \left (243\right )\,x+\ln \left (243\right )+10}{\left (x+{\mathrm {e}}^x\right )\,\left (x+1\right )} \]

[In]

int(-(20*x + log(3)*(10*x + 10*x^2 + 5) + exp(x)*(10*x + log(3)*(20*x + 5*x^2 - 5*x^3 + 5) + 20) + 10)/(exp(2*
x)*(2*x + x^2 + 1) + x^2 + 2*x^3 + x^4 + exp(x)*(2*x + 4*x^2 + 2*x^3)),x)

[Out]

(log(243) + x*log(243) - x^2*log(243) + 10)/((x + exp(x))*(x + 1))