3.12.9 \(\int \frac {-288-152 x+65 x^2+20 x^3-5 x^4+e^{x-x^2} (-64+96 x+76 x^2-20 x^3-9 x^4+2 x^5)}{64+32 x-12 x^2-4 x^3+x^4} \, dx\)

Optimal. Leaf size=32 \[ -e^{x-x^2}-\frac {4}{-4+x}-5 x+\frac {x}{2 (2+x)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 33, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 5, integrand size = 76, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.066, Rules used = {6688, 2236, 1660, 967, 8} \begin {gather*} -e^{x-x^2}+\frac {5 x+4}{-x^2+2 x+8}-5 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-288 - 152*x + 65*x^2 + 20*x^3 - 5*x^4 + E^(x - x^2)*(-64 + 96*x + 76*x^2 - 20*x^3 - 9*x^4 + 2*x^5))/(64
+ 32*x - 12*x^2 - 4*x^3 + x^4),x]

[Out]

-E^(x - x^2) - 5*x + (4 + 5*x)/(8 + 2*x - x^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 967

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[(c/f)
^p, Int[(d + e*x + f*x^2)^(p + q), x], x] /; FreeQ[{a, b, c, d, e, f, p, q}, x] && EqQ[c*d - a*f, 0] && EqQ[b*
d - a*e, 0] && (IntegerQ[p] || GtQ[c/f, 0]) && ( !IntegerQ[q] || LeafCount[d + e*x + f*x^2] <= LeafCount[a + b
*x + c*x^2])

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 2236

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

Rule 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (e^{x-x^2} (-1+2 x)+\frac {-288-152 x+65 x^2+20 x^3-5 x^4}{\left (-8-2 x+x^2\right )^2}\right ) \, dx\\ &=\int e^{x-x^2} (-1+2 x) \, dx+\int \frac {-288-152 x+65 x^2+20 x^3-5 x^4}{\left (-8-2 x+x^2\right )^2} \, dx\\ &=-e^{x-x^2}+\frac {4+5 x}{8+2 x-x^2}-\frac {1}{36} \int \frac {-1440-360 x+180 x^2}{-8-2 x+x^2} \, dx\\ &=-e^{x-x^2}+\frac {4+5 x}{8+2 x-x^2}-5 \int 1 \, dx\\ &=-e^{x-x^2}-5 x+\frac {4+5 x}{8+2 x-x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 31, normalized size = 0.97 \begin {gather*} -e^{x-x^2}-5 x+\frac {-4-5 x}{-8-2 x+x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-288 - 152*x + 65*x^2 + 20*x^3 - 5*x^4 + E^(x - x^2)*(-64 + 96*x + 76*x^2 - 20*x^3 - 9*x^4 + 2*x^5)
)/(64 + 32*x - 12*x^2 - 4*x^3 + x^4),x]

[Out]

-E^(x - x^2) - 5*x + (-4 - 5*x)/(-8 - 2*x + x^2)

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 44, normalized size = 1.38 \begin {gather*} -\frac {5 \, x^{3} - 10 \, x^{2} + {\left (x^{2} - 2 \, x - 8\right )} e^{\left (-x^{2} + x\right )} - 35 \, x + 4}{x^{2} - 2 \, x - 8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-9*x^4-20*x^3+76*x^2+96*x-64)*exp(-x^2+x)-5*x^4+20*x^3+65*x^2-152*x-288)/(x^4-4*x^3-12*x^2+32
*x+64),x, algorithm="fricas")

[Out]

-(5*x^3 - 10*x^2 + (x^2 - 2*x - 8)*e^(-x^2 + x) - 35*x + 4)/(x^2 - 2*x - 8)

________________________________________________________________________________________

giac [B]  time = 0.39, size = 60, normalized size = 1.88 \begin {gather*} -\frac {5 \, x^{3} + x^{2} e^{\left (-x^{2} + x\right )} - 10 \, x^{2} - 2 \, x e^{\left (-x^{2} + x\right )} - 35 \, x - 8 \, e^{\left (-x^{2} + x\right )} + 4}{x^{2} - 2 \, x - 8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-9*x^4-20*x^3+76*x^2+96*x-64)*exp(-x^2+x)-5*x^4+20*x^3+65*x^2-152*x-288)/(x^4-4*x^3-12*x^2+32
*x+64),x, algorithm="giac")

