3.19.95 \(\int \frac {-392+112 x-8 x^2+e^{\frac {-6 x+x^2}{-7+x}} (-42 x^3+14 x^4-x^5)}{49 x^3-14 x^4+x^5} \, dx\)

Optimal. Leaf size=26 \[ -e^{x-\frac {x}{7-x}}+\frac {4}{x^2}-\log (18) \]

________________________________________________________________________________________

Rubi [A]  time = 0.77, antiderivative size = 24, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 4, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.068, Rules used = {1594, 27, 6742, 6706} \begin {gather*} \frac {4}{x^2}-e^{\frac {(6-x) x}{7-x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-392 + 112*x - 8*x^2 + E^((-6*x + x^2)/(-7 + x))*(-42*x^3 + 14*x^4 - x^5))/(49*x^3 - 14*x^4 + x^5),x]

[Out]

-E^(((6 - x)*x)/(7 - x)) + 4/x^2

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 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 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, 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 {-392+112 x-8 x^2+e^{\frac {-6 x+x^2}{-7+x}} \left (-42 x^3+14 x^4-x^5\right )}{x^3 \left (49-14 x+x^2\right )} \, dx\\ &=\int \frac {-392+112 x-8 x^2+e^{\frac {-6 x+x^2}{-7+x}} \left (-42 x^3+14 x^4-x^5\right )}{(-7+x)^2 x^3} \, dx\\ &=\int \left (-\frac {8}{x^3}-\frac {e^{\frac {(-6+x) x}{-7+x}} \left (42-14 x+x^2\right )}{(-7+x)^2}\right ) \, dx\\ &=\frac {4}{x^2}-\int \frac {e^{\frac {(-6+x) x}{-7+x}} \left (42-14 x+x^2\right )}{(-7+x)^2} \, dx\\ &=-e^{\frac {(6-x) x}{7-x}}+\frac {4}{x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 20, normalized size = 0.77 \begin {gather*} -e^{1+\frac {7}{-7+x}+x}+\frac {4}{x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-392 + 112*x - 8*x^2 + E^((-6*x + x^2)/(-7 + x))*(-42*x^3 + 14*x^4 - x^5))/(49*x^3 - 14*x^4 + x^5),
x]

[Out]

-E^(1 + 7/(-7 + x) + x) + 4/x^2

________________________________________________________________________________________

fricas [A]  time = 0.94, size = 25, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e^{\left (\frac {x^{2} - 6 \, x}{x - 7}\right )} - 4}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^5+14*x^4-42*x^3)*exp((x^2-6*x)/(x-7))-8*x^2+112*x-392)/(x^5-14*x^4+49*x^3),x, algorithm="fricas
")

[Out]

-(x^2*e^((x^2 - 6*x)/(x - 7)) - 4)/x^2

________________________________________________________________________________________

giac [A]  time = 0.29, size = 25, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e^{\left (\frac {x^{2} - 6 \, x}{x - 7}\right )} - 4}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^5+14*x^4-42*x^3)*exp((x^2-6*x)/(x-7))-8*x^2+112*x-392)/(x^5-14*x^4+49*x^3),x, algorithm="giac")

[Out]

-(x^2*e^((x^2 - 6*x)/(x - 7)) - 4)/x^2

________________________________________________________________________________________

maple [A]  time = 0.12, size = 20, normalized size = 0.77




method result size



risch \(\frac {4}{x^{2}}-{\mathrm e}^{\frac {x \left (x -6\right )}{x -7}}\) \(20\)
norman \(\frac {-28+4 x +7 x^{2} {\mathrm e}^{\frac {x^{2}-6 x}{x -7}}-x^{3} {\mathrm e}^{\frac {x^{2}-6 x}{x -7}}}{x^{2} \left (x -7\right )}\) \(53\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^5+14*x^4-42*x^3)*exp((x^2-6*x)/(x-7))-8*x^2+112*x-392)/(x^5-14*x^4+49*x^3),x,method=_RETURNVERBOSE)

[Out]

4/x^2-exp(x*(x-6)/(x-7))

________________________________________________________________________________________

maxima [B]  time = 0.61, size = 60, normalized size = 2.31 \begin {gather*} \frac {4 \, {\left (6 \, x^{2} - 21 \, x - 49\right )}}{7 \, {\left (x^{3} - 7 \, x^{2}\right )}} - \frac {16 \, {\left (2 \, x - 7\right )}}{7 \, {\left (x^{2} - 7 \, x\right )}} + \frac {8}{7 \, {\left (x - 7\right )}} - e^{\left (x + \frac {7}{x - 7} + 1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^5+14*x^4-42*x^3)*exp((x^2-6*x)/(x-7))-8*x^2+112*x-392)/(x^5-14*x^4+49*x^3),x, algorithm="maxima
")

[Out]

4/7*(6*x^2 - 21*x - 49)/(x^3 - 7*x^2) - 16/7*(2*x - 7)/(x^2 - 7*x) + 8/7/(x - 7) - e^(x + 7/(x - 7) + 1)

________________________________________________________________________________________

mupad [B]  time = 1.23, size = 27, normalized size = 1.04 \begin {gather*} \frac {4}{x^2}-{\mathrm {e}}^{-\frac {6\,x}{x-7}}\,{\mathrm {e}}^{\frac {x^2}{x-7}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-(6*x - x^2)/(x - 7))*(42*x^3 - 14*x^4 + x^5) - 112*x + 8*x^2 + 392)/(49*x^3 - 14*x^4 + x^5),x)

[Out]

4/x^2 - exp(-(6*x)/(x - 7))*exp(x^2/(x - 7))

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 15, normalized size = 0.58 \begin {gather*} - e^{\frac {x^{2} - 6 x}{x - 7}} + \frac {4}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**5+14*x**4-42*x**3)*exp((x**2-6*x)/(x-7))-8*x**2+112*x-392)/(x**5-14*x**4+49*x**3),x)

[Out]

-exp((x**2 - 6*x)/(x - 7)) + 4/x**2

________________________________________________________________________________________