\(\int \frac {18 x+20 x^2+4 x^3+2 x^4+e^x (-18 x^2-2 x^3-2 x^4)+\frac {1}{5} e^4 (-9 x-x^2-x^3) (-9-11 x-4 x^2-x^3+e^x (9 x+x^2+x^3))}{-18 x^2-2 x^3-2 x^4+\frac {1}{5} e^4 (-9 x-x^2-x^3) (9 x+x^2+x^3)} \, dx\) [7790]

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

Optimal result

Integrand size = 139, antiderivative size = 30 \[ \int \frac {18 x+20 x^2+4 x^3+2 x^4+e^x \left (-18 x^2-2 x^3-2 x^4\right )+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (-9-11 x-4 x^2-x^3+e^x \left (9 x+x^2+x^3\right )\right )}{-18 x^2-2 x^3-2 x^4+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (9 x+x^2+x^3\right )} \, dx=e^x-x-\log \left (-2 x+e^4 x \left (x-\frac {1}{5} (3+x)^2\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.39 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.036, Rules used = {6820, 6860, 2225, 1642, 642} \[ \int \frac {18 x+20 x^2+4 x^3+2 x^4+e^x \left (-18 x^2-2 x^3-2 x^4\right )+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (-9-11 x-4 x^2-x^3+e^x \left (9 x+x^2+x^3\right )\right )}{-18 x^2-2 x^3-2 x^4+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (9 x+x^2+x^3\right )} \, dx=-\log \left (e^4 x^2+e^4 x+9 e^4+10\right )-x+e^x-\log (x) \]

[In]

Int[(18*x + 20*x^2 + 4*x^3 + 2*x^4 + E^x*(-18*x^2 - 2*x^3 - 2*x^4) + (E^4*(-9*x - x^2 - x^3)*(-9 - 11*x - 4*x^
2 - x^3 + E^x*(9*x + x^2 + x^3)))/5)/(-18*x^2 - 2*x^3 - 2*x^4 + (E^4*(-9*x - x^2 - x^3)*(9*x + x^2 + x^3))/5),
x]

[Out]

E^x - x - Log[x] - Log[10 + 9*E^4 + E^4*x + E^4*x^2]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1642

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6860

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

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

Mathematica [A] (verified)

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

[In]

Integrate[(18*x + 20*x^2 + 4*x^3 + 2*x^4 + E^x*(-18*x^2 - 2*x^3 - 2*x^4) + (E^4*(-9*x - x^2 - x^3)*(-9 - 11*x
- 4*x^2 - x^3 + E^x*(9*x + x^2 + x^3)))/5)/(-18*x^2 - 2*x^3 - 2*x^4 + (E^4*(-9*x - x^2 - x^3)*(9*x + x^2 + x^3
))/5),x]

[Out]

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

Maple [A] (verified)

Time = 3.37 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00

method result size
default \(-x -\ln \left (x \right )-\ln \left (x^{2} {\mathrm e}^{4}+x \,{\mathrm e}^{4}+9 \,{\mathrm e}^{4}+10\right )+{\mathrm e}^{x}\) \(30\)
parts \(-x -\ln \left (x \right )-\ln \left (x^{2} {\mathrm e}^{4}+x \,{\mathrm e}^{4}+9 \,{\mathrm e}^{4}+10\right )+{\mathrm e}^{x}\) \(30\)
norman \(\frac {{\mathrm e}^{x} x -x^{2}}{x}-\ln \left (x \right )-\ln \left (x^{2} {\mathrm e}^{4}+x \,{\mathrm e}^{4}+9 \,{\mathrm e}^{4}+10\right )\) \(39\)
parallelrisch \(\frac {2 x^{6} {\mathrm e}^{x}+38 \,{\mathrm e}^{x} x^{4}+162 \,{\mathrm e}^{x} x^{2}+36 \,{\mathrm e}^{x} x^{3}+4 x^{5} {\mathrm e}^{x}-2 x^{7}+15 x^{6}+325 x^{4}+180 x^{3}+1539 x^{2}-2 \ln \left (x -\frac {{\mathrm e}^{\ln \left (-\frac {1}{5} x^{3}-\frac {1}{5} x^{2}-\frac {9}{5} x \right )+4}}{2}\right ) x^{6}-4 \ln \left (x -\frac {{\mathrm e}^{\ln \left (-\frac {1}{5} x^{3}-\frac {1}{5} x^{2}-\frac {9}{5} x \right )+4}}{2}\right ) x^{5}-38 \ln \left (x -\frac {{\mathrm e}^{\ln \left (-\frac {1}{5} x^{3}-\frac {1}{5} x^{2}-\frac {9}{5} x \right )+4}}{2}\right ) x^{4}-36 \ln \left (x -\frac {{\mathrm e}^{\ln \left (-\frac {1}{5} x^{3}-\frac {1}{5} x^{2}-\frac {9}{5} x \right )+4}}{2}\right ) x^{3}-162 \ln \left (x -\frac {{\mathrm e}^{\ln \left (-\frac {1}{5} x^{3}-\frac {1}{5} x^{2}-\frac {9}{5} x \right )+4}}{2}\right ) x^{2}}{2 x^{2} \left (x^{2}+x +9\right )^{2}}\) \(215\)
risch \(-x -\ln \left (x^{3}+x^{2}+9 x \right )+{\mathrm e}^{x}-\ln \left (5\right )+4+\ln \left (x \right )+\ln \left (x^{2}+x +9\right )-\frac {i \pi \,\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right ) \left (-\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )+\operatorname {csgn}\left (i x \right )\right ) \left (-\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )+\operatorname {csgn}\left (i \left (x^{2}+x +9\right )\right )\right )}{2}+i \pi {\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )}^{2} \left (\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )-1\right )-\ln \left (2 x -\frac {x \left (x^{2}+x +9\right ) {\mathrm e}^{4} {\mathrm e}^{\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )}^{3}}{2}} {\mathrm e}^{\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )}^{2} \operatorname {csgn}\left (i x \right )}{2}} {\mathrm e}^{\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right )}^{2} \operatorname {csgn}\left (i \left (x^{2}+x +9\right )\right )}{2}} {\mathrm e}^{-\frac {i \pi \,\operatorname {csgn}\left (i x \left (x^{2}+x +9\right )\right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i \left (x^{2}+x +9\right )\right )}{2}}}{5}\right )\) \(240\)

