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

Optimal. Leaf size=36 \[ -e^2 \left (x+\left (e^x-x\right ) x^2\right )+3 \left (-x+\frac {10 e^x+x}{x}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 34, normalized size of antiderivative = 0.94, number of steps used = 12, number of rules used = 6, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {14, 2199, 2177, 2178, 2176, 2194} \begin {gather*} e^2 x^3-e^{x+2} x^2-\left (3+e^2\right ) x+\frac {30 e^x}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(30*E^x)/x - (3 + E^2)*x - E^(2 + x)*x^2 + E^2*x^3

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 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$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]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 35, normalized size = 0.97 \begin {gather*} \frac {30 e^x}{x}-3 x-e^2 x-e^{2+x} x^2+e^2 x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(30*E^x)/x - 3*x - E^2*x - E^(2 + x)*x^2 + E^2*x^3

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 35, normalized size = 0.97 \begin {gather*} -\frac {3 \, x^{2} - {\left (x^{4} - x^{2}\right )} e^{2} + {\left (x^{3} e^{2} - 30\right )} e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(3*x^2 - (x^4 - x^2)*e^2 + (x^3*e^2 - 30)*e^x)/x

________________________________________________________________________________________

giac [A]  time = 0.24, size = 36, normalized size = 1.00 \begin {gather*} \frac {x^{4} e^{2} - x^{3} e^{\left (x + 2\right )} - x^{2} e^{2} - 3 \, x^{2} + 30 \, e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^4*e^2 - x^3*e^(x + 2) - x^2*e^2 - 3*x^2 + 30*e^x)/x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 31, normalized size = 0.86




method result size



risch \(x^{3} {\mathrm e}^{2}-{\mathrm e}^{2} x -3 x -\frac {\left (x^{3} {\mathrm e}^{2}-30\right ) {\mathrm e}^{x}}{x}\) \(31\)
norman \(\frac {x^{4} {\mathrm e}^{2}+\left (-{\mathrm e}^{2}-3\right ) x^{2}-x^{3} {\mathrm e}^{2} {\mathrm e}^{x}+30 \,{\mathrm e}^{x}}{x}\) \(35\)
default \(-3 x +x^{3} {\mathrm e}^{2}+\frac {30 \,{\mathrm e}^{x}}{x}-2 \,{\mathrm e}^{2} \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )-{\mathrm e}^{2} \left ({\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{x}\right )-{\mathrm e}^{2} x\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3*exp(2)-exp(2)*x-3*x-(x^3*exp(2)-30)/x*exp(x)

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 59, normalized size = 1.64 \begin {gather*} x^{3} e^{2} - x e^{2} - {\left (x^{2} e^{2} - 2 \, x e^{2} + 2 \, e^{2}\right )} e^{x} - 2 \, {\left (x e^{2} - e^{2}\right )} e^{x} - 3 \, x + 30 \, {\rm Ei}\relax (x) - 30 \, \Gamma \left (-1, -x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3*e^2 - x*e^2 - (x^2*e^2 - 2*x*e^2 + 2*e^2)*e^x - 2*(x*e^2 - e^2)*e^x - 3*x + 30*Ei(x) - 30*gamma(-1, -x)

________________________________________________________________________________________

mupad [B]  time = 5.02, size = 30, normalized size = 0.83 \begin {gather*} \frac {30\,{\mathrm {e}}^x}{x}-x^2\,{\mathrm {e}}^{x+2}-x\,\left ({\mathrm {e}}^2+3\right )+x^3\,{\mathrm {e}}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(30*exp(x))/x - x^2*exp(x + 2) - x*(exp(2) + 3) + x^3*exp(2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**3*exp(2) + x*(-exp(2) - 3) + (-x**3*exp(2) + 30)*exp(x)/x

________________________________________________________________________________________