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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.08, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {464, 285, 338, 304, 209, 212} \[ \int \frac {\left (-b+a x^4\right ) \sqrt [4]{b+a x^4}}{x^2} \, dx=\frac {3}{8} \sqrt [4]{a} b \arctan \left (\frac {\sqrt [4]{a} x}{\sqrt [4]{a x^4+b}}\right )-\frac {3}{8} \sqrt [4]{a} b \text {arctanh}\left (\frac {\sqrt [4]{a} x}{\sqrt [4]{a x^4+b}}\right )+\frac {\left (a x^4+b\right )^{5/4}}{x}-\frac {3}{4} a x^3 \sqrt [4]{a x^4+b} \]

[In]

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

[Out]

(-3*a*x^3*(b + a*x^4)^(1/4))/4 + (b + a*x^4)^(5/4)/x + (3*a^(1/4)*b*ArcTan[(a^(1/4)*x)/(b + a*x^4)^(1/4)])/8 -
 (3*a^(1/4)*b*ArcTanh[(a^(1/4)*x)/(b + a*x^4)^(1/4)])/8

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 212

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

Rule 285

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

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 338

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

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]

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

Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.00 \[ \int \frac {\left (-b+a x^4\right ) \sqrt [4]{b+a x^4}}{x^2} \, dx=\frac {\sqrt [4]{b+a x^4} \left (4 b+a x^4\right )}{4 x}+\frac {3}{8} \sqrt [4]{a} b \arctan \left (\frac {\sqrt [4]{a} x}{\sqrt [4]{b+a x^4}}\right )-\frac {3}{8} \sqrt [4]{a} b \text {arctanh}\left (\frac {\sqrt [4]{a} x}{\sqrt [4]{b+a x^4}}\right ) \]

[In]

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

[Out]

((b + a*x^4)^(1/4)*(4*b + a*x^4))/(4*x) + (3*a^(1/4)*b*ArcTan[(a^(1/4)*x)/(b + a*x^4)^(1/4)])/8 - (3*a^(1/4)*b
*ArcTanh[(a^(1/4)*x)/(b + a*x^4)^(1/4)])/8

Maple [A] (verified)

Time = 1.22 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.08

method result size
pseudoelliptic \(\frac {-3 b x \left (2 \arctan \left (\frac {\left (a \,x^{4}+b \right )^{\frac {1}{4}}}{a^{\frac {1}{4}} x}\right )+\ln \left (\frac {-a^{\frac {1}{4}} x -\left (a \,x^{4}+b \right )^{\frac {1}{4}}}{a^{\frac {1}{4}} x -\left (a \,x^{4}+b \right )^{\frac {1}{4}}}\right )\right ) a^{\frac {1}{4}}+4 \left (a \,x^{4}+b \right )^{\frac {1}{4}} \left (a \,x^{4}+4 b \right )}{16 x}\) \(93\)

[In]

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

[Out]

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

Fricas [F(-1)]

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

[In]

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

[Out]

Timed out

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.54 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.97 \[ \int \frac {\left (-b+a x^4\right ) \sqrt [4]{b+a x^4}}{x^2} \, dx=\frac {a \sqrt [4]{b} x^{3} \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{4}, \frac {3}{4} \\ \frac {7}{4} \end {matrix}\middle | {\frac {a x^{4} e^{i \pi }}{b}} \right )}}{4 \Gamma \left (\frac {7}{4}\right )} - \frac {b^{\frac {5}{4}} \Gamma \left (- \frac {1}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{4}, - \frac {1}{4} \\ \frac {3}{4} \end {matrix}\middle | {\frac {a x^{4} e^{i \pi }}{b}} \right )}}{4 x \Gamma \left (\frac {3}{4}\right )} \]

[In]

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

[Out]

a*b**(1/4)*x**3*gamma(3/4)*hyper((-1/4, 3/4), (7/4,), a*x**4*exp_polar(I*pi)/b)/(4*gamma(7/4)) - b**(5/4)*gamm
a(-1/4)*hyper((-1/4, -1/4), (3/4,), a*x**4*exp_polar(I*pi)/b)/(4*x*gamma(3/4))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (66) = 132\).

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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