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

   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 = 35, antiderivative size = 63 \[ \int \frac {3 b+a x^3}{x \left (-b+a x^3\right ) \sqrt {b+a x^3}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {4 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {2} \sqrt {b}}\right )}{3 \sqrt {b}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 63, 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.143, Rules used = {587, 162, 65, 214, 213} \[ \int \frac {3 b+a x^3}{x \left (-b+a x^3\right ) \sqrt {b+a x^3}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a x^3+b}}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {4 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {a x^3+b}}{\sqrt {2} \sqrt {b}}\right )}{3 \sqrt {b}} \]

[In]

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

[Out]

(2*ArcTanh[Sqrt[b + a*x^3]/Sqrt[b]])/Sqrt[b] - (4*Sqrt[2]*ArcTanh[Sqrt[b + a*x^3]/(Sqrt[2]*Sqrt[b])])/(3*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 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 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[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 {3 b+a x}{x (-b+a x) \sqrt {b+a x}} \, dx,x,x^3\right ) \\ & = \frac {1}{3} (4 a) \text {Subst}\left (\int \frac {1}{(-b+a x) \sqrt {b+a x}} \, dx,x,x^3\right )-\text {Subst}\left (\int \frac {1}{x \sqrt {b+a x}} \, dx,x,x^3\right ) \\ & = \frac {8}{3} \text {Subst}\left (\int \frac {1}{-2 b+x^2} \, dx,x,\sqrt {b+a x^3}\right )-\frac {2 \text {Subst}\left (\int \frac {1}{-\frac {b}{a}+\frac {x^2}{a}} \, dx,x,\sqrt {b+a x^3}\right )}{a} \\ & = \frac {2 \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {4 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {2} \sqrt {b}}\right )}{3 \sqrt {b}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.95 \[ \int \frac {3 b+a x^3}{x \left (-b+a x^3\right ) \sqrt {b+a x^3}} \, dx=\frac {2 \left (3 \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {b}}\right )-2 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {b+a x^3}}{\sqrt {2} \sqrt {b}}\right )\right )}{3 \sqrt {b}} \]

[In]

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

[Out]

(2*(3*ArcTanh[Sqrt[b + a*x^3]/Sqrt[b]] - 2*Sqrt[2]*ArcTanh[Sqrt[b + a*x^3]/(Sqrt[2]*Sqrt[b])]))/(3*Sqrt[b])

Maple [A] (verified)

Time = 2.26 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.70

method result size
pseudoelliptic \(\frac {-\frac {4 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a \,x^{3}+b}\, \sqrt {2}}{2 \sqrt {b}}\right )}{3}+2 \,\operatorname {arctanh}\left (\frac {\sqrt {a \,x^{3}+b}}{\sqrt {b}}\right )}{\sqrt {b}}\) \(44\)
default \(\frac {2 \,\operatorname {arctanh}\left (\frac {\sqrt {a \,x^{3}+b}}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {4 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a \,x^{3}+b}\, \sqrt {2}}{2 \sqrt {b}}\right )}{3 \sqrt {b}}\) \(47\)
elliptic \(\text {Expression too large to display}\) \(1502\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 6.94 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.41 \[ \int \frac {3 b+a x^3}{x \left (-b+a x^3\right ) \sqrt {b+a x^3}} \, dx=\frac {\ln \left (\frac {\left (\sqrt {a\,x^3+b}-\sqrt {b}\right )\,{\left (\sqrt {a\,x^3+b}+\sqrt {b}\right )}^3}{x^6}\right )}{\sqrt {b}}+\frac {2\,\sqrt {2}\,\ln \left (\frac {3\,\sqrt {2}\,b-4\,\sqrt {b}\,\sqrt {a\,x^3+b}+\sqrt {2}\,a\,x^3}{b-a\,x^3}\right )}{3\,\sqrt {b}} \]

[In]

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

[Out]

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