3.63.99 \(\int \frac {-18-36 x+36 x^3+108 x^4+216 x^5+216 x^6+72 x^7+e^{2 x} (18 x^3+54 x^4+54 x^5+18 x^6)+e^x (-18 x-36 x^2-36 x^3-126 x^4-216 x^5-144 x^6-36 x^7)}{x^3+3 x^4+3 x^5+x^6} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.32, antiderivative size = 71, normalized size of antiderivative = 3.94, number of steps used = 26, number of rules used = 9, integrand size = 115, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.078, Rules used = {6741, 6742, 2194, 44, 37, 43, 2177, 2178, 2176} \begin {gather*} \frac {54 x^2}{(x+1)^2}+36 x^2+\frac {9}{x^2}-36 e^x x+9 e^{2 x}-\frac {18 e^x}{x+1}+\frac {90}{x+1}-\frac {45}{(x+1)^2}+\frac {18 e^x}{x}-\frac {18}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-18 - 36*x + 36*x^3 + 108*x^4 + 216*x^5 + 216*x^6 + 72*x^7 + E^(2*x)*(18*x^3 + 54*x^4 + 54*x^5 + 18*x^6)
+ E^x*(-18*x - 36*x^2 - 36*x^3 - 126*x^4 - 216*x^5 - 144*x^6 - 36*x^7))/(x^3 + 3*x^4 + 3*x^5 + x^6),x]

[Out]

