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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 336, normalized size of antiderivative = 1.11, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2067, 477, 476, 494, 245, 384} \[ \int \frac {x^2}{\left (-b+a x^2\right ) \sqrt [3]{-x+x^3}} \, dx=\frac {\sqrt {3} \sqrt [3]{b} \sqrt [3]{x} \sqrt [3]{x^2-1} \arctan \left (\frac {1-\frac {2 x^{2/3} \sqrt [3]{a-b}}{\sqrt [3]{b} \sqrt [3]{x^2-1}}}{\sqrt {3}}\right )}{2 a \sqrt [3]{x^3-x} \sqrt [3]{a-b}}+\frac {\sqrt {3} \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 a \sqrt [3]{x^3-x}}+\frac {\sqrt [3]{b} \sqrt [3]{x} \sqrt [3]{x^2-1} \log \left (b-a x^2\right )}{4 a \sqrt [3]{x^3-x} \sqrt [3]{a-b}}-\frac {3 \sqrt [3]{b} \sqrt [3]{x} \sqrt [3]{x^2-1} \log \left (x^{2/3} \sqrt [3]{a-b}+\sqrt [3]{b} \sqrt [3]{x^2-1}\right )}{4 a \sqrt [3]{x^3-x} \sqrt [3]{a-b}}-\frac {3 \sqrt [3]{x} \sqrt [3]{x^2-1} \log \left (x^{2/3}-\sqrt [3]{x^2-1}\right )}{4 a \sqrt [3]{x^3-x}} \]

[In]

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

[Out]

(Sqrt[3]*x^(1/3)*(-1 + x^2)^(1/3)*ArcTan[(1 + (2*x^(2/3))/(-1 + x^2)^(1/3))/Sqrt[3]])/(2*a*(-x + x^3)^(1/3)) +
 (Sqrt[3]*b^(1/3)*x^(1/3)*(-1 + x^2)^(1/3)*ArcTan[(1 - (2*(a - b)^(1/3)*x^(2/3))/(b^(1/3)*(-1 + x^2)^(1/3)))/S
qrt[3]])/(2*a*(a - b)^(1/3)*(-x + x^3)^(1/3)) + (b^(1/3)*x^(1/3)*(-1 + x^2)^(1/3)*Log[b - a*x^2])/(4*a*(a - b)
^(1/3)*(-x + x^3)^(1/3)) - (3*x^(1/3)*(-1 + x^2)^(1/3)*Log[x^(2/3) - (-1 + x^2)^(1/3)])/(4*a*(-x + x^3)^(1/3))
 - (3*b^(1/3)*x^(1/3)*(-1 + x^2)^(1/3)*Log[(a - b)^(1/3)*x^(2/3) + b^(1/3)*(-1 + x^2)^(1/3)])/(4*a*(a - b)^(1/
3)*(-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 384

Int[1/(((a_) + (b_.)*(x_)^3)^(1/3)*((c_) + (d_.)*(x_)^3)), x_Symbol] :> With[{q = Rt[(b*c - a*d)/c, 3]}, Simp[
ArcTan[(1 + (2*q*x)/(a + b*x^3)^(1/3))/Sqrt[3]]/(Sqrt[3]*c*q), x] + (-Simp[Log[q*x - (a + b*x^3)^(1/3)]/(2*c*q
), x] + Simp[Log[c + d*x^3]/(6*c*q), x])] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 476

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

Rule 477

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> With[{k = Deno
minator[m]}, Dist[k/e, Subst[Int[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/e^n))^p*(c + d*(x^(k*n)/e^n))^q, x], x, (e*
x)^(1/k)], x]] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && FractionQ[m] && Intege
rQ[p]

Rule 494

Int[(((e_.)*(x_))^(m_)*((c_) + (d_.)*(x_)^(n_))^(q_.))/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Dist[e^n/b, Int[
(e*x)^(m - n)*(c + d*x^n)^q, x], x] - Dist[a*(e^n/b), Int[(e*x)^(m - n)*((c + d*x^n)^q/(a + b*x^n)), x], x] /;
 FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LeQ[n, m, 2*n - 1] && IntBinomialQ[a, b
, c, d, e, m, n, -1, q, x]

Rule 2067

Int[((e_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(jn_.))^(p_)*((c_) + (d_.)*(x_)^(n_.))^(q_.), x_Symbol]
:> Dist[e^IntPart[m]*(e*x)^FracPart[m]*((a*x^j + b*x^(j + n))^FracPart[p]/(x^(FracPart[m] + j*FracPart[p])*(a
+ b*x^n)^FracPart[p])), Int[x^(m + j*p)*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, j, m, n,
p, q}, x] && EqQ[jn, j + n] &&  !IntegerQ[p] && NeQ[b*c - a*d, 0] &&  !(EqQ[n, 1] && EqQ[j, 1])

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.00 (sec) , antiderivative size = 244, normalized size of antiderivative = 0.80

method result size
pseudoelliptic \(-\frac {\left (2 \arctan \left (\frac {\sqrt {3}\, \left (x +2 \left (x^{3}-x \right )^{\frac {1}{3}}\right )}{3 x}\right ) \sqrt {3}-\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 ) \left (\frac {a -b}{b}\right )^{\frac {1}{3}}+2 \sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\left (\frac {a -b}{b}\right )^{\frac {1}{3}} x -2 \left (x^{3}-x \right )^{\frac {1}{3}}\right )}{3 \left (\frac {a -b}{b}\right )^{\frac {1}{3}} x}\right )+2 \ln \left (\frac {\left (\frac {a -b}{b}\right )^{\frac {1}{3}} x +\left (x^{3}-x \right )^{\frac {1}{3}}}{x}\right )-\ln \left (\frac {\left (\frac {a -b}{b}\right )^{\frac {2}{3}} x^{2}-\left (\frac {a -b}{b}\right )^{\frac {1}{3}} \left (x^{3}-x \right )^{\frac {1}{3}} x +\left (x^{3}-x \right )^{\frac {2}{3}}}{x^{2}}\right )}{4 \left (\frac {a -b}{b}\right )^{\frac {1}{3}} a}\) \(244\)

[In]

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

[Out]

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

Fricas [F(-1)]

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

[In]

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

[Out]

Timed out

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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