3.81.16 \(\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\)

Optimal. Leaf size=34 \[ \frac {3 \left (-\frac {e^{12+x}}{x^2}+x \left (-x^2+\frac {3}{x (1+x)}\right )\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.50, antiderivative size = 28, normalized size of antiderivative = 0.82, number of steps used = 15, number of rules used = 6, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {1594, 27, 6742, 2197, 44, 43} \begin {gather*} -\frac {3 e^{x+12}}{x^3}-3 x^2-\frac {9}{x+1}+\frac {9}{x} \end {gather*}

Antiderivative was successfully verified.

[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 43

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 44

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] && L
tQ[m + n + 2, 0])

Rule 1594

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 2197

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 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 28, normalized size = 0.82 \begin {gather*} -\frac {3 e^{12+x}}{x^3}+\frac {9}{x}-3 x^2-\frac {9}{1+x} \end {gather*}

Antiderivative was successfully verified.

[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)

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 31, normalized size = 0.91 \begin {gather*} -\frac {3 \, {\left (x^{6} + x^{5} - 3 \, x^{2} + {\left (x + 1\right )} e^{\left (x + 12\right )}\right )}}{x^{4} + x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 33, normalized size = 0.97 \begin {gather*} -\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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 26, normalized size = 0.76




method result size



risch \(-3 x^{2}+\frac {9}{x \left (x +1\right )}-\frac {3 \,{\mathrm e}^{x +12}}{x^{3}}\) \(26\)
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 (x +1\right )}\) \(39\)
default \(\frac {9}{x}-\frac {9}{x +1}-3 x^{2}+9 \,{\mathrm e}^{12} \left (\frac {11 \expIntegralEi \left (1, -x \right )}{6}-\frac {{\mathrm e}^{x}}{3 x^{3}}+\frac {5 \,{\mathrm e}^{x}}{6 x^{2}}-\frac {13 \,{\mathrm e}^{x}}{6 x}-\frac {{\mathrm e}^{x}}{x +1}-5 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )+15 \,{\mathrm e}^{12} \left (-\frac {3 \expIntegralEi \left (1, -x \right )}{2}+\frac {3 \,{\mathrm e}^{x}}{2 x}+\frac {{\mathrm e}^{x}}{x +1}+4 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )-\frac {{\mathrm e}^{x}}{2 x^{2}}\right )+3 \,{\mathrm e}^{12} \left (\expIntegralEi \left (1, -x \right )-\frac {{\mathrm e}^{x}}{x}-\frac {{\mathrm e}^{x}}{x +1}-3 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )-3 \,{\mathrm e}^{12} \left (-\expIntegralEi \left (1, -x \right )+\frac {{\mathrm e}^{x}}{x +1}+2 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )\) \(185\)



Verification of antiderivative is not currently implemented for this CAS.

[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/(x+1)-3/x^3*exp(x+12)

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 36, normalized size = 1.06 \begin {gather*} -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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 35, normalized size = 1.03 \begin {gather*} -3\,x^2-\frac {3\,{\mathrm {e}}^{x+12}+3\,x\,{\mathrm {e}}^{x+12}-9\,x^2}{x^3\,\left (x+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 22, normalized size = 0.65 \begin {gather*} - 3 x^{2} + \frac {9}{x^{2} + x} - \frac {3 e^{12} e^{x}}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________