3.7.95 \(\int \frac {-36 x^2-60 x^3-37 x^4-10 x^5-x^6+e^x (-12-8 x+6 x^2+8 x^3+2 x^4+e^2 (-12-8 x+5 x^2+5 x^3+x^4))}{36 x^2+60 x^3+37 x^4+10 x^5+x^6} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 1.65, antiderivative size = 45, normalized size of antiderivative = 1.45, number of steps used = 14, number of rules used = 4, integrand size = 99, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {6688, 6742, 2177, 2178} \begin {gather*} -x+\frac {e^x}{x+2}-\frac {\left (4+e^2\right ) e^x}{3 (x+3)}+\frac {\left (1+e^2\right ) e^x}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-36*x^2 - 60*x^3 - 37*x^4 - 10*x^5 - x^6 + E^x*(-12 - 8*x + 6*x^2 + 8*x^3 + 2*x^4 + E^2*(-12 - 8*x + 5*x^
2 + 5*x^3 + x^4)))/(36*x^2 + 60*x^3 + 37*x^4 + 10*x^5 + x^6),x]

[Out]

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

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 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, 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 {e^{2+x} (2+x)^2 \left (-3+x+x^2\right )-x^2 \left (6+5 x+x^2\right )^2+2 e^x \left (-6-4 x+3 x^2+4 x^3+x^4\right )}{x^2 \left (6+5 x+x^2\right )^2} \, dx\\ &=\int \left (-1+\frac {e^x \left (-12 \left (1+e^2\right )-8 \left (1+e^2\right ) x+\left (6+5 e^2\right ) x^2+\left (8+5 e^2\right ) x^3+\left (2+e^2\right ) x^4\right )}{x^2 (2+x)^2 (3+x)^2}\right ) \, dx\\ &=-x+\int \frac {e^x \left (-12 \left (1+e^2\right )-8 \left (1+e^2\right ) x+\left (6+5 e^2\right ) x^2+\left (8+5 e^2\right ) x^3+\left (2+e^2\right ) x^4\right )}{x^2 (2+x)^2 (3+x)^2} \, dx\\ &=-x+\int \left (\frac {e^x \left (-1-e^2\right )}{3 x^2}+\frac {e^x \left (1+e^2\right )}{3 x}-\frac {e^x}{(2+x)^2}+\frac {e^x}{2+x}+\frac {e^x \left (4+e^2\right )}{3 (3+x)^2}+\frac {e^x \left (-4-e^2\right )}{3 (3+x)}\right ) \, dx\\ &=-x+\frac {1}{3} \left (-4-e^2\right ) \int \frac {e^x}{3+x} \, dx+\frac {1}{3} \left (-1-e^2\right ) \int \frac {e^x}{x^2} \, dx+\frac {1}{3} \left (1+e^2\right ) \int \frac {e^x}{x} \, dx+\frac {1}{3} \left (4+e^2\right ) \int \frac {e^x}{(3+x)^2} \, dx-\int \frac {e^x}{(2+x)^2} \, dx+\int \frac {e^x}{2+x} \, dx\\ &=\frac {e^x \left (1+e^2\right )}{3 x}-x+\frac {e^x}{2+x}-\frac {e^x \left (4+e^2\right )}{3 (3+x)}+\frac {1}{3} \left (1+e^2\right ) \text {Ei}(x)+\frac {\text {Ei}(2+x)}{e^2}-\frac {\left (4+e^2\right ) \text {Ei}(3+x)}{3 e^3}+\frac {1}{3} \left (-1-e^2\right ) \int \frac {e^x}{x} \, dx+\frac {1}{3} \left (4+e^2\right ) \int \frac {e^x}{3+x} \, dx-\int \frac {e^x}{2+x} \, dx\\ &=\frac {e^x \left (1+e^2\right )}{3 x}-x+\frac {e^x}{2+x}-\frac {e^x \left (4+e^2\right )}{3 (3+x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.34, size = 45, normalized size = 1.45 \begin {gather*} \frac {e^x \left (1+e^2\right )}{3 x}-x+\frac {e^x}{2+x}-\frac {e^x \left (4+e^2\right )}{3 (3+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-36*x^2 - 60*x^3 - 37*x^4 - 10*x^5 - x^6 + E^x*(-12 - 8*x + 6*x^2 + 8*x^3 + 2*x^4 + E^2*(-12 - 8*x
+ 5*x^2 + 5*x^3 + x^4)))/(36*x^2 + 60*x^3 + 37*x^4 + 10*x^5 + x^6),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.94, size = 45, normalized size = 1.45 \begin {gather*} -\frac {x^{4} + 5 \, x^{3} + 6 \, x^{2} - {\left ({\left (x + 2\right )} e^{2} + 2 \, x + 2\right )} e^{x}}{x^{3} + 5 \, x^{2} + 6 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x^4+5*x^3+5*x^2-8*x-12)*exp(2)+2*x^4+8*x^3+6*x^2-8*x-12)*exp(x)-x^6-10*x^5-37*x^4-60*x^3-36*x^2)/
(x^6+10*x^5+37*x^4+60*x^3+36*x^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.28, size = 52, normalized size = 1.68 \begin {gather*} -\frac {x^{4} + 5 \, x^{3} + 6 \, x^{2} - x e^{\left (x + 2\right )} - 2 \, x e^{x} - 2 \, e^{\left (x + 2\right )} - 2 \, e^{x}}{x^{3} + 5 \, x^{2} + 6 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x^4+5*x^3+5*x^2-8*x-12)*exp(2)+2*x^4+8*x^3+6*x^2-8*x-12)*exp(x)-x^6-10*x^5-37*x^4-60*x^3-36*x^2)/
(x^6+10*x^5+37*x^4+60*x^3+36*x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.12, size = 34, normalized size = 1.10




method result size



risch \(-x +\frac {\left ({\mathrm e}^{2} x +2 \,{\mathrm e}^{2}+2 x +2\right ) {\mathrm e}^{x}}{x \left (x^{2}+5 x +6\right )}\) \(34\)
norman \(\frac {19 x^{2}+30 x +\left (2 \,{\mathrm e}^{2}+2\right ) {\mathrm e}^{x}+\left ({\mathrm e}^{2}+2\right ) x \,{\mathrm e}^{x}-x^{4}}{x \left (x^{2}+5 x +6\right )}\) \(46\)
default \({\mathrm e}^{2} \left (8 \,{\mathrm e}^{-2} \expIntegralEi \left (1, -x -2\right )-\frac {4 \,{\mathrm e}^{x}}{2+x}-\frac {9 \,{\mathrm e}^{x}}{3+x}-21 \,{\mathrm e}^{-3} \expIntegralEi \left (1, -3-x \right )\right )-x +\frac {{\mathrm e}^{x}}{2+x}-\frac {4 \,{\mathrm e}^{x}}{3 \left (3+x \right )}+\frac {{\mathrm e}^{x}}{3 x}-12 \,{\mathrm e}^{2} \left (\frac {\expIntegralEi \left (1, -x \right )}{54}-\frac {{\mathrm e}^{x}}{4 \left (2+x \right )}-\frac {{\mathrm e}^{x}}{9 \left (3+x \right )}-\frac {11 \,{\mathrm e}^{-3} \expIntegralEi \left (1, -3-x \right )}{27}-\frac {{\mathrm e}^{x}}{36 x}\right )-8 \,{\mathrm e}^{2} \left (-\frac {\expIntegralEi \left (1, -x \right )}{36}-\frac {{\mathrm e}^{-2} \expIntegralEi \left (1, -x -2\right )}{4}+\frac {{\mathrm e}^{x}}{2 x +4}+\frac {{\mathrm e}^{x}}{3 x +9}+\frac {10 \,{\mathrm e}^{-3} \expIntegralEi \left (1, -3-x \right )}{9}\right )+5 \,{\mathrm e}^{2} \left ({\mathrm e}^{-2} \expIntegralEi \left (1, -x -2\right )-\frac {{\mathrm e}^{x}}{2+x}-\frac {{\mathrm e}^{x}}{3+x}-3 \,{\mathrm e}^{-3} \expIntegralEi \left (1, -3-x \right )\right )+5 \,{\mathrm e}^{2} \left (-3 \,{\mathrm e}^{-2} \expIntegralEi \left (1, -x -2\right )+\frac {2 \,{\mathrm e}^{x}}{2+x}+\frac {3 \,{\mathrm e}^{x}}{3+x}+8 \,{\mathrm e}^{-3} \expIntegralEi \left (1, -3-x \right )\right )\) \(262\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((x^4+5*x^3+5*x^2-8*x-12)*exp(2)+2*x^4+8*x^3+6*x^2-8*x-12)*exp(x)-x^6-10*x^5-37*x^4-60*x^3-36*x^2)/(x^6+1
0*x^5+37*x^4+60*x^3+36*x^2),x,method=_RETURNVERBOSE)

