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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {587, 162, 65, 211, 209} \[ \int \frac {-b+4 a x^3}{x \sqrt {-b+a x^3} \left (2 b+a x^3\right )} \, dx=\frac {\sqrt {3} \arctan \left (\frac {\sqrt {a x^3-b}}{\sqrt {3} \sqrt {b}}\right )}{\sqrt {b}}-\frac {\arctan \left (\frac {\sqrt {a x^3-b}}{\sqrt {b}}\right )}{3 \sqrt {b}} \]

[In]

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

[Out]

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

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 162

Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :>
 Dist[(b*g - a*h)/(b*c - a*d), Int[(e + f*x)^p/(a + b*x), x], x] - Dist[(d*g - c*h)/(b*c - a*d), Int[(e + f*x)
^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]

Rule 209

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

Rule 211

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

Rule 587

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

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.94 \[ \int \frac {-b+4 a x^3}{x \sqrt {-b+a x^3} \left (2 b+a x^3\right )} \, dx=-\frac {\arctan \left (\frac {\sqrt {-b+a x^3}}{\sqrt {b}}\right )-3 \sqrt {3} \arctan \left (\frac {\sqrt {-b+a x^3}}{\sqrt {3} \sqrt {b}}\right )}{3 \sqrt {b}} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.14 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.76

method result size
pseudoelliptic \(\frac {3 \arctan \left (\frac {\sqrt {a \,x^{3}-b}\, \sqrt {3}}{3 \sqrt {b}}\right ) \sqrt {3}-\arctan \left (\frac {\sqrt {a \,x^{3}-b}}{\sqrt {b}}\right )}{3 \sqrt {b}}\) \(50\)
default \(\frac {\operatorname {arctanh}\left (\frac {\sqrt {a \,x^{3}-b}}{\sqrt {-b}}\right )}{3 \sqrt {-b}}+\frac {\arctan \left (\frac {\sqrt {a \,x^{3}-b}\, \sqrt {3}}{3 \sqrt {b}}\right ) \sqrt {3}}{\sqrt {b}}\) \(54\)
elliptic \(\text {Expression too large to display}\) \(1430\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

[1/6*(3*sqrt(3)*b*sqrt(-1/b)*log((a*x^3 + 2*sqrt(3)*sqrt(a*x^3 - b)*b*sqrt(-1/b) - 4*b)/(a*x^3 + 2*b)) - sqrt(
-b)*log((a*x^3 + 2*sqrt(a*x^3 - b)*sqrt(-b) - 2*b)/x^3))/b, -1/3*(3*sqrt(3)*sqrt(b)*arctan(sqrt(3)*sqrt(b)/sqr
t(a*x^3 - b)) + sqrt(b)*arctan(sqrt(a*x^3 - b)/sqrt(b)))/b]

Sympy [A] (verification not implemented)

Time = 6.56 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.15 \[ \int \frac {-b+4 a x^3}{x \sqrt {-b+a x^3} \left (2 b+a x^3\right )} \, dx=\begin {cases} \frac {2 \left (- \frac {a \operatorname {atan}{\left (\frac {\sqrt {a x^{3} - b}}{\sqrt {b}} \right )}}{6 \sqrt {b}} + \frac {\sqrt {3} a \operatorname {atan}{\left (\frac {\sqrt {3} \sqrt {a x^{3} - b}}{3 \sqrt {b}} \right )}}{2 \sqrt {b}}\right )}{a} & \text {for}\: a \neq 0 \\- \frac {\log {\left (x^{3} \right )}}{6 \sqrt {- b}} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((2*(-a*atan(sqrt(a*x**3 - b)/sqrt(b))/(6*sqrt(b)) + sqrt(3)*a*atan(sqrt(3)*sqrt(a*x**3 - b)/(3*sqrt(
b)))/(2*sqrt(b)))/a, Ne(a, 0)), (-log(x**3)/(6*sqrt(-b)), True))

Maxima [F]

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

[In]

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

[Out]

integrate((4*a*x^3 - b)/((a*x^3 + 2*b)*sqrt(a*x^3 - b)*x), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.74 \[ \int \frac {-b+4 a x^3}{x \sqrt {-b+a x^3} \left (2 b+a x^3\right )} \, dx=\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt {a x^{3} - b}}{3 \, \sqrt {b}}\right )}{\sqrt {b}} - \frac {\arctan \left (\frac {\sqrt {a x^{3} - b}}{\sqrt {b}}\right )}{3 \, \sqrt {b}} \]

[In]

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

[Out]

sqrt(3)*arctan(1/3*sqrt(3)*sqrt(a*x^3 - b)/sqrt(b))/sqrt(b) - 1/3*arctan(sqrt(a*x^3 - b)/sqrt(b))/sqrt(b)

Mupad [B] (verification not implemented)

Time = 7.46 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.45 \[ \int \frac {-b+4 a x^3}{x \sqrt {-b+a x^3} \left (2 b+a x^3\right )} \, dx=\frac {\ln \left (\frac {2\,b-a\,x^3+\sqrt {b}\,\sqrt {a\,x^3-b}\,2{}\mathrm {i}}{x^3}\right )\,1{}\mathrm {i}}{6\,\sqrt {b}}+\frac {\sqrt {3}\,\ln \left (\frac {\sqrt {3}\,b\,4{}\mathrm {i}+6\,\sqrt {b}\,\sqrt {a\,x^3-b}-\sqrt {3}\,a\,x^3\,1{}\mathrm {i}}{6\,a\,x^3+12\,b}\right )\,1{}\mathrm {i}}{2\,\sqrt {b}} \]

[In]

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

[Out]

(log((2*b + b^(1/2)*(a*x^3 - b)^(1/2)*2i - a*x^3)/x^3)*1i)/(6*b^(1/2)) + (3^(1/2)*log((3^(1/2)*b*4i + 6*b^(1/2
)*(a*x^3 - b)^(1/2) - 3^(1/2)*a*x^3*1i)/(12*b + 6*a*x^3))*1i)/(2*b^(1/2))