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

   Optimal result
   Rubi [A] (verified)
   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 = 62, antiderivative size = 34 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=\frac {3 \left (-\frac {e^{12+x}}{x^2}+x \left (-x^2+\frac {3}{x (1+x)}\right )\right )}{x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.82, number of steps used = 15, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {1608, 27, 6874, 2228, 46, 45} \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=-\frac {3 e^{x+12}}{x^3}-3 x^2-\frac {9}{x+1}+\frac {9}{x} \]

[In]

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

[Out]

(-3*E^(12 + x))/x^3 + 9/x - 3*x^2 - 9/(1 + x)

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6874

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

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.82 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=-\frac {3 e^{12+x}}{x^3}+\frac {9}{x}-3 x^2-\frac {9}{1+x} \]

[In]

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

[Out]

(-3*E^(12 + x))/x^3 + 9/x - 3*x^2 - 9/(1 + x)

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76

method result size
risch \(-3 x^{2}+\frac {9}{x \left (1+x \right )}-\frac {3 \,{\mathrm e}^{x +12}}{x^{3}}\) \(26\)
parts \(\frac {9}{x}-\frac {9}{1+x}-3 x^{2}-\frac {3 \,{\mathrm e}^{12} {\mathrm e}^{x}}{x^{3}}\) \(28\)
norman \(\frac {9 x^{2}-3 x^{5}-3 x^{6}-3 \,{\mathrm e}^{12} {\mathrm e}^{x}-3 x \,{\mathrm e}^{12} {\mathrm e}^{x}}{x^{3} \left (1+x \right )}\) \(39\)
parallelrisch \(-\frac {3 x^{6}+3 x^{5}+3 x \,{\mathrm e}^{12} {\mathrm e}^{x}+3 \,{\mathrm e}^{12} {\mathrm e}^{x}-9 x^{2}}{x^{3} \left (1+x \right )}\) \(40\)
default \(\frac {9}{x}-\frac {9}{1+x}-3 x^{2}+9 \,{\mathrm e}^{12} \left (\frac {5 \,{\mathrm e}^{x}}{6 x^{2}}-\frac {13 \,{\mathrm e}^{x}}{6 x}+\frac {11 \,\operatorname {Ei}_{1}\left (-x \right )}{6}-\frac {{\mathrm e}^{x}}{3 x^{3}}-\frac {{\mathrm e}^{x}}{1+x}-5 \,{\mathrm e}^{-1} \operatorname {Ei}_{1}\left (-1-x \right )\right )+15 \,{\mathrm e}^{12} \left (-\frac {{\mathrm e}^{x}}{2 x^{2}}+\frac {3 \,{\mathrm e}^{x}}{2 x}-\frac {3 \,\operatorname {Ei}_{1}\left (-x \right )}{2}+\frac {{\mathrm e}^{x}}{1+x}+4 \,{\mathrm e}^{-1} \operatorname {Ei}_{1}\left (-1-x \right )\right )+3 \,{\mathrm e}^{12} \left (\operatorname {Ei}_{1}\left (-x \right )-\frac {{\mathrm e}^{x}}{1+x}-3 \,{\mathrm e}^{-1} \operatorname {Ei}_{1}\left (-1-x \right )-\frac {{\mathrm e}^{x}}{x}\right )-3 \,{\mathrm e}^{12} \left (-\operatorname {Ei}_{1}\left (-x \right )+\frac {{\mathrm e}^{x}}{1+x}+2 \,{\mathrm e}^{-1} \operatorname {Ei}_{1}\left (-1-x \right )\right )\) \(185\)

[In]

int(((-3*x^3+3*x^2+15*x+9)*exp(12)*exp(x)-6*x^7-12*x^6-6*x^5-18*x^3-9*x^2)/(x^6+2*x^5+x^4),x,method=_RETURNVER
BOSE)

[Out]

-3*x^2+9/x/(1+x)-3/x^3*exp(x+12)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

-3*(x^6 + x^5 - 3*x^2 + (x + 1)*e^(x + 12))/(x^4 + x^3)

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.65 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=- 3 x^{2} + \frac {9}{x^{2} + x} - \frac {3 e^{12} e^{x}}{x^{3}} \]

[In]

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

[Out]

-3*x**2 + 9/(x**2 + x) - 3*exp(12)*exp(x)/x**3

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.06 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=-3 \, x^{2} + \frac {9 \, {\left (2 \, x + 1\right )}}{x^{2} + x} - \frac {18}{x + 1} - \frac {3 \, e^{\left (x + 12\right )}}{x^{3}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.97 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=-\frac {3 \, {\left (x^{6} + x^{5} - 3 \, x^{2} + x e^{\left (x + 12\right )} + e^{\left (x + 12\right )}\right )}}{x^{4} + x^{3}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03 \[ \int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4+2 x^5+x^6} \, dx=-3\,x^2-\frac {3\,{\mathrm {e}}^{x+12}+3\,x\,{\mathrm {e}}^{x+12}-9\,x^2}{x^3\,\left (x+1\right )} \]

[In]

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

[Out]

- 3*x^2 - (3*exp(x + 12) + 3*x*exp(x + 12) - 9*x^2)/(x^3*(x + 1))