3.20.54 \(\int \frac {45-5 x+18 x^2-e (-9+x) x^2-2 x^3+e^x (9 x^2-x^3)}{-9 x^2+x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 17, normalized size of antiderivative = 0.74, number of steps used = 7, number of rules used = 4, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.078, Rules used = {1593, 6688, 14, 2194} \begin {gather*} -((2+e) x)-e^x+\frac {5}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 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 \frac {45-5 x+18 x^2-e (-9+x) x^2-2 x^3+e^x \left (9 x^2-x^3\right )}{(-9+x) x^2} \, dx\\ &=\int \frac {-5-\left (2+e+e^x\right ) x^2}{x^2} \, dx\\ &=\int \left (-e^x+\frac {-5-(2+e) x^2}{x^2}\right ) \, dx\\ &=-\int e^x \, dx+\int \frac {-5-(2+e) x^2}{x^2} \, dx\\ &=-e^x+\int \left (-2 \left (1+\frac {e}{2}\right )-\frac {5}{x^2}\right ) \, dx\\ &=-e^x+\frac {5}{x}-(2+e) x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 17, normalized size = 0.74 \begin {gather*} -e^x+\frac {5}{x}-(2+e) x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.29, size = 22, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e + 2 \, x^{2} + x e^{x} - 5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2*exp(log(x-9)+1)+(-x^3+9*x^2)*exp(x)-2*x^3+18*x^2-5*x+45)/(x^3-9*x^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 22, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e + 2 \, x^{2} + x e^{x} - 5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2*exp(log(x-9)+1)+(-x^3+9*x^2)*exp(x)-2*x^3+18*x^2-5*x+45)/(x^3-9*x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.36, size = 19, normalized size = 0.83




method result size



risch \(-x \,{\mathrm e}-2 x +\frac {5}{x}-{\mathrm e}^{x}\) \(19\)
norman \(\frac {5+\left (-{\mathrm e}-2\right ) x^{2}-{\mathrm e}^{x} x}{x}\) \(22\)
default \(-{\mathrm e}^{\ln \left (x -9\right )+1}-2 x +\frac {5}{x}-{\mathrm e}^{x}\) \(23\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2*exp(ln(x-9)+1)+(-x^3+9*x^2)*exp(x)-2*x^3+18*x^2-5*x+45)/(x^3-9*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -{\left (x + 9 \, \log \left (x - 9\right )\right )} e - 9 \, e^{9} E_{1}\left (-x + 9\right ) + 9 \, e \log \left (x - 9\right ) - 2 \, x - \frac {x e^{x}}{x - 9} + \frac {5}{x} - 9 \, \int \frac {e^{x}}{x^{2} - 18 \, x + 81}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2*exp(log(x-9)+1)+(-x^3+9*x^2)*exp(x)-2*x^3+18*x^2-5*x+45)/(x^3-9*x^2),x, algorithm="maxima")

[Out]

-(x + 9*log(x - 9))*e - 9*e^9*exp_integral_e(1, -x + 9) + 9*e*log(x - 9) - 2*x - x*e^x/(x - 9) + 5/x - 9*integ
rate(e^x/(x^2 - 18*x + 81), x)

________________________________________________________________________________________

mupad [B]  time = 1.15, size = 17, normalized size = 0.74 \begin {gather*} \frac {5}{x}-x\,\left (\mathrm {e}+2\right )-{\mathrm {e}}^x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x - exp(x)*(9*x^2 - x^3) + x^2*exp(log(x - 9) + 1) - 18*x^2 + 2*x^3 - 45)/(9*x^2 - x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 12, normalized size = 0.52 \begin {gather*} - x \left (2 + e\right ) - e^{x} + \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2*exp(ln(x-9)+1)+(-x**3+9*x**2)*exp(x)-2*x**3+18*x**2-5*x+45)/(x**3-9*x**2),x)

[Out]

-x*(2 + E) - exp(x) + 5/x

________________________________________________________________________________________