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

Optimal. Leaf size=21 \[ -3+e^{-3+\frac {9}{x}}-e^{\frac {2}{5}+x}+x \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 20, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 3, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {14, 2194, 2209} \begin {gather*} x+e^{\frac {9}{x}-3}-e^{x+\frac {2}{5}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-3 + 9/x) - E^(2/5 + x) + 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 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 2209

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 20, normalized size = 0.95 \begin {gather*} e^{-3+\frac {9}{x}}-e^{\frac {2}{5}+x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-3 + 9/x) - E^(2/5 + x) + x

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 17, normalized size = 0.81 \begin {gather*} x - e^{\left (x + \frac {2}{5}\right )} + e^{\left (-\frac {3 \, {\left (x - 3\right )}}{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 16, normalized size = 0.76 \begin {gather*} x - e^{\left (x + \frac {2}{5}\right )} + e^{\left (\frac {9}{x} - 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - e^(x + 2/5) + e^(9/x - 3)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 18, normalized size = 0.86




method result size



default \(x -{\mathrm e}^{x} {\mathrm e}^{\frac {2}{5}}+{\mathrm e}^{\frac {9}{x}} {\mathrm e}^{-3}\) \(18\)
risch \(x -{\mathrm e}^{x +\frac {2}{5}}+{\mathrm e}^{-\frac {3 \left (x -3\right )}{x}}\) \(18\)
norman \(\frac {x^{2}+x \,{\mathrm e}^{\frac {-3 x +9}{x}}-x \,{\mathrm e}^{x +\frac {2}{5}}}{x}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 16, normalized size = 0.76 \begin {gather*} x - e^{\left (x + \frac {2}{5}\right )} + e^{\left (\frac {9}{x} - 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - e^(x + 2/5) + e^(9/x - 3)

________________________________________________________________________________________

mupad [B]  time = 4.16, size = 17, normalized size = 0.81 \begin {gather*} x+{\mathrm {e}}^{-3}\,{\mathrm {e}}^{9/x}-{\mathrm {e}}^{2/5}\,{\mathrm {e}}^x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.28, size = 15, normalized size = 0.71 \begin {gather*} x + e^{\frac {9 - 3 x}{x}} - e^{x + \frac {2}{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________