\(\int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx\) [1890]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 131 \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {1}{4} \left (a-i \sqrt {3} a\right ) \log \left (-i x+\sqrt {3} x-2 i \sqrt [3]{-x+x^3}\right )+\frac {1}{4} \left (a+i \sqrt {3} a\right ) \log \left (i x+\sqrt {3} x+2 i \sqrt [3]{-x+x^3}\right )-\frac {1}{2} a \log \left (-x+\sqrt [3]{-x+x^3}\right ) \]

[Out]

-3/4*b*(x^3-x)^(2/3)/x^2+1/4*(a-I*3^(1/2)*a)*ln(-I*x+x*3^(1/2)-2*I*(x^3-x)^(1/3))+1/4*(a+I*3^(1/2)*a)*ln(I*x+x
*3^(1/2)+2*I*(x^3-x)^(1/3))-1/2*a*ln(-x+(x^3-x)^(1/3))

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {2063, 2036, 335, 281, 245} \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\frac {\sqrt {3} a \sqrt [3]{x} \sqrt [3]{x^2-1} \arctan \left (\frac {\frac {2 x^{2/3}}{\sqrt [3]{x^2-1}}+1}{\sqrt {3}}\right )}{2 \sqrt [3]{x^3-x}}-\frac {3 a \sqrt [3]{x} \sqrt [3]{x^2-1} \log \left (x^{2/3}-\sqrt [3]{x^2-1}\right )}{4 \sqrt [3]{x^3-x}}-\frac {3 b \left (x^3-x\right )^{2/3}}{4 x^2} \]

[In]

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

[Out]

(-3*b*(-x + x^3)^(2/3))/(4*x^2) + (Sqrt[3]*a*x^(1/3)*(-1 + x^2)^(1/3)*ArcTan[(1 + (2*x^(2/3))/(-1 + x^2)^(1/3)
)/Sqrt[3]])/(2*(-x + x^3)^(1/3)) - (3*a*x^(1/3)*(-1 + x^2)^(1/3)*Log[x^(2/3) - (-1 + x^2)^(1/3)])/(4*(-x + x^3
)^(1/3))

Rule 245

Int[((a_) + (b_.)*(x_)^3)^(-1/3), x_Symbol] :> Simp[ArcTan[(1 + 2*Rt[b, 3]*(x/(a + b*x^3)^(1/3)))/Sqrt[3]]/(Sq
rt[3]*Rt[b, 3]), x] - Simp[Log[(a + b*x^3)^(1/3) - Rt[b, 3]*x]/(2*Rt[b, 3]), x] /; FreeQ[{a, b}, x]

Rule 281

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

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2036