[In]

int((((x^3+x^2+9*x)*exp(x)-x^3-4*x^2-11*x-9)*exp(ln(-1/5*x^3-1/5*x^2-9/5*x)+4)+(-2*x^4-2*x^3-18*x^2)*exp(x)+2*
x^4+4*x^3+20*x^2+18*x)/((x^3+x^2+9*x)*exp(ln(-1/5*x^3-1/5*x^2-9/5*x)+4)-2*x^4-2*x^3-18*x^2),x,method=_RETURNVE
RBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate((((x^3+x^2+9*x)*exp(x)-x^3-4*x^2-11*x-9)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)+(-2*x^4-2*x^3-18*x^2)*ex
p(x)+2*x^4+4*x^3+20*x^2+18*x)/((x^3+x^2+9*x)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)-2*x^4-2*x^3-18*x^2),x, algorit
hm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

-x + exp(x) - log(x**3*exp(4) + x**2*exp(4) + x*(10 + 9*exp(4)))

Maxima [B] (verification not implemented)

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

Time = 0.37 (sec) , antiderivative size = 703, normalized size of antiderivative = 23.43 \[ \int \frac {18 x+20 x^2+4 x^3+2 x^4+e^x \left (-18 x^2-2 x^3-2 x^4\right )+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (-9-11 x-4 x^2-x^3+e^x \left (9 x+x^2+x^3\right )\right )}{-18 x^2-2 x^3-2 x^4+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (9 x+x^2+x^3\right )} \, dx=\text {Too large to display} \]

[In]

integrate((((x^3+x^2+9*x)*exp(x)-x^3-4*x^2-11*x-9)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)+(-2*x^4-2*x^3-18*x^2)*ex
p(x)+2*x^4+4*x^3+20*x^2+18*x)/((x^3+x^2+9*x)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)-2*x^4-2*x^3-18*x^2),x, algorit
hm="maxima")

[Out]

