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

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

Optimal result

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

[Out]

exp(x)-ln(1/2/x-x)+exp(3)

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1607, 6820, 2225, 457, 78} \[ \int \frac {-1-2 x^2+e^x \left (-x+2 x^3\right )}{-x+2 x^3} \, dx=-\log \left (1-2 x^2\right )+e^x+\log (x) \]

[In]

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

[Out]

E^x + Log[x] - Log[1 - 2*x^2]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

E^x + Log[x] - Log[1 - 2*x^2]

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67

method result size
parallelrisch \({\mathrm e}^{x}+\ln \left (x \right )-\ln \left (x^{2}-\frac {1}{2}\right )\) \(14\)
default \(-\ln \left (2 x^{2}-1\right )+\ln \left (x \right )+{\mathrm e}^{x}\) \(16\)
norman \(-\ln \left (2 x^{2}-1\right )+\ln \left (x \right )+{\mathrm e}^{x}\) \(16\)
risch \(-\ln \left (2 x^{2}-1\right )+\ln \left (x \right )+{\mathrm e}^{x}\) \(16\)
parts \(-\ln \left (2 x^{2}-1\right )+\ln \left (x \right )+{\mathrm e}^{x}\) \(16\)

[In]

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

[Out]

exp(x)+ln(x)-ln(x^2-1/2)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

e^x - log(2*x^2 - 1) + log(x)

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

exp(x) + log(x) - log(2*x**2 - 1)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

e^x - log(2*x^2 - 1) + log(x)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

e^x - log(2*x^2 - 1) + log(x)

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

exp(x) - log(x^2 - 1/2) + log(x)