Int[((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Dist[(a*x^j + b*x^n)^FracPart[p]/(x^(j*FracPart[p
])*(a + b*x^(n - j))^FracPart[p]), Int[x^(j*p)*(a + b*x^(n - j))^p, x], x] /; FreeQ[{a, b, j, n, p}, x] &&  !I
ntegerQ[p] && NeQ[n, j] && PosQ[n - j]

Rule 2063

Int[((e_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(jn_.))^(p_)*((c_) + (d_.)*(x_)^(n_.)), x_Symbol] :> Sim
p[c*e^(j - 1)*(e*x)^(m - j + 1)*((a*x^j + b*x^(j + n))^(p + 1)/(a*(m + j*p + 1))), x] + Dist[(a*d*(m + j*p + 1
) - b*c*(m + n + p*(j + n) + 1))/(a*e^n*(m + j*p + 1)), Int[(e*x)^(m + n)*(a*x^j + b*x^(j + n))^p, x], x] /; F
reeQ[{a, b, c, d, e, j, p}, x] && EqQ[jn, j + n] &&  !IntegerQ[p] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && (LtQ[m
+ j*p, -1] || (IntegersQ[m - 1/2, p - 1/2] && LtQ[p, 0] && LtQ[m, (-n)*p - 1])) && (GtQ[e, 0] || IntegersQ[j,
n]) && NeQ[m + j*p + 1, 0] && NeQ[m - n + j*p + 1, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+a \int \frac {1}{\sqrt [3]{-x+x^3}} \, dx \\ & = -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \int \frac {1}{\sqrt [3]{x} \sqrt [3]{-1+x^2}} \, dx}{\sqrt [3]{-x+x^3}} \\ & = -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (3 a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \text {Subst}\left (\int \frac {x}{\sqrt [3]{-1+x^6}} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{-x+x^3}} \\ & = -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (3 a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{-1+x^3}} \, dx,x,x^{2/3}\right )}{2 \sqrt [3]{-x+x^3}} \\ & = -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\sqrt {3} a \sqrt [3]{x} \sqrt [3]{-1+x^2} \arctan \left (\frac {1+\frac {2 x^{2/3}}{\sqrt [3]{-1+x^2}}}{\sqrt {3}}\right )}{2 \sqrt [3]{-x+x^3}}-\frac {3 a \sqrt [3]{x} \sqrt [3]{-1+x^2} \log \left (x^{2/3}-\sqrt [3]{-1+x^2}\right )}{4 \sqrt [3]{-x+x^3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.33 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.24 \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\frac {3 b-3 b x^2+2 \sqrt {3} a x^{4/3} \sqrt [3]{-1+x^2} \arctan \left (\frac {\sqrt {3} x^{2/3}}{x^{2/3}+2 \sqrt [3]{-1+x^2}}\right )-2 a x^{4/3} \sqrt [3]{-1+x^2} \log \left (-x^{2/3}+\sqrt [3]{-1+x^2}\right )+a x^{4/3} \sqrt [3]{-1+x^2} \log \left (x^{4/3}+x^{2/3} \sqrt [3]{-1+x^2}+\left (-1+x^2\right )^{2/3}\right )}{4 x \sqrt [3]{x \left (-1+x^2\right )}} \]

[In]

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

[Out]

(3*b - 3*b*x^2 + 2*Sqrt[3]*a*x^(4/3)*(-1 + x^2)^(1/3)*ArcTan[(Sqrt[3]*x^(2/3))/(x^(2/3) + 2*(-1 + x^2)^(1/3))]
 - 2*a*x^(4/3)*(-1 + x^2)^(1/3)*Log[-x^(2/3) + (-1 + x^2)^(1/3)] + a*x^(4/3)*(-1 + x^2)^(1/3)*Log[x^(4/3) + x^
(2/3)*(-1 + x^2)^(1/3) + (-1 + x^2)^(2/3)])/(4*x*(x*(-1 + x^2))^(1/3))

Maple [C] (warning: unable to verify)

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

Time = 0.98 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.42

method result size
risch \(-\frac {3 b \left (x^{2}-1\right )}{4 x {\left (x \left (x^{2}-1\right )\right )}^{\frac {1}{3}}}+\frac {3 a {\left (-\operatorname {signum}\left (x^{2}-1\right )\right )}^{\frac {1}{3}} x^{\frac {2}{3}} \operatorname {hypergeom}\left (\left [\frac {1}{3}, \frac {1}{3}\right ], \left [\frac {4}{3}\right ], x^{2}\right )}{2 \operatorname {signum}\left (x^{2}-1\right )^{\frac {1}{3}}}\) \(55\)
meijerg \(\frac {3 a {\left (-\operatorname {signum}\left (x^{2}-1\right )\right )}^{\frac {1}{3}} x^{\frac {2}{3}} \operatorname {hypergeom}\left (\left [\frac {1}{3}, \frac {1}{3}\right ], \left [\frac {4}{3}\right ], x^{2}\right )}{2 \operatorname {signum}\left (x^{2}-1\right )^{\frac {1}{3}}}+\frac {3 b {\left (-\operatorname {signum}\left (x^{2}-1\right )\right )}^{\frac {1}{3}} \left (-x^{2}+1\right )^{\frac {2}{3}}}{4 \operatorname {signum}\left (x^{2}-1\right )^{\frac {1}{3}} x^{\frac {4}{3}}}\) \(68\)
pseudoelliptic \(\frac {-3 b \left (x^{3}-x \right )^{\frac {2}{3}}-2 \left (\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x +2 \left (x^{3}-x \right )^{\frac {1}{3}}\right )}{3 x}\right )-\frac {\ln \left (\frac {x^{2}+x \left (x^{3}-x \right )^{\frac {1}{3}}+\left (x^{3}-x \right )^{\frac {2}{3}}}{x^{2}}\right )}{2}+\ln \left (\frac {-x +\left (x^{3}-x \right )^{\frac {1}{3}}}{x}\right )\right ) x^{2} a}{4 x^{2}}\) \(101\)
trager \(-\frac {3 b \left (x^{3}-x \right )^{\frac {2}{3}}}{4 x^{2}}+\frac {a \left (72 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \ln \left (803520 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}+162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}+162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x +151272 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}-3214080 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+5355 \left (x^{3}-x \right )^{\frac {2}{3}}+5355 x \left (x^{3}-x \right )^{\frac {1}{3}}+5510 x^{2}-192168 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-1653\right )-72 \ln \left (803520 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}-162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}-162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x -173592 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}-3214080 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+7611 \left (x^{3}-x \right )^{\frac {2}{3}}+7611 x \left (x^{3}-x \right )^{\frac {1}{3}}+7766 x^{2}+281448 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-4942\right ) \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+\ln \left (803520 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}-162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}-162432 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x -173592 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}-3214080 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+7611 \left (x^{3}-x \right )^{\frac {2}{3}}+7611 x \left (x^{3}-x \right )^{\frac {1}{3}}+7766 x^{2}+281448 \operatorname {RootOf}\left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-4942\right )\right )}{2}\) \(461\)

