\(\int \frac {x+x^2+2 x^3+e^{15-3 x} (-1-3 x+x^2-3 x^3)}{x^2} \, dx\) [7993]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 35, antiderivative size = 24 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=\log \left (e^{x+\left (e^{3 (5-x)}+x\right ) \left (\frac {1}{x}+x\right )} x\right ) \]

[Out]

ln(exp(x+(x+exp(15-3*x))*(x+1/x))*x)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12, number of steps used = 12, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {14, 2230, 2225, 2208, 2209, 2207} \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=x^2+e^{15-3 x} x+x+\frac {e^{15-3 x}}{x}+\log (x) \]

[In]

Int[(x + x^2 + 2*x^3 + E^(15 - 3*x)*(-1 - 3*x + x^2 - 3*x^3))/x^2,x]

[Out]

E^(15 - 3*x)/x + x + E^(15 - 3*x)*x + x^2 + Log[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 2207

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] &&  !TrueQ[$UseGamma]

Rule 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

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]

Rule 2230

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] &&  !TrueQ[$UseGamma]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1+x+2 x^2}{x}-\frac {e^{15-3 x} \left (1+3 x-x^2+3 x^3\right )}{x^2}\right ) \, dx \\ & = \int \frac {1+x+2 x^2}{x} \, dx-\int \frac {e^{15-3 x} \left (1+3 x-x^2+3 x^3\right )}{x^2} \, dx \\ & = \int \left (1+\frac {1}{x}+2 x\right ) \, dx-\int \left (-e^{15-3 x}+\frac {e^{15-3 x}}{x^2}+\frac {3 e^{15-3 x}}{x}+3 e^{15-3 x} x\right ) \, dx \\ & = x+x^2+\log (x)-3 \int \frac {e^{15-3 x}}{x} \, dx-3 \int e^{15-3 x} x \, dx+\int e^{15-3 x} \, dx-\int \frac {e^{15-3 x}}{x^2} \, dx \\ & = -\frac {1}{3} e^{15-3 x}+\frac {e^{15-3 x}}{x}+x+e^{15-3 x} x+x^2-3 e^{15} \operatorname {ExpIntegralEi}(-3 x)+\log (x)+3 \int \frac {e^{15-3 x}}{x} \, dx-\int e^{15-3 x} \, dx \\ & = \frac {e^{15-3 x}}{x}+x+e^{15-3 x} x+x^2+\log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=\frac {e^{15-3 x}}{x}+x+e^{15-3 x} x+x^2+\log (x) \]

[In]

Integrate[(x + x^2 + 2*x^3 + E^(15 - 3*x)*(-1 - 3*x + x^2 - 3*x^3))/x^2,x]

[Out]

E^(15 - 3*x)/x + x + E^(15 - 3*x)*x + x^2 + Log[x]

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96

method result size
risch \(\ln \left (x \right )+x^{2}+x +\frac {\left (x^{2}+1\right ) {\mathrm e}^{15-3 x}}{x}\) \(23\)
norman \(\frac {x^{2}+x^{3}+{\mathrm e}^{15-3 x} x^{2}+{\mathrm e}^{15-3 x}}{x}+\ln \left (x \right )\) \(31\)
parallelrisch \(\frac {{\mathrm e}^{15-3 x} x^{2}+x^{3}+x \ln \left (x \right )+x^{2}+{\mathrm e}^{15-3 x}}{x}\) \(32\)
parts \(\ln \left (x \right )+x^{2}+x +\frac {{\mathrm e}^{15-3 x}}{x}+5 \,{\mathrm e}^{15-3 x}-\frac {{\mathrm e}^{15-3 x} \left (15-3 x \right )}{3}\) \(39\)
derivativedivides \(\ln \left (-3 x \right )-55+11 x +\frac {\left (15-3 x \right )^{2}}{9}+\frac {{\mathrm e}^{15-3 x}}{x}+5 \,{\mathrm e}^{15-3 x}-\frac {{\mathrm e}^{15-3 x} \left (15-3 x \right )}{3}\) \(50\)
default \(\ln \left (-3 x \right )-55+11 x +\frac {\left (15-3 x \right )^{2}}{9}+\frac {{\mathrm e}^{15-3 x}}{x}+5 \,{\mathrm e}^{15-3 x}-\frac {{\mathrm e}^{15-3 x} \left (15-3 x \right )}{3}\) \(50\)

[In]

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

[Out]

ln(x)+x^2+x+1/x*(x^2+1)*exp(15-3*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=\frac {x^{3} + x^{2} + {\left (x^{2} + 1\right )} e^{\left (-3 \, x + 15\right )} + x \log \left (x\right )}{x} \]

[In]

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

[Out]

(x^3 + x^2 + (x^2 + 1)*e^(-3*x + 15) + x*log(x))/x

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=x^{2} + x + \log {\left (x \right )} + \frac {\left (x^{2} + 1\right ) e^{15 - 3 x}}{x} \]

[In]

integrate(((-3*x**3+x**2-3*x-1)*exp(15-3*x)+2*x**3+x**2+x)/x**2,x)

[Out]

x**2 + x + log(x) + (x**2 + 1)*exp(15 - 3*x)/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.21 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.92 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=x^{2} - 3 \, {\rm Ei}\left (-3 \, x\right ) e^{15} + \frac {1}{3} \, {\left (3 \, x e^{15} + e^{15}\right )} e^{\left (-3 \, x\right )} + 3 \, e^{15} \Gamma \left (-1, 3 \, x\right ) + x - \frac {1}{3} \, e^{\left (-3 \, x + 15\right )} + \log \left (x\right ) \]

[In]

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

[Out]

x^2 - 3*Ei(-3*x)*e^15 + 1/3*(3*x*e^15 + e^15)*e^(-3*x) + 3*e^15*gamma(-1, 3*x) + x - 1/3*e^(-3*x + 15) + log(x
)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.29 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=\frac {x^{3} + x^{2} e^{\left (-3 \, x + 15\right )} + x^{2} + x \log \left (x\right ) + e^{\left (-3 \, x + 15\right )}}{x} \]

[In]

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

[Out]

(x^3 + x^2*e^(-3*x + 15) + x^2 + x*log(x) + e^(-3*x + 15))/x

Mupad [B] (verification not implemented)

Time = 12.96 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.25 \[ \int \frac {x+x^2+2 x^3+e^{15-3 x} \left (-1-3 x+x^2-3 x^3\right )}{x^2} \, dx=\ln \left (x\right )+\frac {{\mathrm {e}}^{15-3\,x}+x^2\,{\mathrm {e}}^{15-3\,x}+x^2+x^3}{x} \]

[In]

int((x - exp(15 - 3*x)*(3*x - x^2 + 3*x^3 + 1) + x^2 + 2*x^3)/x^2,x)

[Out]

log(x) + (exp(15 - 3*x) + x^2*exp(15 - 3*x) + x^2 + x^3)/x