3.81.14 \(\int \frac {-25+9 x^2-5 e^x x^2}{5 x^2} \, dx\) [8014]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 16, normalized size of antiderivative = 0.84, number of steps used = 6, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {12, 14, 2225} \begin {gather*} \frac {9 x}{5}-e^x+\frac {5}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2225

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]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 14, normalized size = 0.74

method result size
default \(\frac {9 x}{5}+\frac {5}{x}-{\mathrm e}^{x}\) \(14\)
risch \(\frac {9 x}{5}+\frac {5}{x}-{\mathrm e}^{x}\) \(14\)
norman \(\frac {5+\frac {9 x^{2}}{5}-{\mathrm e}^{x} x}{x}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 13, normalized size = 0.68 \begin {gather*} \frac {9}{5} \, x + \frac {5}{x} - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

9/5*x + 5/x - e^x

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 17, normalized size = 0.89 \begin {gather*} \frac {9 \, x^{2} - 5 \, x e^{x} + 25}{5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*(9*x^2 - 5*x*e^x + 25)/x

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 10, normalized size = 0.53 \begin {gather*} \frac {9 x}{5} - e^{x} + \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 17, normalized size = 0.89 \begin {gather*} \frac {9 \, x^{2} - 5 \, x e^{x} + 25}{5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*(9*x^2 - 5*x*e^x + 25)/x

________________________________________________________________________________________

Mupad [B]
time = 4.96, size = 13, normalized size = 0.68 \begin {gather*} \frac {9\,x}{5}-{\mathrm {e}}^x+\frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________