[In]

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

[Out]

-3/4*b*(x^2-1)/x/(x*(x^2-1))^(1/3)+3/2*a/signum(x^2-1)^(1/3)*(-signum(x^2-1))^(1/3)*x^(2/3)*hypergeom([1/3,1/3
],[4/3],x^2)

Fricas [A] (verification not implemented)

none

Time = 0.88 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.85 \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\frac {2 \, \sqrt {3} a x^{2} \arctan \left (-\frac {44032959556 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {1}{3}} x + \sqrt {3} {\left (16754327161 \, x^{2} - 2707204793\right )} - 10524305234 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {2}{3}}}{81835897185 \, x^{2} - 1102302937}\right ) - a x^{2} \log \left (-3 \, {\left (x^{3} - x\right )}^{\frac {1}{3}} x + 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}} + 1\right ) - 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}} b}{4 \, x^{2}} \]

[In]

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

[Out]

1/4*(2*sqrt(3)*a*x^2*arctan(-(44032959556*sqrt(3)*(x^3 - x)^(1/3)*x + sqrt(3)*(16754327161*x^2 - 2707204793) -
 10524305234*sqrt(3)*(x^3 - x)^(2/3))/(81835897185*x^2 - 1102302937)) - a*x^2*log(-3*(x^3 - x)^(1/3)*x + 3*(x^
3 - x)^(2/3) + 1) - 3*(x^3 - x)^(2/3)*b)/x^2

Sympy [F]

\[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\int \frac {a x^{2} - b}{x^{2} \sqrt [3]{x \left (x - 1\right ) \left (x + 1\right )}}\, dx \]

[In]

integrate((a*x**2-b)/x**2/(x**3-x)**(1/3),x)

[Out]

Integral((a*x**2 - b)/(x**2*(x*(x - 1)*(x + 1))**(1/3)), x)

Maxima [F]

\[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\int { \frac {a x^{2} - b}{{\left (x^{3} - x\right )}^{\frac {1}{3}} x^{2}} \,d x } \]

[In]

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

[Out]

integrate((a*x^2 - b)/((x^3 - x)^(1/3)*x^2), x)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.60 \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=-\frac {1}{2} \, \sqrt {3} a \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} + 1\right )}\right ) + \frac {1}{4} \, a \log \left ({\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {2}{3}} + {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} + 1\right ) - \frac {1}{2} \, a \log \left ({\left | {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} - 1 \right |}\right ) - \frac {3}{4} \, b {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {2}{3}} \]

[In]

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

[Out]

-1/2*sqrt(3)*a*arctan(1/3*sqrt(3)*(2*(-1/x^2 + 1)^(1/3) + 1)) + 1/4*a*log((-1/x^2 + 1)^(2/3) + (-1/x^2 + 1)^(1
/3) + 1) - 1/2*a*log(abs((-1/x^2 + 1)^(1/3) - 1)) - 3/4*b*(-1/x^2 + 1)^(2/3)

Mupad [B] (verification not implemented)

Time = 5.73 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.35 \[ \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx=\frac {3\,a\,x\,{\left (1-x^2\right )}^{1/3}\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{3},\frac {1}{3};\ \frac {4}{3};\ x^2\right )}{2\,{\left (x^3-x\right )}^{1/3}}-\frac {3\,b\,{\left (x^3-x\right )}^{2/3}}{4\,x^2} \]

[In]

int(-(b - a*x^2)/(x^2*(x^3 - x)^(1/3)),x)

[Out]

(3*a*x*(1 - x^2)^(1/3)*hypergeom([1/3, 1/3], 4/3, x^2))/(2*(x^3 - x)^(1/3)) - (3*b*(x^3 - x)^(2/3))/(4*x^2)