3.33.81 \(\int \frac {e^{3/x} (-3+x)-17 x+6 x^2+e^x (-12 x-12 x^2)+e^{2 x} (-2 x-4 x^2)}{x} \, dx\)

Optimal. Leaf size=30 \[ -\left (\left (-1-e^{3/x}+2 \left (\left (3+e^x\right )^2-x\right )-x\right ) x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 48, normalized size of antiderivative = 1.60, number of steps used = 9, number of rules used = 4, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {14, 2176, 2194, 2288} \begin {gather*} 3 x^2+e^{3/x} x-17 x+12 e^x+e^{2 x}-12 e^x (x+1)-e^{2 x} (2 x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

12*E^x + E^(2*x) - 17*x + E^(3/x)*x + 3*x^2 - 12*E^x*(1 + x) - E^(2*x)*(1 + 2*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]

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 32, normalized size = 1.07 \begin {gather*} -17 x+e^{3/x} x-12 e^x x-2 e^{2 x} x+3 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-17*x + E^(3/x)*x - 12*E^x*x - 2*E^(2*x)*x + 3*x^2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*x^2 - 2*x*e^(2*x) - 12*x*e^x + x*e^(3/x) - 17*x

________________________________________________________________________________________

giac [A]  time = 0.23, size = 29, normalized size = 0.97 \begin {gather*} 3 \, x^{2} - 2 \, x e^{\left (2 \, x\right )} - 12 \, x e^{x} + x e^{\frac {3}{x}} - 17 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*x^2 - 2*x*e^(2*x) - 12*x*e^x + x*e^(3/x) - 17*x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 30, normalized size = 1.00




method result size



default \(x \,{\mathrm e}^{\frac {3}{x}}-17 x +3 x^{2}-2 x \,{\mathrm e}^{2 x}-12 \,{\mathrm e}^{x} x\) \(30\)
norman \(x \,{\mathrm e}^{\frac {3}{x}}-17 x +3 x^{2}-2 x \,{\mathrm e}^{2 x}-12 \,{\mathrm e}^{x} x\) \(30\)
risch \(x \,{\mathrm e}^{\frac {3}{x}}-17 x +3 x^{2}-2 x \,{\mathrm e}^{2 x}-12 \,{\mathrm e}^{x} x\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-17*x+exp(1/x)^3*x+3*x^2-2*x*exp(x)^2-12*exp(x)*x

________________________________________________________________________________________

maxima [C]  time = 0.50, size = 54, normalized size = 1.80 \begin {gather*} 3 \, x^{2} - {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - 12 \, {\left (x - 1\right )} e^{x} - 17 \, x + 3 \, {\rm Ei}\left (\frac {3}{x}\right ) - e^{\left (2 \, x\right )} - 12 \, e^{x} - 3 \, \Gamma \left (-1, -\frac {3}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*x^2 - (2*x - 1)*e^(2*x) - 12*(x - 1)*e^x - 17*x + 3*Ei(3/x) - e^(2*x) - 12*e^x - 3*gamma(-1, -3/x)

________________________________________________________________________________________

mupad [B]  time = 1.96, size = 26, normalized size = 0.87 \begin {gather*} -x\,\left (2\,{\mathrm {e}}^{2\,x}-3\,x-{\mathrm {e}}^{3/x}+12\,{\mathrm {e}}^x+17\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(17*x + exp(2*x)*(2*x + 4*x^2) + exp(x)*(12*x + 12*x^2) - exp(3/x)*(x - 3) - 6*x^2)/x,x)

[Out]

-x*(2*exp(2*x) - 3*x - exp(3/x) + 12*exp(x) + 17)

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 29, normalized size = 0.97 \begin {gather*} 3 x^{2} + x e^{\frac {3}{x}} - 2 x e^{2 x} - 12 x e^{x} - 17 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x**2-2*x)*exp(x)**2+(-12*x**2-12*x)*exp(x)+(x-3)*exp(3/x)+6*x**2-17*x)/x,x)

[Out]

3*x**2 + x*exp(3/x) - 2*x*exp(2*x) - 12*x*exp(x) - 17*x

________________________________________________________________________________________