3.8.4 \(\int \frac {-9-3 e^5+6 x-x^2}{9-6 x+x^2} \, dx\)

Optimal. Leaf size=17 \[ 6+\frac {3 e^5}{-3+x}-x+\log (25) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 16, normalized size of antiderivative = 0.94, number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {27, 683} \begin {gather*} -x-\frac {3 e^5}{3-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-9 - 3*E^5 + 6*x - x^2)/(9 - 6*x + x^2),x]

[Out]

(-3*E^5)/(3 - x) - 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 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9-3 e^5+6 x-x^2}{(-3+x)^2} \, dx\\ &=\int \left (-1-\frac {3 e^5}{(-3+x)^2}\right ) \, dx\\ &=-\frac {3 e^5}{3-x}-x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 14, normalized size = 0.82 \begin {gather*} \frac {3 e^5}{-3+x}-x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-9 - 3*E^5 + 6*x - x^2)/(9 - 6*x + x^2),x]

[Out]

(3*E^5)/(-3 + x) - x

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 18, normalized size = 1.06 \begin {gather*} -\frac {x^{2} - 3 \, x - 3 \, e^{5}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*exp(5)-x^2+6*x-9)/(x^2-6*x+9),x, algorithm="fricas")

[Out]

-(x^2 - 3*x - 3*e^5)/(x - 3)

________________________________________________________________________________________

giac [A]  time = 0.25, size = 13, normalized size = 0.76 \begin {gather*} -x + \frac {3 \, e^{5}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*exp(5)-x^2+6*x-9)/(x^2-6*x+9),x, algorithm="giac")

[Out]

-x + 3*e^5/(x - 3)

________________________________________________________________________________________

maple [A]  time = 0.20, size = 14, normalized size = 0.82




method result size



default \(-x +\frac {3 \,{\mathrm e}^{5}}{x -3}\) \(14\)
risch \(-x +\frac {3 \,{\mathrm e}^{5}}{x -3}\) \(14\)
gosper \(\frac {-x^{2}+3 \,{\mathrm e}^{5}+9}{x -3}\) \(18\)
meijerg \(\frac {x}{1-\frac {x}{3}}-\frac {{\mathrm e}^{5} x}{3 \left (1-\frac {x}{3}\right )}-\frac {x \left (-x +6\right )}{3 \left (1-\frac {x}{3}\right )}\) \(38\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-3*exp(5)-x^2+6*x-9)/(x^2-6*x+9),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 13, normalized size = 0.76 \begin {gather*} -x + \frac {3 \, e^{5}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*exp(5)-x^2+6*x-9)/(x^2-6*x+9),x, algorithm="maxima")

[Out]

-x + 3*e^5/(x - 3)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 13, normalized size = 0.76 \begin {gather*} \frac {3\,{\mathrm {e}}^5}{x-3}-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*exp(5))/(x - 3) - x

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 8, normalized size = 0.47 \begin {gather*} - x + \frac {3 e^{5}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________