-(17*e^4 + 20)*arctan((2*x*e^4 + e^4)*e^(-2)/sqrt(35*e^4 + 40))*e^(-2)/sqrt(35*e^4 + 40) + 1/700*(35*(17*e^4 +
 20)*e^(-4)*log(x^2*e^4 + x*e^4 + 9*e^4 + 10) + 70*(127*e^8 + 320*e^4 + 200)*arctan((2*x*e^4 + e^4)*e^(-2)/sqr
t(35*e^4 + 40))*e^(-6)/sqrt(35*e^4 + 40) - 700*x*e^(-4) - 254*sqrt(35)*arctan(1/35*sqrt(35)*(2*x + 1)) - 595*l
og(x^2 + x + 9))*e^4 - 1/70*(35*(4*e^4 + 5)*e^(-4)*log(x^2*e^4 + x*e^4 + 9*e^4 + 10) - 70*(13*e^4 + 15)*arctan
((2*x*e^4 + e^4)*e^(-2)/sqrt(35*e^4 + 40))*e^(-2)/sqrt(35*e^4 + 40) + 26*sqrt(35)*arctan(1/35*sqrt(35)*(2*x +
1)) - 140*log(x^2 + x + 9))*e^4 - 6/175*(70*(17*e^4 + 20)*arctan((2*x*e^4 + e^4)*e^(-2)/sqrt(35*e^4 + 40))*e^(
-2)/sqrt(35*e^4 + 40) - 34*sqrt(35)*arctan(1/35*sqrt(35)*(2*x + 1)) + 35*log(x^2*e^4 + x*e^4 + 9*e^4 + 10) - 3
5*log(x^2 + x + 9))*e^4 + 2/25*(2*sqrt(35)*arctan(1/35*sqrt(35)*(2*x + 1)) - 70*arctan((2*x*e^4 + e^4)*e^(-2)/
sqrt(35*e^4 + 40))*e^2/sqrt(35*e^4 + 40) + 35*log(x^2*e^4 + x*e^4 + 9*e^4 + 10) - 35*log(x^2 + x + 9))*e^4 + 9
/700*(2*sqrt(35)*arctan(1/35*sqrt(35)*(2*x + 1)) - 315*e^4*log(x^2*e^4 + x*e^4 + 9*e^4 + 10)/(9*e^4 + 10) - 63
0*arctan((2*x*e^4 + e^4)*e^(-2)/sqrt(35*e^4 + 40))*e^6/(sqrt(35*e^4 + 40)*(9*e^4 + 10)) - 700*log(x)/(9*e^4 +
10) + 35*log(x^2 + x + 9))*e^4 - 108/175*(sqrt(35)*arctan(1/35*sqrt(35)*(2*x + 1)) - 35*arctan((2*x*e^4 + e^4)
*e^(-2)/sqrt(35*e^4 + 40))*e^2/sqrt(35*e^4 + 40))*e^4 + 18*arctan((2*x*e^4 + e^4)*e^(-2)/sqrt(35*e^4 + 40))*e^
2/sqrt(35*e^4 + 40) - 9/2*e^4*log(x^2*e^4 + x*e^4 + 9*e^4 + 10)/(9*e^4 + 10) - 9*arctan((2*x*e^4 + e^4)*e^(-2)
/sqrt(35*e^4 + 40))*e^6/(sqrt(35*e^4 + 40)*(9*e^4 + 10)) - 10*log(x)/(9*e^4 + 10) + e^x + 1/2*log(x^2*e^4 + x*
e^4 + 9*e^4 + 10)

Giac [A] (verification not implemented)

none

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

[In]

integrate((((x^3+x^2+9*x)*exp(x)-x^3-4*x^2-11*x-9)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)+(-2*x^4-2*x^3-18*x^2)*ex
p(x)+2*x^4+4*x^3+20*x^2+18*x)/((x^3+x^2+9*x)*exp(log(-1/5*x^3-1/5*x^2-9/5*x)+4)-2*x^4-2*x^3-18*x^2),x, algorit
hm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \frac {18 x+20 x^2+4 x^3+2 x^4+e^x \left (-18 x^2-2 x^3-2 x^4\right )+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (-9-11 x-4 x^2-x^3+e^x \left (9 x+x^2+x^3\right )\right )}{-18 x^2-2 x^3-2 x^4+\frac {1}{5} e^4 \left (-9 x-x^2-x^3\right ) \left (9 x+x^2+x^3\right )} \, dx={\mathrm {e}}^x-\ln \left (9\,x+10\,x\,{\mathrm {e}}^{-4}+x^2+x^3\right )-x \]

[In]

int(-(18*x - exp(x)*(18*x^2 + 2*x^3 + 2*x^4) - exp(log(- (9*x)/5 - x^2/5 - x^3/5) + 4)*(11*x - exp(x)*(9*x + x
^2 + x^3) + 4*x^2 + x^3 + 9) + 20*x^2 + 4*x^3 + 2*x^4)/(18*x^2 - exp(log(- (9*x)/5 - x^2/5 - x^3/5) + 4)*(9*x
+ x^2 + x^3) + 2*x^3 + 2*x^4),x)

[Out]

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