Optimal. Leaf size=130 \[ \frac {2 \sqrt {b x+a x^3}}{x}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {b x+a x^3}}{b+a x^2}\right )-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {b x+a x^3}}{b+a x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 176, normalized size of antiderivative = 1.35, number of steps
used = 13, number of rules used = 10, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2081, 477,
485, 12, 504, 1225, 226, 1713, 211, 214} \begin {gather*} \frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {a x^3+b x} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {a x^2+b}}\right )}{\sqrt {x} \sqrt {a x^2+b}}+\frac {2 \sqrt {a x^3+b x}}{x}-\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {a x^3+b x} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {a x^2+b}}\right )}{\sqrt {x} \sqrt {a x^2+b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 214
Rule 226
Rule 477
Rule 485
Rule 504
Rule 1225
Rule 1713
Rule 2081
Rubi steps
\begin {align*} \int \frac {\left (b+a x^2\right ) \sqrt {b x+a x^3}}{x^2 \left (-b+a x^2\right )} \, dx &=\frac {\sqrt {b x+a x^3} \int \frac {\left (b+a x^2\right )^{3/2}}{x^{3/2} \left (-b+a x^2\right )} \, dx}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {\left (2 \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {\left (b+a x^4\right )^{3/2}}{x^2 \left (-b+a x^4\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}-\frac {\left (2 \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int -\frac {4 a b^2 x^2}{\left (-b+a x^4\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{b \sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}+\frac {\left (8 a b \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {x^2}{\left (-b+a x^4\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}-\frac {\left (4 \sqrt {a} b \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {b}-\sqrt {a} x^2\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}+\frac {\left (4 \sqrt {a} b \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {b}+\sqrt {a} x^2\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}+\frac {\left (2 \sqrt {a} \sqrt {b} \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {\sqrt {b}-\sqrt {a} x^2}{\left (\sqrt {b}+\sqrt {a} x^2\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}-\frac {\left (2 \sqrt {a} \sqrt {b} \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {\sqrt {b}+\sqrt {a} x^2}{\left (\sqrt {b}-\sqrt {a} x^2\right ) \sqrt {b+a x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}-\frac {\left (2 \sqrt {a} b \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {b}-2 \sqrt {a} b x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {b+a x^2}}\right )}{\sqrt {x} \sqrt {b+a x^2}}+\frac {\left (2 \sqrt {a} b \sqrt {b x+a x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {b}+2 \sqrt {a} b x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {b+a x^2}}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ &=\frac {2 \sqrt {b x+a x^3}}{x}+\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {b x+a x^3} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {b+a x^2}}\right )}{\sqrt {x} \sqrt {b+a x^2}}-\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {b x+a x^3} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {b+a x^2}}\right )}{\sqrt {x} \sqrt {b+a x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 148, normalized size = 1.14 \begin {gather*} \frac {\sqrt {b+a x^2} \left (2 \sqrt {b+a x^2}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {b+a x^2}}\right )-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {b+a x^2}}\right )\right )}{\sqrt {x \left (b+a x^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.14, size = 643, normalized size = 4.95
method | result | size |
elliptic | \(\frac {2 a \,x^{2}+2 b}{\sqrt {\left (a \,x^{2}+b \right ) x}}+\frac {2 b \sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{a \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}+\frac {2 b \sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{a \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}\) | \(318\) |
risch | \(\frac {2 a \,x^{2}+2 b}{\sqrt {\left (a \,x^{2}+b \right ) x}}+4 b a \left (\frac {\sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{2 a^{2} \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}+\frac {\sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{2 a^{2} \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}\right )\) | \(321\) |
default | \(\frac {2 a \,x^{2}+2 b}{\sqrt {\left (a \,x^{2}+b \right ) x}}-\frac {2 \sqrt {-a b}\, \sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}\, \sqrt {-\frac {2 \left (x -\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \left (-\frac {2 \sqrt {-a b}\, \EllipticE \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{a}+\frac {\sqrt {-a b}\, \EllipticF \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{a}\right )}{\sqrt {a \,x^{3}+b x}}+2 a \left (\frac {2 b \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticE \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{a \sqrt {a \,x^{3}+b x}}-\frac {b \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticF \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{a \sqrt {a \,x^{3}+b x}}+\frac {b \sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{a^{2} \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}-\frac {\sqrt {a b}}{a}\right )}+\frac {b \sqrt {-a b}\, \sqrt {\frac {x a}{\sqrt {-a b}}+1}\, \sqrt {-\frac {2 x a}{\sqrt {-a b}}+2}\, \sqrt {-\frac {x a}{\sqrt {-a b}}}\, \EllipticPi \left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{a}\right ) a}{\sqrt {-a b}}}, -\frac {\sqrt {-a b}}{a \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}, \frac {\sqrt {2}}{2}\right )}{a^{2} \sqrt {a \,x^{3}+b x}\, \left (-\frac {\sqrt {-a b}}{a}+\frac {\sqrt {a b}}{a}\right )}\right )\) | \(643\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1139 vs.
\(2 (100) = 200\).
time = 41.39, size = 1139, normalized size = 8.76 \begin {gather*} -\frac {4 \cdot 4^{\frac {1}{4}} \left (a b\right )^{\frac {1}{4}} x \arctan \left (-\frac {\sqrt {2} \sqrt {20 \, a^{4} b + 44 \, a^{3} b^{2} + 8 \, a^{2} b^{3} + {\left (4 \, a^{4} + 41 \, a^{3} b + 26 \, a^{2} b^{2} + a b^{3}\right )} \sqrt {a b}} {\left (4^{\frac {3}{4}} {\left ({\left (a^{3} + 2 \, a^{2} b\right )} x^{4} - 2 \, {\left (5 \, a^{2} b + a b^{2}\right )} x^{3} + a b^{2} + 2 \, b^{3} + 6 \, {\left (a^{2} b + 2 \, a b^{2}\right )} x^{2} - 2 \, {\left (5 \, a b^{2} + b^{3}\right )} x\right )} \left (a b\right )^{\frac {3}{4}} - 4^{\frac {1}{4}} {\left ({\left (5 \, a^{3} b + a^{2} b^{2}\right )} x^{4} + 5 \, a b^{3} + b^{4} - 8 \, {\left (a^{3} b + 2 \, a^{2} b^{2}\right )} x^{3} + 6 \, {\left (5 \, a^{2} b^{2} + a b^{3}\right )} x^{2} - 8 \, {\left (a^{2} b^{2} + 2 \, a b^{3}\right )} x\right )} \left (a b\right )^{\frac {1}{4}}\right )} + 4 \, \sqrt {a x^{3} + b x} {\left (4^{\frac {3}{4}} {\left (4 \, a^{4} b - 9 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - a b^{4}\right )} \left (a b\right )^{\frac {3}{4}} x + 4^{\frac {1}{4}} {\left (4 \, a^{4} b^{2} - 9 \, a^{3} b^{3} + 6 \, a^{2} b^{4} - a b^{5} + {\left (4 \, a^{5} b - 9 \, a^{4} b^{2} + 6 \, a^{3} b^{3} - a^{2} b^{4}\right )} x^{2}\right )} \left (a b\right )^{\frac {1}{4}}\right )}}{2 \, {\left (4 \, a^{4} b^{3} - 9 \, a^{3} b^{4} + 6 \, a^{2} b^{5} - a b^{6} + {\left (4 \, a^{6} b - 9 \, a^{5} b^{2} + 6 \, a^{4} b^{3} - a^{3} b^{4}\right )} x^{4} - 2 \, {\left (4 \, a^{5} b^{2} - 9 \, a^{4} b^{3} + 6 \, a^{3} b^{4} - a^{2} b^{5}\right )} x^{2}\right )}}\right ) + 4^{\frac {1}{4}} \left (a b\right )^{\frac {1}{4}} x \log \left (-\frac {4^{\frac {3}{4}} {\left ({\left (5 \, a^{3} + a^{2} b\right )} x^{4} - 8 \, {\left (a^{3} + 2 \, a^{2} b\right )} x^{3} + 5 \, a b^{2} + b^{3} + 6 \, {\left (5 \, a^{2} b + a b^{2}\right )} x^{2} - 8 \, {\left (a^{2} b + 2 \, a b^{2}\right )} x\right )} \left (a b\right )^{\frac {3}{4}} + 8 \, {\left (5 \, a^{2} b^{2} + a b^{3} + {\left (5 \, a^{3} b + a^{2} b^{2}\right )} x^{2} - 4 \, {\left (a^{3} b + 2 \, a^{2} b^{2}\right )} x - 2 \, {\left (a^{2} b + 2 \, a b^{2} + {\left (a^{3} + 2 \, a^{2} b\right )} x^{2} - {\left (5 \, a^{2} b + a b^{2}\right )} x\right )} \sqrt {a b}\right )} \sqrt {a x^{3} + b x} - 4 \cdot 4^{\frac {1}{4}} {\left ({\left (a^{4} + 2 \, a^{3} b\right )} x^{4} + a^{2} b^{2} + 2 \, a b^{3} - 2 \, {\left (5 \, a^{3} b + a^{2} b^{2}\right )} x^{3} + 6 \, {\left (a^{3} b + 2 \, a^{2} b^{2}\right )} x^{2} - 2 \, {\left (5 \, a^{2} b^{2} + a b^{3}\right )} x\right )} \left (a b\right )^{\frac {1}{4}}}{a^{2} x^{4} - 2 \, a b x^{2} + b^{2}}\right ) - 4^{\frac {1}{4}} \left (a b\right )^{\frac {1}{4}} x \log \left (\frac {4^{\frac {3}{4}} {\left ({\left (5 \, a^{3} + a^{2} b\right )} x^{4} - 8 \, {\left (a^{3} + 2 \, a^{2} b\right )} x^{3} + 5 \, a b^{2} + b^{3} + 6 \, {\left (5 \, a^{2} b + a b^{2}\right )} x^{2} - 8 \, {\left (a^{2} b + 2 \, a b^{2}\right )} x\right )} \left (a b\right )^{\frac {3}{4}} - 8 \, {\left (5 \, a^{2} b^{2} + a b^{3} + {\left (5 \, a^{3} b + a^{2} b^{2}\right )} x^{2} - 4 \, {\left (a^{3} b + 2 \, a^{2} b^{2}\right )} x - 2 \, {\left (a^{2} b + 2 \, a b^{2} + {\left (a^{3} + 2 \, a^{2} b\right )} x^{2} - {\left (5 \, a^{2} b + a b^{2}\right )} x\right )} \sqrt {a b}\right )} \sqrt {a x^{3} + b x} - 4 \cdot 4^{\frac {1}{4}} {\left ({\left (a^{4} + 2 \, a^{3} b\right )} x^{4} + a^{2} b^{2} + 2 \, a b^{3} - 2 \, {\left (5 \, a^{3} b + a^{2} b^{2}\right )} x^{3} + 6 \, {\left (a^{3} b + 2 \, a^{2} b^{2}\right )} x^{2} - 2 \, {\left (5 \, a^{2} b^{2} + a b^{3}\right )} x\right )} \left (a b\right )^{\frac {1}{4}}}{a^{2} x^{4} - 2 \, a b x^{2} + b^{2}}\right ) - 8 \, \sqrt {a x^{3} + b x}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x \left (a x^{2} + b\right )} \left (a x^{2} + b\right )}{x^{2} \left (a x^{2} - b\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________