3.46.46 \(\int \frac {4+4 x^2+e^x (7 x^2-x^3)}{x^2} \, dx\)

Optimal. Leaf size=24 \[ -e^x x+4 \left (4+2 e^x-\frac {1}{x}+x+\log (2)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 21, normalized size of antiderivative = 0.88, number of steps used = 6, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {14, 2176, 2194} \begin {gather*} e^x (7-x)+e^x+4 x-\frac {4}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4 + 4*x^2 + E^x*(7*x^2 - x^3))/x^2,x]

[Out]

E^x + E^x*(7 - x) - 4/x + 4*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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

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]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(4 + 4*x^2 + E^x*(7*x^2 - x^3))/x^2,x]

[Out]

-(E^x*(-8 + x)) - 4/x + 4*x

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 22, normalized size = 0.92 \begin {gather*} \frac {4 \, x^{2} - {\left (x^{2} - 8 \, x\right )} e^{x} - 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*x^2 - (x^2 - 8*x)*e^x - 4)/x

________________________________________________________________________________________

giac [A]  time = 0.21, size = 23, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e^{x} - 4 \, x^{2} - 8 \, x e^{x} + 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^2*e^x - 4*x^2 - 8*x*e^x + 4)/x

________________________________________________________________________________________

maple [A]  time = 0.02, size = 18, normalized size = 0.75




method result size



risch \(4 x -\frac {4}{x}+\left (8-x \right ) {\mathrm e}^{x}\) \(18\)
default \(4 x -\frac {4}{x}-{\mathrm e}^{x} x +8 \,{\mathrm e}^{x}\) \(19\)
norman \(\frac {-4+4 x^{2}+8 \,{\mathrm e}^{x} x -{\mathrm e}^{x} x^{2}}{x}\) \(24\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x-4/x+(8-x)*exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 20, normalized size = 0.83 \begin {gather*} -{\left (x - 1\right )} e^{x} + 4 \, x - \frac {4}{x} + 7 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x - 1)*e^x + 4*x - 4/x + 7*e^x

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 17, normalized size = 0.71 \begin {gather*} 8\,{\mathrm {e}}^x-x\,\left ({\mathrm {e}}^x-4\right )-\frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(7*x^2 - x^3) + 4*x^2 + 4)/x^2,x)

[Out]

8*exp(x) - x*(exp(x) - 4) - 4/x

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 12, normalized size = 0.50 \begin {gather*} 4 x + \left (8 - x\right ) e^{x} - \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**3+7*x**2)*exp(x)+4*x**2+4)/x**2,x)

[Out]

4*x + (8 - x)*exp(x) - 4/x

________________________________________________________________________________________