9*E^(2*x) + 9/x^2 - 18/x + (18*E^x)/x - 36*E^x*x + 36*x^2 - 45/(1 + x)^2 + (54*x^2)/(1 + x)^2 + 90/(1 + x) - (
18*E^x)/(1 + x)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

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 6741

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

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 {-18-36 x+36 x^3+108 x^4+216 x^5+216 x^6+72 x^7+e^{2 x} \left (18 x^3+54 x^4+54 x^5+18 x^6\right )+e^x \left (-18 x-36 x^2-36 x^3-126 x^4-216 x^5-144 x^6-36 x^7\right )}{x^3 (1+x)^3} \, dx\\ &=\int \left (18 e^{2 x}+\frac {36}{(1+x)^3}-\frac {18}{x^3 (1+x)^3}-\frac {36}{x^2 (1+x)^3}+\frac {108 x}{(1+x)^3}+\frac {216 x^2}{(1+x)^3}+\frac {216 x^3}{(1+x)^3}+\frac {72 x^4}{(1+x)^3}-\frac {18 e^x \left (1+x+x^2+6 x^3+6 x^4+2 x^5\right )}{x^2 (1+x)^2}\right ) \, dx\\ &=-\frac {18}{(1+x)^2}+18 \int e^{2 x} \, dx-18 \int \frac {1}{x^3 (1+x)^3} \, dx-18 \int \frac {e^x \left (1+x+x^2+6 x^3+6 x^4+2 x^5\right )}{x^2 (1+x)^2} \, dx-36 \int \frac {1}{x^2 (1+x)^3} \, dx+72 \int \frac {x^4}{(1+x)^3} \, dx+108 \int \frac {x}{(1+x)^3} \, dx+216 \int \frac {x^2}{(1+x)^3} \, dx+216 \int \frac {x^3}{(1+x)^3} \, dx\\ &=9 e^{2 x}-\frac {18}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}-18 \int \left (\frac {1}{x^3}-\frac {3}{x^2}+\frac {6}{x}-\frac {1}{(1+x)^3}-\frac {3}{(1+x)^2}-\frac {6}{1+x}\right ) \, dx-18 \int \left (2 e^x+\frac {e^x}{x^2}-\frac {e^x}{x}+2 e^x x-\frac {e^x}{(1+x)^2}+\frac {e^x}{1+x}\right ) \, dx-36 \int \left (\frac {1}{x^2}-\frac {3}{x}+\frac {1}{(1+x)^3}+\frac {2}{(1+x)^2}+\frac {3}{1+x}\right ) \, dx+72 \int \left (-3+x+\frac {1}{(1+x)^3}-\frac {4}{(1+x)^2}+\frac {6}{1+x}\right ) \, dx+216 \int \left (1-\frac {1}{(1+x)^3}+\frac {3}{(1+x)^2}-\frac {3}{1+x}\right ) \, dx+216 \int \left (\frac {1}{(1+x)^3}-\frac {2}{(1+x)^2}+\frac {1}{1+x}\right ) \, dx\\ &=9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-18 \int \frac {e^x}{x^2} \, dx+18 \int \frac {e^x}{x} \, dx+18 \int \frac {e^x}{(1+x)^2} \, dx-18 \int \frac {e^x}{1+x} \, dx-36 \int e^x \, dx-36 \int e^x x \, dx\\ &=-36 e^x+9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+\frac {18 e^x}{x}-36 e^x x+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-\frac {18 e^x}{1+x}+18 \text {Ei}(x)-\frac {18 \text {Ei}(1+x)}{e}-18 \int \frac {e^x}{x} \, dx+18 \int \frac {e^x}{1+x} \, dx+36 \int e^x \, dx\\ &=9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+\frac {18 e^x}{x}-36 e^x x+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-\frac {18 e^x}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 32, normalized size = 1.78 \begin {gather*} \frac {9 \left (1-2 x^2-2 x^3+e^x x (1+x)\right )^2}{x^2 (1+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-18 - 36*x + 36*x^3 + 108*x^4 + 216*x^5 + 216*x^6 + 72*x^7 + E^(2*x)*(18*x^3 + 54*x^4 + 54*x^5 + 18
*x^6) + E^x*(-18*x - 36*x^2 - 36*x^3 - 126*x^4 - 216*x^5 - 144*x^6 - 36*x^7))/(x^3 + 3*x^4 + 3*x^5 + x^6),x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.72, size = 88, normalized size = 4.89 \begin {gather*} \frac {9 \, {\left (4 \, x^{6} + 8 \, x^{5} + 4 \, x^{4} - 4 \, x^{3} - 4 \, x^{2} + {\left (x^{4} + 2 \, x^{3} + x^{2}\right )} e^{\left (2 \, x\right )} - 2 \, {\left (2 \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - x^{2} - x\right )} e^{x} + 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^6+54*x^5+54*x^4+18*x^3)*exp(x)^2+(-36*x^7-144*x^6-216*x^5-126*x^4-36*x^3-36*x^2-18*x)*exp(x)+
72*x^7+216*x^6+216*x^5+108*x^4+36*x^3-36*x-18)/(x^6+3*x^5+3*x^4+x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.18, size = 101, normalized size = 5.61 \begin {gather*} \frac {9 \, {\left (4 \, x^{6} - 4 \, x^{5} e^{x} + 8 \, x^{5} + x^{4} e^{\left (2 \, x\right )} - 8 \, x^{4} e^{x} + 4 \, x^{4} + 2 \, x^{3} e^{\left (2 \, x\right )} - 4 \, x^{3} e^{x} - 4 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + 2 \, x^{2} e^{x} - 4 \, x^{2} + 2 \, x e^{x} + 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^6+54*x^5+54*x^4+18*x^3)*exp(x)^2+(-36*x^7-144*x^6-216*x^5-126*x^4-36*x^3-36*x^2-18*x)*exp(x)+
72*x^7+216*x^6+216*x^5+108*x^4+36*x^3-36*x-18)/(x^6+3*x^5+3*x^4+x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.12, size = 58, normalized size = 3.22




method result size



default \(\frac {9}{\left (x +1\right )^{2}}-\frac {18}{x +1}+\frac {9}{x^{2}}-\frac {18}{x}+36 x^{2}-\frac {18 \,{\mathrm e}^{x}}{x +1}+9 \,{\mathrm e}^{2 x}-36 \,{\mathrm e}^{x} x +\frac {18 \,{\mathrm e}^{x}}{x}\) \(58\)
risch \(36 x^{2}+\frac {-36 x^{3}-36 x^{2}+9}{x^{2} \left (x^{2}+2 x +1\right )}+9 \,{\mathrm e}^{2 x}-\frac {18 \left (2 x^{3}+2 x^{2}-1\right ) {\mathrm e}^{x}}{\left (x +1\right ) x}\) \(63\)
norman \(\frac {9-108 x^{3}-72 x^{2}+72 x^{5}+36 x^{6}-36 x^{5} {\mathrm e}^{x}+18 \,{\mathrm e}^{x} x +18 \,{\mathrm e}^{x} x^{2}-36 \,{\mathrm e}^{x} x^{3}-72 \,{\mathrm e}^{x} x^{4}+9 \,{\mathrm e}^{2 x} x^{2}+18 \,{\mathrm e}^{2 x} x^{3}+9 \,{\mathrm e}^{2 x} x^{4}}{x^{2} \left (x +1\right )^{2}}\) \(92\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((18*x^6+54*x^5+54*x^4+18*x^3)*exp(x)^2+(-36*x^7-144*x^6-216*x^5-126*x^4-36*x^3-36*x^2-18*x)*exp(x)+72*x^7
+216*x^6+216*x^5+108*x^4+36*x^3-36*x-18)/(x^6+3*x^5+3*x^4+x^3),x,method=_RETURNVERBOSE)

[Out]

9/(x+1)^2-18/(x+1)+9/x^2-18/x+36*x^2-18*exp(x)/(x+1)+9*exp(x)^2-36*exp(x)*x+18*exp(x)/x

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 177, normalized size = 9.83 \begin {gather*} 36 \, x^{2} - \frac {9 \, {\left (12 \, x^{3} + 18 \, x^{2} + 4 \, x - 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} + \frac {18 \, {\left (6 \, x^{2} + 9 \, x + 2\right )}}{x^{3} + 2 \, x^{2} + x} + \frac {9 \, {\left ({\left (x^{2} + x\right )} e^{\left (2 \, x\right )} - 2 \, {\left (2 \, x^{3} + 2 \, x^{2} - 1\right )} e^{x}\right )}}{x^{2} + x} + \frac {36 \, {\left (8 \, x + 7\right )}}{x^{2} + 2 \, x + 1} - \frac {108 \, {\left (6 \, x + 5\right )}}{x^{2} + 2 \, x + 1} + \frac {108 \, {\left (4 \, x + 3\right )}}{x^{2} + 2 \, x + 1} - \frac {54 \, {\left (2 \, x + 1\right )}}{x^{2} + 2 \, x + 1} - \frac {18}{x^{2} + 2 \, x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^6+54*x^5+54*x^4+18*x^3)*exp(x)^2+(-36*x^7-144*x^6-216*x^5-126*x^4-36*x^3-36*x^2-18*x)*exp(x)+
72*x^7+216*x^6+216*x^5+108*x^4+36*x^3-36*x-18)/(x^6+3*x^5+3*x^4+x^3),x, algorithm="maxima")

[Out]

36*x^2 - 9*(12*x^3 + 18*x^2 + 4*x - 1)/(x^4 + 2*x^3 + x^2) + 18*(6*x^2 + 9*x + 2)/(x^3 + 2*x^2 + x) + 9*((x^2
+ x)*e^(2*x) - 2*(2*x^3 + 2*x^2 - 1)*e^x)/(x^2 + x) + 36*(8*x + 7)/(x^2 + 2*x + 1) - 108*(6*x + 5)/(x^2 + 2*x
+ 1) + 108*(4*x + 3)/(x^2 + 2*x + 1) - 54*(2*x + 1)/(x^2 + 2*x + 1) - 18/(x^2 + 2*x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 48, normalized size = 2.67 \begin {gather*} 9\,{\mathrm {e}}^{2\,x}-36\,x\,{\mathrm {e}}^x+36\,x^2+\frac {18\,x\,{\mathrm {e}}^x+x^2\,\left (18\,{\mathrm {e}}^x-36\right )-36\,x^3+9}{x^2\,{\left (x+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(2*x)*(18*x^3 + 54*x^4 + 54*x^5 + 18*x^6) - exp(x)*(18*x + 36*x^2 + 36*x^3 + 126*x^4 + 216*x^5 + 144*x
^6 + 36*x^7) - 36*x + 36*x^3 + 108*x^4 + 216*x^5 + 216*x^6 + 72*x^7 - 18)/(x^3 + 3*x^4 + 3*x^5 + x^6),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.22, size = 61, normalized size = 3.39 \begin {gather*} 36 x^{2} + \frac {- 36 x^{3} - 36 x^{2} + 9}{x^{4} + 2 x^{3} + x^{2}} + \frac {\left (9 x^{2} + 9 x\right ) e^{2 x} + \left (- 36 x^{3} - 36 x^{2} + 18\right ) e^{x}}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x**6+54*x**5+54*x**4+18*x**3)*exp(x)**2+(-36*x**7-144*x**6-216*x**5-126*x**4-36*x**3-36*x**2-18
*x)*exp(x)+72*x**7+216*x**6+216*x**5+108*x**4+36*x**3-36*x-18)/(x**6+3*x**5+3*x**4+x**3),x)

[Out]

36*x**2 + (-36*x**3 - 36*x**2 + 9)/(x**4 + 2*x**3 + x**2) + ((9*x**2 + 9*x)*exp(2*x) + (-36*x**3 - 36*x**2 + 1
8)*exp(x))/(x**2 + x)

________________________________________________________________________________________