[Out]

-(5*x^3 + x^2*e^(-x^2 + x) - 10*x^2 - 2*x*e^(-x^2 + x) - 35*x - 8*e^(-x^2 + x) + 4)/(x^2 - 2*x - 8)

________________________________________________________________________________________

maple [A]  time = 0.16, size = 29, normalized size = 0.91




method result size



default \(-{\mathrm e}^{-x^{2}+x}-\frac {1}{2+x}-\frac {4}{x -4}-5 x\) \(29\)
risch \(-5 x +\frac {-5 x -4}{x^{2}-2 x -8}-{\mathrm e}^{-x \left (x -1\right )}\) \(30\)
norman \(\frac {55 x -5 x^{3}+2 \,{\mathrm e}^{-x^{2}+x} x -{\mathrm e}^{-x^{2}+x} x^{2}+8 \,{\mathrm e}^{-x^{2}+x}+76}{x^{2}-2 x -8}\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^5-9*x^4-20*x^3+76*x^2+96*x-64)*exp(-x^2+x)-5*x^4+20*x^3+65*x^2-152*x-288)/(x^4-4*x^3-12*x^2+32*x+64)
,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.56, size = 95, normalized size = 2.97 \begin {gather*} -5 \, x + \frac {20 \, {\left (17 \, x + 28\right )}}{9 \, {\left (x^{2} - 2 \, x - 8\right )}} - \frac {40 \, {\left (7 \, x + 20\right )}}{9 \, {\left (x^{2} - 2 \, x - 8\right )}} - \frac {65 \, {\left (5 \, x + 4\right )}}{9 \, {\left (x^{2} - 2 \, x - 8\right )}} + \frac {76 \, {\left (x + 8\right )}}{9 \, {\left (x^{2} - 2 \, x - 8\right )}} + \frac {16 \, {\left (x - 1\right )}}{x^{2} - 2 \, x - 8} - e^{\left (-x^{2} + x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-9*x^4-20*x^3+76*x^2+96*x-64)*exp(-x^2+x)-5*x^4+20*x^3+65*x^2-152*x-288)/(x^4-4*x^3-12*x^2+32
*x+64),x, algorithm="maxima")

[Out]

-5*x + 20/9*(17*x + 28)/(x^2 - 2*x - 8) - 40/9*(7*x + 20)/(x^2 - 2*x - 8) - 65/9*(5*x + 4)/(x^2 - 2*x - 8) + 7
6/9*(x + 8)/(x^2 - 2*x - 8) + 16*(x - 1)/(x^2 - 2*x - 8) - e^(-x^2 + x)

________________________________________________________________________________________

mupad [B]  time = 0.97, size = 32, normalized size = 1.00 \begin {gather*} \frac {5\,x+4}{-x^2+2\,x+8}-{\mathrm {e}}^{x-x^2}-5\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(152*x - 65*x^2 - 20*x^3 + 5*x^4 - exp(x - x^2)*(96*x + 76*x^2 - 20*x^3 - 9*x^4 + 2*x^5 - 64) + 288)/(32*
x - 12*x^2 - 4*x^3 + x^4 + 64),x)

[Out]

(5*x + 4)/(2*x - x^2 + 8) - exp(x - x^2) - 5*x

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 24, normalized size = 0.75 \begin {gather*} - 5 x - \frac {5 x + 4}{x^{2} - 2 x - 8} - e^{- x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**5-9*x**4-20*x**3+76*x**2+96*x-64)*exp(-x**2+x)-5*x**4+20*x**3+65*x**2-152*x-288)/(x**4-4*x**3
-12*x**2+32*x+64),x)

[Out]

-5*x - (5*x + 4)/(x**2 - 2*x - 8) - exp(-x**2 + x)

________________________________________________________________________________________