[Out]

-x+(exp(2)*x+2*exp(2)+2*x+2)/x/(x^2+5*x+6)*exp(x)

________________________________________________________________________________________

maxima [B]  time = 0.75, size = 117, normalized size = 3.77 \begin {gather*} -x + \frac {{\left (x {\left (e^{2} + 2\right )} + 2 \, e^{2} + 2\right )} e^{x}}{x^{3} + 5 \, x^{2} + 6 \, x} + \frac {97 \, x + 210}{x^{2} + 5 \, x + 6} - \frac {10 \, {\left (35 \, x + 78\right )}}{x^{2} + 5 \, x + 6} + \frac {37 \, {\left (13 \, x + 30\right )}}{x^{2} + 5 \, x + 6} - \frac {60 \, {\left (5 \, x + 12\right )}}{x^{2} + 5 \, x + 6} + \frac {36 \, {\left (2 \, x + 5\right )}}{x^{2} + 5 \, x + 6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x^4+5*x^3+5*x^2-8*x-12)*exp(2)+2*x^4+8*x^3+6*x^2-8*x-12)*exp(x)-x^6-10*x^5-37*x^4-60*x^3-36*x^2)/
(x^6+10*x^5+37*x^4+60*x^3+36*x^2),x, algorithm="maxima")

