\(\int \frac {4-4 x^2+6 x^3-8 x^5+e^x (-x^3+x^4+x^5-x^6)+(-x^3+x^5) \log (-x+x^3)}{-x^5+x^7} \, dx\) [129]

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

Optimal result

Integrand size = 68, antiderivative size = 28 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=\frac {1}{x^4}+\frac {5-e^x-x-\log \left (-x+x^3\right )}{x} \]

[Out]

1/x^4+(5-ln(x^3-x)-exp(x)-x)/x

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.18, number of steps used = 16, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {1607, 6857, 2228, 213, 272, 46, 331, 2605, 464} \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=\frac {1}{x^4}-\frac {\log \left (-x \left (1-x^2\right )\right )}{x}-\frac {e^x}{x}+\frac {5}{x} \]

[In]

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

[Out]

x^(-4) + 5/x - E^x/x - Log[-(x*(1 - x^2))]/x

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 272

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

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

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 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 2605

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[(d + e*x)^(m +
 1)*((a + b*Log[c*RFx^p])^n/(e*(m + 1))), x] - Dist[b*n*(p/(e*(m + 1))), Int[SimplifyIntegrand[(d + e*x)^(m +
1)*(a + b*Log[c*RFx^p])^(n - 1)*(D[RFx, x]/RFx), x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

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

Mathematica [C] (verified)

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

Time = 0.20 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.79 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=\frac {1}{x^4}-\frac {1}{x}-\frac {e^x}{x}+6 \text {arctanh}(x)+\frac {6 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},x^2\right )}{x}-\frac {\log \left (x \left (-1+x^2\right )\right )}{x} \]

[In]

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

[Out]

x^(-4) - x^(-1) - E^x/x + 6*ArcTanh[x] + (6*Hypergeometric2F1[-1/2, 1, 1/2, x^2])/x - Log[x*(-1 + x^2)]/x

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07

method result size
default \(-\frac {\ln \left (x^{3}-x \right )}{x}+\frac {5}{x}-\frac {{\mathrm e}^{x}}{x}+\frac {1}{x^{4}}\) \(30\)
parts \(-\frac {\ln \left (x^{3}-x \right )}{x}+\frac {5}{x}-\frac {{\mathrm e}^{x}}{x}+\frac {1}{x^{4}}\) \(30\)
parallelrisch \(\frac {2-2 \,{\mathrm e}^{x} x^{3}-2 \ln \left (x^{3}-x \right ) x^{3}+10 x^{3}}{2 x^{4}}\) \(33\)
risch \(-\frac {\ln \left (x^{2}-1\right )}{x}-\frac {-i \pi \,x^{3} \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i \left (x^{2}-1\right )\right ) \operatorname {csgn}\left (i x \left (x^{2}-1\right )\right )+i \pi \,x^{3} \operatorname {csgn}\left (i x \right ) {\operatorname {csgn}\left (i x \left (x^{2}-1\right )\right )}^{2}+i \pi \,x^{3} \operatorname {csgn}\left (i \left (x^{2}-1\right )\right ) {\operatorname {csgn}\left (i x \left (x^{2}-1\right )\right )}^{2}-i \pi \,x^{3} {\operatorname {csgn}\left (i x \left (x^{2}-1\right )\right )}^{3}+2 \,{\mathrm e}^{x} x^{3}+2 x^{3} \ln \left (x \right )-10 x^{3}-2}{2 x^{4}}\) \(141\)

[In]

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

[Out]

-1/x*ln(x^3-x)+5/x-exp(x)/x+1/x^4

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=-\frac {x^{3} e^{x} + x^{3} \log \left (x^{3} - x\right ) - 5 \, x^{3} - 1}{x^{4}} \]

[In]

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

[Out]

-(x^3*e^x + x^3*log(x^3 - x) - 5*x^3 - 1)/x^4

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=- \frac {e^{x}}{x} - \frac {\log {\left (x^{3} - x \right )}}{x} - \frac {- 5 x^{3} - 1}{x^{4}} \]

[In]

integrate(((x**5-x**3)*ln(x**3-x)+(-x**6+x**5+x**4-x**3)*exp(x)-8*x**5+6*x**3-4*x**2+4)/(x**7-x**5),x)

[Out]

-exp(x)/x - log(x**3 - x)/x - (-5*x**3 - 1)/x**4

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (22) = 44\).

Time = 0.23 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.14 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=-\frac {{\left (x + 1\right )} \log \left (x + 1\right ) - {\left (x - 1\right )} \log \left (x - 1\right ) + e^{x} + \log \left (x\right ) + 1}{x} + \frac {6}{x} - \frac {2}{x^{2}} + \frac {2 \, x^{2} + 1}{x^{4}} + \log \left (x + 1\right ) - \log \left (x - 1\right ) \]

[In]

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

[Out]

-((x + 1)*log(x + 1) - (x - 1)*log(x - 1) + e^x + log(x) + 1)/x + 6/x - 2/x^2 + (2*x^2 + 1)/x^4 + log(x + 1) -
 log(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=-\frac {x^{3} e^{x} + x^{3} \log \left (x^{3} - x\right ) - 5 \, x^{3} - 1}{x^{4}} \]

[In]

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

[Out]

-(x^3*e^x + x^3*log(x^3 - x) - 5*x^3 - 1)/x^4

Mupad [B] (verification not implemented)

Time = 8.19 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{-x^5+x^7} \, dx=-\frac {x^3\,{\mathrm {e}}^x+x^3\,\ln \left (x^3-x\right )-5\,x^3-1}{x^4} \]

[In]

int((log(x^3 - x)*(x^3 - x^5) + exp(x)*(x^3 - x^4 - x^5 + x^6) + 4*x^2 - 6*x^3 + 8*x^5 - 4)/(x^5 - x^7),x)

[Out]

-(x^3*exp(x) + x^3*log(x^3 - x) - 5*x^3 - 1)/x^4