[Out]

-x + (x*(e^2 + 2) + 2*e^2 + 2)*e^x/(x^3 + 5*x^2 + 6*x) + (97*x + 210)/(x^2 + 5*x + 6) - 10*(35*x + 78)/(x^2 +
5*x + 6) + 37*(13*x + 30)/(x^2 + 5*x + 6) - 60*(5*x + 12)/(x^2 + 5*x + 6) + 36*(2*x + 5)/(x^2 + 5*x + 6)

________________________________________________________________________________________

mupad [B]  time = 0.66, size = 37, normalized size = 1.19 \begin {gather*} \frac {{\mathrm {e}}^x\,\left (2\,{\mathrm {e}}^2+2\right )+x\,{\mathrm {e}}^x\,\left ({\mathrm {e}}^2+2\right )}{x^3+5\,x^2+6\,x}-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(36*x^2 - exp(x)*(exp(2)*(5*x^2 - 8*x + 5*x^3 + x^4 - 12) - 8*x + 6*x^2 + 8*x^3 + 2*x^4 - 12) + 60*x^3 +
37*x^4 + 10*x^5 + x^6)/(36*x^2 + 60*x^3 + 37*x^4 + 10*x^5 + x^6),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 31, normalized size = 1.00 \begin {gather*} - x + \frac {\left (2 x + x e^{2} + 2 + 2 e^{2}\right ) e^{x}}{x^{3} + 5 x^{2} + 6 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x**4+5*x**3+5*x**2-8*x-12)*exp(2)+2*x**4+8*x**3+6*x**2-8*x-12)*exp(x)-x**6-10*x**5-37*x**4-60*x**
3-36*x**2)/(x**6+10*x**5+37*x**4+60*x**3+36*x**2),x)

[Out]

-x + (2*x + x*exp(2) + 2 + 2*exp(2))*exp(x)/(x**3 + 5*x**2 + 6*x)

________________________________________________________________________________________